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
Computes the smallest radius needed to place a turnpike of length highwayLength as an input for the method OCOH.OCOHAlgorithm.center(PointList T, double radius). This method uses binary search to find the smallest radius in time O(log n).
private double getBPradius(PointList list1, PointList list2, double m, double M){ double y = (m+M)/2; double e1 = Math.max(0, list1.delta() + _highwayLength/_velocity - list2.delta()); double e2 = Math.max(0, list2.delta() - list1.delta() - _highwayLength/_velocity); PointList centers1 = center(list1, list1.delta() + e2 + y); // Center(H, d(H)+e2+x) PointList centers2 = center(list2, list2.delta() + e1 + y); // Center(W, d(W)+e1+x) // find maximum distance between centers1 and centers2 double maxDist = centers1.objectMaxDist(centers2); // find minimum distance between centers1 and centers2 double minDist = centers1.objectMinDist(centers2); if ((int)Math.abs(_prevY - y) == 0){ return _prevY; } if (maxDist >= _highwayLength && minDist <= _highwayLength){ _prevY = y; if ((int)Math.abs(M-m) == 0){ return y; } else return getBPradius(list1, list2, m, y); } else { return getBPradius(list1, list2, y, M); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double divideAndConquer(ArrayList<Point> X, ArrayList<Point> Y) {\n\n\t\t//Assigns size of array\n\t\tint size = X.size();\n\n\t\t//If less than 3 points, efficiency is better by brute force\n\t\tif (size <= 3) {\n\t\t\treturn BruteForceClosestPairs(X);\n\t\t}\n\t\t\n\t\t//Ceiling of array size / 2\n\t\tint ceil = (int) Math.ceil(size / 2);\n\t\t//Floor of array size / 2\n\t\tint floor = (int) Math.floor(size / 2);\n\t\t\n\t\t//Array list for x & y values left of midpoint\n\t\tArrayList<Point> xL = new ArrayList<Point>();\t\n\t\tArrayList<Point> yL = new ArrayList<Point>();\n\t\t\n\t\t//for [0 ... ceiling of array / 2]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = 0; i < ceil; i++) {\n\t\t\t\n\t\t\txL.add(X.get(i));\n\t\t\tyL.add(Y.get(i));\n\t\t}\n\t\t\n\t\t// Array list for x & y values right of midpoint\n\t\tArrayList<Point> xR = new ArrayList<Point>();\n\t\tArrayList<Point> yR = new ArrayList<Point>();\n\t\t\n\t\t//for [floor of array / 2 ... size of array]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = floor; i < size - 1; i++) {\n\n\t\t xR.add(X.get(i));\n\t\t\tyR.add(Y.get(i));\n\t\t}\n\t\t\n\t\t//Recursively find the shortest distance\n\t\tdouble distanceL = divideAndConquer(xL, yL);\n\t\tdouble distanceR = divideAndConquer(xR, xL);\n\t\t//Smaller of both distances\n\t\tdouble distance = Math.min(distanceL, distanceR);\n\t\t//Mid-line\n\t\tdouble mid = X.get(ceil - 1).getX();\n\n\t\tArrayList<Point> S = new ArrayList<Point>();\n\n\t\t//copy all the points of Y for which |x - m| < d into S[0..num - 1]\n\t\tfor (int i = 0; i < Y.size() - 1; i++) {\n\n\t\t\tif (Math.abs(X.get(i).getX() - mid) < distance) {\n\t\t\t\tS.add(Y.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Square minimum distance\n\t\tdouble dminsq = distance * distance;\n\t\t//Counter\n\t\tint k = 0;\n\t\tint num = S.size();\n\n\t\tfor (int i = 0; i < num - 2; i++) {\n\t\t\t\n\t\t\tk = i + 1;\n\t\t\t\n\t\t\twhile (k <= num - 1 && (Math.pow((S.get(k).getY() - S.get(i).getY()), 2) < dminsq)) {\n\n\t\t\t\t//Find distance between points and find the minimum compared to dminsq\n\t\t\t\tdminsq = Math.min(Math.pow(S.get(k).getX() - S.get(i).getX(), 2) \n\t\t\t\t\t\t\t\t+ Math.pow(S.get(k).getY() - S.get(i).getY(), 2), dminsq);\n\n\t\t\t\tk = k + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn Math.sqrt(dminsq);\n\t}", "private static int searchSmallest(List<Integer> input) {\n\t\tint left = 0;\n\t\tint right = input.size()-1;\n\t\t\n\t\twhile(left < right) {\n\t\t\tint mid = left + (right-left)/2 + 1; System.out.println(\"mid=\" + mid);\n\t\t\t\n\t\t\tif(input.get(left) > input.get(mid)) {//smallest in left half\n\t\t\t\tright = mid-1;\n\t\t\t}else {\n\t\t\t\tleft = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn left;//left=right now\n\t}", "public Point[] nearestPair() {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (this.size<2)\treturn null; //step 1\n\t\t\tif (this.size==2){\n\t\t\t\tAnswer[0]=this.minx.getData();\n\t\t\t\tAnswer[1]=this.maxx.getData();\n\t\t\t\treturn Answer;\t\t\t\n\t\t\t}\n\t\t\tdouble MinDistance=-1; // for sure it will be change in the next section, just for avoid warrning.\n\t\t\tdouble MinDistanceInStrip=-1;\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2]; // around the median\n\t\t\tboolean LargestAxis = getLargestAxis(); //step 2\n\t\t\tContainer median = getMedian(LargestAxis); //step 3\n\t\t\tif (LargestAxis){// step 4 - calling the recursive function nearestPairRec\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.minx.getData().getX(), median.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextX().getData().getX(), this.maxx.getData().getX(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(this.miny.getData().getY(), median.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(median.getNextY().getData().getY(), this.maxy.getData().getY(),LargestAxis), LargestAxis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (MinPointsLeft!=null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}\n\t\t\telse if (MinPointsRight!=null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 - nearest point around the median\n\t\t\tif (MinDistance==-1) MinDistance=0;\n\t\t\tMinPointsInStrip = nearestPairInStrip(median, MinDistance*2, LargestAxis);\n\t\t\tif (MinPointsInStrip != null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public static double closestPair(Point[] sortedX) {\n if (sortedX.length <= 1) {\n return Double.MAX_VALUE;\n }\n double mid = sortedX[(sortedX.length) / 2].getX();\n double firstHalf = closestPair(Arrays.copyOfRange(sortedX, 0, (sortedX.length) / 2));\n double secondHalf = closestPair(Arrays.copyOfRange(sortedX, (sortedX.length) / 2, sortedX.length));\n double min = Math.min(firstHalf, secondHalf);\n ArrayList<Point> close = new ArrayList<Point>();\n for (int i = 0; i < sortedX.length; i++) {\n double dis = Math.abs(sortedX[i].getX() - mid);\n if (dis < min) {\n close.add(sortedX[i]);\n }\n }\n // sort by Y coordinates\n Collections.sort(close, new Comparator<Point>() {\n public int compare(Point obj1, Point obj2) {\n return (int) (obj1.getY() - obj2.getY());\n }\n });\n Point[] near = close.toArray(new Point[close.size()]);\n\n for (int i = 0; i < near.length; i++) {\n int k = 1;\n while (i + k < near.length && near[i + k].getY() < near[i].getY() + min) {\n if (min > near[i].distance(near[i + k])) {\n min = near[i].distance(near[i + k]);\n System.out.println(\"near \" + near[i].distance(near[i + k]));\n System.out.println(\"best \" + best);\n\n if (near[i].distance(near[i + k]) < best) {\n best = near[i].distance(near[i + k]);\n arr[0] = near[i];\n arr[1] = near[i + k];\n // System.out.println(arr[0].getX());\n // System.out.println(arr[1].getX());\n\n }\n }\n k++;\n }\n }\n return min;\n }", "public T findStartOfCircle() {\n \tNode<T> current = head;\n \tList<T> seen = new ArrayList<>();\n \twhile (true) {\n \t\tseen.add(current.val);\n \t\tif (seen.contains(current.next.val)) return current.next.val;\n \t\telse current = current.next;\n\t\t}\n }", "private PointList center(PointList T, double radius){\n\t\t\n\t\tPointList centers = new PointList(Color.PINK);\n\t\tPoint[] extrema = new Point[4];\n\t\tPoint currentCenter;\n\t\t\n\t\tdouble xLength;\n\t\tdouble yLength;\n\t\tdouble xStart;\n\t\tdouble xEnd;\n\t\tdouble yStart;\n\t\tdouble yEnd;\n\t\t\n\t\textrema = T.getExtremePoints();\n\t\t\n\t\tif (extrema[0] == null) return centers; // centers is empty\n\t\t\n\t\tif (radius < T.delta()) return centers; // centers is empty\n\t\t\n\t\t// find X coordinates\n\t\tcurrentCenter = new Point(extrema[0].posX + radius, extrema[0].posY);\n\t\tif (currentCenter.posX + radius == extrema[1].posX) {\n\t\t\t// current x position is only possible x position\n\t\t\txStart = currentCenter.posX;\n\t\t\txEnd = xStart;\n\t\t\t\n\t\t} else {\n\t\t\t// we can move in x direction\n\t\t\txLength = Math.abs(currentCenter.posX + radius - extrema[1].posX);\n\t\t\txStart = currentCenter.posX - xLength;\n\t\t\txEnd = currentCenter.posX;\n\t\t}\n\n\t\t// find Y coordinates\n\t\tcurrentCenter = new Point(extrema[2].posX, extrema[2].posY + radius);\n\t\tif (currentCenter.posY + radius == extrema[3].posY) {\n\t\t\t// current y position is only possible y position\n\t\t\tyStart = currentCenter.posY;\n\t\t\tyEnd = yStart;\n\t\t} else {\n\t\t\t// we can move in y direction\n\t\t\tyLength = Math.abs(currentCenter.posY + radius - extrema[3].posY);\n\t\t\tyStart = currentCenter.posY - yLength;\n\t\t\tyEnd = currentCenter.posY;\n\t\t}\n\t\t\n\t\tcenters.addPoint(new Point(xStart, yStart));\n\t\tif (!centers.contains(new Point(xStart, yEnd))){\n\t\t\tcenters.addPoint(new Point(xStart, yEnd));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yStart))){\n\t\t\tcenters.addPoint(new Point(xEnd, yStart));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yEnd))){\n\t\t\tcenters.addPoint(new Point(xEnd, yEnd));\n\t\t}\n\t\t\n\t\treturn centers;\n\t\n\t}", "private Point findLeadingPt() {\n\t\tPoint2D.Double pt1 = new Point2D.Double(xs[0], ys[0]);\n\t\tPoint2D.Double pt2 = new Point2D.Double(xs[1], ys[1]);\n\t\tPoint2D.Double pt3 = new Point2D.Double(xs[2], ys[2]);\n\n\t\tPoint leadingPt = new Point((int) pt2.getX(), (int) pt2.getY());\n\t\tdouble smallestRadius = this.findRadiusFromChordAndPt(pt1, pt3, pt2);\n\n\t\tfor (int i = 2; i < xs.length - 1; i++) {\n\t\t\tPoint2D.Double ptA = new Point2D.Double(xs[i - 1], ys[i - 1]);\n\t\t\tPoint2D.Double ptC = new Point2D.Double(xs[i], ys[i]);\n\t\t\tPoint2D.Double ptB = new Point2D.Double(xs[i + 1], ys[i + 1]);\n\t\t\tif (smallestRadius > this.findRadiusFromChordAndPt(ptA, ptB, ptC)) {\n\t\t\t\tsmallestRadius = this.findRadiusFromChordAndPt(ptA, ptB, ptC);\n\t\t\t\tleadingPt = new Point((int) ptC.getX(), (int) ptC.getY());\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * double yArrow = Controller.flowArrow.findCenterOfMass().getY(); for (int i =\n\t\t * 0; i < xs.length; i++) { if (ys[i] == yArrow) { leadingPt = new Point((int)\n\t\t * xs[i], (int) ys[i]); } }\n\t\t */\n\t\treturn leadingPt;\n\t}", "private Point3D getRandomSolarPoint(final int radius)\n \t{\n \t\t// Might want to change the min/max values here\n \t\tPoint3D point = null;\n \t\twhile (point == null || isOccupied(point, radius)) {\n \t\t\tpoint = new Point3D(MathUtils.getRandomIntBetween(-500, 500), MathUtils.getRandomIntBetween(-500, 500),\n \t\t\t\t\tMathUtils.getRandomIntBetween(-500, 500));\n \t\t}\n \t\treturn point;\n \t}", "public static void main(String[] args) {\n Random r = new Random();\n// r.setSeed(1982);\n int R = 500;\n int L = 100000;\n\n int start = -500;\n int end = 500;\n HashSet<Point> hi3 = new HashSet<>();\n List<Point> hi5 = new ArrayList<>();\n Stopwatch sw = new Stopwatch();\n for (int i = 0; i < L; i += 1) {\n double ran = r.nextDouble();\n double x = start + (ran * (end - start));\n ran = r.nextDouble();\n double y = start + (ran * (end - start));\n Point temp = new Point(x, y);\n hi5.add(temp);\n\n }\n KDTree speedTest = new KDTree(hi5);\n NaivePointSet speedTest2 = new NaivePointSet(hi5);\n\n// for (int i = 0; i < 1000; i++) {\n// double ran = r.nextDouble();\n// double x2 = start + (ran *(end - start));\n// ran = r.nextDouble();\n// double y2 = start + (ran *(end - start));\n// assertEquals(speedTest2.nearest(x2, y2), speedTest.nearest(x2, y2 ));\n// }\n// assertEquals(speedTest2.nearest(r.nextInt(R + 1 - 500) + 500,\n// r.nextInt(R + 1 - 500) + 100), speedTest.nearest(427.535670, -735.656403));\n\n System.out.println(\"elapsed time1: \" + sw.elapsedTime());\n\n int R2 = 100;\n int L2 = 10000;\n Stopwatch sw2 = new Stopwatch();\n for (int i = 0; i < L2; i += 1) {\n\n speedTest2.nearest(r.nextDouble(), r.nextDouble());\n }\n\n System.out.println(\"elapsed time: \" + sw2.elapsedTime());\n }", "public int searchCyc(int[] nums) {\n int lo = 0;\n int hi = nums.length - 1;\n\n while (lo < hi) {\n int mid = (lo + hi) / 2;\n if (nums[mid] > nums[hi]) {\n lo = mid + 1;\n } else { //\n hi = mid;\n }\n }\n\n //Loop ends when left == right\n return lo;\n}", "private Cell getShortestPath(List<Cell> surroundingBlocks, int DestinationX, int DestinationY) {\n \n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell min = surroundingBlocks.get(0);\n int distMin = euclideanDistance(surroundingBlocks.get(0).x, surroundingBlocks.get(0).y, DestinationX, DestinationY);\n \n for(int i = 0; i < surroundingBlocks.size(); i++) {\n if (i==1) {\n min = surroundingBlocks.get(i);\n }\n if(distMin > euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY)) {\n distMin = euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY);\n min = surroundingBlocks.get(i);\n }\n }\n return min;\n }", "private PanImageEntry findPanImageEntryClosestToCenter() {\n\t\tfindProjectedZs();\n\t\t\n\t\tPanImageEntry closestEntry = null;\n\t\tfor (int n=0; n<panImageList.length; n++) {\n\t\t\tPanImageEntry entry = panImageList[n];\n\t\t\tif (entry.draw) {\n\t\t\t\tif (closestEntry == null) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ > closestEntry.projectedZ) {\n\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t}\n\t\t\t\telse if (entry.projectedZ == closestEntry.projectedZ) {\n\t\t\t\t\tif (isSuperiorImageCat(entry.imageListEntry.getImageCategory(), closestEntry.imageListEntry.getImageCategory())) {\n\t\t\t\t\t\tclosestEntry = entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (selectedPanImageEntry != null) {\n\t\t\tdouble dAz = closestEntry.imageListEntry.getImageMetadataEntry().inst_az_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_az_rover;\n\t\t\tdouble dEl = closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover - \n\t\t\tselectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover;\n\t\t\tif ((selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < -85.0 \n\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover < 85.0)\n\t\t\t\t\t|| (selectedPanImageEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85\n\t\t\t\t\t\t&& closestEntry.imageListEntry.getImageMetadataEntry().inst_el_rover > 85)\t\n\t\t\t\t\t) {\n\t\t\t\t// this is a fix because the distance computation doesn't work right at high or low elevations...\n\t\t\t\t// in fact, the whole thing is pretty messed up\n\t\t\t\tclosestEntry = selectedPanImageEntry;\t\t\t\t\n\t\t\t}\n\t\t\telse if ((Math.abs(dAz) < selectTolerance) && (Math.abs(dEl) < selectTolerance)) {\n\t\t\t\tclosestEntry = selectedPanImageEntry;\n\t\t\t}\n\t\t}\n\t\treturn closestEntry;\n\t}", "public static Player nearestPlayer(Entity entity, double radius) {\n Player player = null;\n double shortest = (radius * radius) + 1;\n double distSq;\n for (Player p : entity.getWorld().getPlayers()) {\n if (p.isDead() || !p.getGameMode().equals(GameMode.SURVIVAL)) continue;\n if (!entity.getWorld().equals(p.getWorld())) continue;\n distSq = entity.getLocation().distanceSquared(p.getLocation()); //3D distance\n if (distSq < shortest) {\n player = p;\n shortest = distSq;\n }\n }\n return player;\n }", "private void solveIntersectionPoints() {\n\t\tRadialGauge gauge = getMetricsPath().getBody().getGauge();\n\n\t\t// define first circle which is gauge outline circle\n\t\tx0 = gauge.getCenterDevice().getX();\n\t\ty0 = gauge.getCenterDevice().getY();\n\t\tr0 = gauge.getRadius();\n\t\tarc0 = new Arc2D.Double(x0 - r0, y0 - r0, 2 * r0, 2 * r0, 0, 360, Arc2D.OPEN);\n\n\t\t// define the second circle with given parameters\n\t\tx1 = x0 + polarRadius * Math.cos(Math.toRadians(polarDegree));\n\t\ty1 = y0 - polarRadius * Math.sin(Math.toRadians(polarDegree));\n\t\tr1 = radius;\n\n\t\tarc1 = new Arc2D.Double(x1 - r1, y1 - r1, 2 * r1, 2 * r1, 0, 360, Arc2D.OPEN);\n\n\t\tif (polarDegree != 0 && polarDegree != 180) {\n\t\t\t// Ax²+Bx+B = 0\n\t\t\tdouble N = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\n\t\t\tdouble A = Math.pow((x0 - x1) / (y0 - y1), 2) + 1;\n\t\t\tdouble B = 2 * y0 * (x0 - x1) / (y0 - y1) - 2 * N * (x0 - x1) / (y0 - y1) - 2 * x0;\n\t\t\tdouble C = x0 * x0 + y0 * y0 + N * N - r0 * r0 - 2 * y0 * N;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = (-B - delta) / (2 * A);\n\t\t\t\tdouble p1y = N - p1x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = (-B + delta) / (2 * A);\n\t\t\t\tdouble p2y = N - p2x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t} else if (polarDegree == 0 || polarDegree == 180) {\n\t\t\t// polar degree = 0|180 -> y0=y1\n\t\t\t// Ay²+By + C = 0;\n\t\t\tdouble x = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0) / (2 * (x0 - x1));\n\t\t\tdouble A = 1;\n\t\t\tdouble B = -2 * y1;\n\t\t\tdouble C = x1 * x1 + x * x - 2 * x1 * x + y1 * y1 - r1 * r1;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = x;\n\t\t\t\tdouble p1y = (-B - delta) / 2 * A;\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = x;\n\t\t\t\tdouble p2y = (-B + delta) / 2 * A;\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t}\n\t}", "private int findXInCircularSortedArray(int[] array, int x, int size){\n\t\tint start = 0;\n\t\tint end = size-1;\n\t\twhile(start <= end){\n\t\t\tint mid = (start + end)/2;\n\t\t\tif(array[mid] == x){\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif(array[mid] <= array[end]){\n\t\t\t\tif(x > array[mid] && x<= array[end])\n\t\t\t\t\tstart = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}else if (array[mid] >= array[start]){\n\t\t\t\tif(x >= array[start] && x < array[mid]){\n\t\t\t\t\tend = mid-1;\n\t\t\t\t}else\n\t\t\t\t\tstart = mid+1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "@Basic\n\t@Immutable\n\tpublic abstract double getRadiusLowerBound();", "private GPoint findOuterCorner(double r) {\n\t\trIsNegative = false;\n\t\tif (r < 0) rIsNegative = true;\n\t\t//double cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\t//double cornerY = lastClick.getY() - r;\n\t\t//GPoint point = new GPoint(cornerX,cornerY);\n\t\t//return point;\n\t\t//double cornerX = \n\t\tdouble centerX = (centerCircle.getWidth() / 2.0) + centerCircle.getX();\n\t\tdouble centerY = (centerCircle.getHeight() / 2.0) + centerCircle.getY();\n\t\tdouble x;\n\t\tif (!rIsNegative) {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0);\n\t\t} else {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0) + r*2.0;\n\t\t}\n\t\tdouble y = centerY - Math.abs(r);\n\t\tGPoint point = new GPoint(x,y);\n\t\treturn point;\n\t}", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "static int findMin(int[] nums) {\r\n \r\n // **** sanity check(s) ****\r\n if (nums.length == 1)\r\n return nums[0];\r\n\r\n // **** initialization ****\r\n int left = 0;\r\n int right = nums.length - 1;\r\n\r\n // **** check if there is no rotation ****\r\n if (nums[right] > nums[left])\r\n return nums[left];\r\n\r\n // **** binary search approach ****\r\n while (left < right) {\r\n\r\n // **** compute mid point ****\r\n int mid = left + (right - left) / 2;\r\n\r\n // **** check if we found min ****\r\n if (nums[mid] > nums[mid + 1])\r\n return nums[mid + 1];\r\n\r\n if (nums[mid - 1] > nums[mid])\r\n return nums[mid];\r\n\r\n // **** decide which way to go ****\r\n if (nums[mid] > nums[0])\r\n left = mid + 1; // go right\r\n else\r\n right = mid - 1; // go left\r\n }\r\n\r\n // **** min not found (needed to keep the compiler happy) ****\r\n return 69696969;\r\n }", "public Coordinate getClosestCoordinateTo(Coordinate centeredCoordinate) {\n List<Coordinate> allCellsAsCoordinates = getAllCellsAsCenteredCoordinates();\n if (allCellsAsCoordinates.size() == 0) allCellsAsCoordinates.get(0);\n Coordinate closest = allCellsAsCoordinates.stream().min((c1, c2) -> Float.compare(c1.distance(centeredCoordinate), c2.distance(centeredCoordinate))).get();\n return closest.minHalfTile();\n }", "public Vector2 returnToNearestStockpile(Resource resource){\n\t\tif(myTownHall == null)\n\t\t\treturn new Vector2(0,0);\n\t\treturn myTownHall.getCenter();\n\t}", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "private Cluster getNearestCluster(BasicEvent event) {\n float minDistance = Float.MAX_VALUE;\n Cluster closest = null;\n float currentDistance = 0;\n for (Cluster c : clusters) {\n float rX = c.radiusX;\n float rY = c.radiusY; // this is surround region for purposes of dynamicSize scaling of cluster size or aspect ratio\n if (dynamicSizeEnabled) {\n rX *= surround;\n rY *= surround; // the event is captured even when it is in \"invisible surround\"\n }\n float dx, dy;\n if ((dx = c.distanceToX(event)) < rX && (dy = c.distanceToY(event)) < rY) { // needs instantaneousAngle metric\n currentDistance = dx + dy;\n if (currentDistance < minDistance) {\n closest = c;\n minDistance = currentDistance;\n c.distanceToLastEvent = minDistance;\n c.xDistanceToLastEvent = dx;\n c.yDistanceToLastEvent = dy;\n }\n }\n }\n return closest;\n }", "public static int findRadius(int[] houses, int[] heaters) {\n\n Arrays.sort(houses);\n Arrays.sort(heaters);\n\n if(heaters[0] >= houses[houses.length - 1]){\n return heaters[0] - houses[0];\n }\n if(heaters[heaters.length - 1] <= houses[0]){\n return houses[houses.length - 1] - heaters[heaters.length - 1];\n }\n\n int i = 0;\n int j = 0;\n int radius = 0;\n\n // in case [1,2,3] [2]\n //\n\n if(houses [0] < heaters[0]){\n radius = heaters[0] - houses[0];\n }\n\n while(houses[i] <= heaters[j]){\n i++;\n }\n\n while(i < houses.length && j < heaters.length - 1){\n if(houses[i] <= heaters[j + 1]){\n radius = Math.max(radius, Math.min(houses[i] - heaters[j], heaters[j + 1] - houses[i]));\n i++;\n\n }else{\n j++;\n }\n }\n\n // the biggest value of heaters is smaller than houses\n if(i < houses.length){\n radius = Math.max(radius, houses[houses.length - 1] - heaters[heaters.length - 1]);\n }\n\n return radius;\n\n }", "int findRadius() {\n GraphUtils u = new GraphUtils();\n int diameter = u.furthestDist(\n u.furthestPiece(u.furthestPiece(this.board.get(powerRow).get(powerCol), this.nodes),\n this.nodes),\n this.nodes);\n return diameter / 2 + 1;\n }", "Execution getClosestDistance();", "private static Point getNearest(Collection<Point> centers, Point p) {\n\t\tdouble min = 0;\n\t\tPoint minPoint = null;\n\t\tfor(Point c : centers){\n\t\t\tif(minPoint == null || c.distance(p) < min){\n\t\t\t\tmin = c.distance(p);\n\t\t\t\tminPoint = c;\n\t\t\t}\n\t\t}\n\t\treturn minPoint;\n\t}", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length; i++) {\n if(found) {\n break;\n }\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n break;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "public int findMin(int[] nums) {\n\t\t// corner\n\t\tif (nums.length == 1) {\n\t\t\treturn nums[0];\n\t\t}\n\t\t// Not rotated.\n\t\tif (nums[0] < nums[nums.length - 1]) {\n\t\t\treturn nums[0];\n\t\t}\n\n\t\t// Binary Search.\n\t\tint left = 0;\n\t\tint right = nums.length - 1;\n\t\t// int right = nums.length; // NG! (R = M version)\n\t\twhile (left <= right) {\n\t\t\t// while (left < right) { // NG! (R = M version)\n\t\t\tint mid = left + (right - left) / 2;\n\n\t\t\t// Find the valley.\n\t\t\t// nums[mid + 1] could cause array index out of bound when nums[mid] is the last\n\t\t\t// element.\n\t\t\t// However, for this problem, when nums[mid] is the second to the last, it\n\t\t\t// returns and\n\t\t\t// nums[mid] never reaches to the last element.\n\t\t\t// R = M version is NG because nums[mid] skips the second to the last and hits\n\t\t\t// the last\n\t\t\t// element depending on the case, in which case, nums[mid + 1] causes array\n\t\t\t// index out of bound.\n\t\t\tif (nums[mid] > nums[mid + 1]) {\n\t\t\t\treturn nums[mid + 1];\n\t\t\t}\n\t\t\t// Assert nums[mid] < nums[mid + 1] (no duplicates)\n\n\t\t\t// nums[mid - 1] could cause array index out of bound when the target is the\n\t\t\t// first element or\n\t\t\t// the second element.\n\t\t\t// However, for this problem, the code above returns when mid is equal to 0.\n\t\t\t// To be exact, when you use R = M - 1 version, mid is approaching index 0 as\n\t\t\t// the following:\n\t\t\t// 1. 2 -> 0 -> 1\n\t\t\t// 2. 3 -> 1 -> 0\n\t\t\t// ex) 1. [ 5, 1, 2, 3, 4 ], 2. [ 6, 1, 2, 3, 4, 5]\n\t\t\t// For case 1, the code above returns when mid is equal to 0, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t// For case 2, the code below returns when mid is equal to 1, and nums[-1] never\n\t\t\t// occurs.\n\t\t\t//\n\t\t\t// Be careful!\n\t\t\t// Not rotated array can cause nums[-1] here for both of the two cases above\n\t\t\t// because\n\t\t\t// the code above does not return when mid is equal to 0, which causes index out\n\t\t\t// of bound here.\n\t\t\t// So, eliminate this case in advance.\n\t\t\tif (nums[mid - 1] > nums[mid]) {\n\t\t\t\treturn nums[mid];\n\t\t\t}\n\n\t\t\t// If the mid does not hit the valley, then keep searching.\n\t\t\t// I don't know why nums[mid] > nums[0] is ok in the LeetCode solution yet.\n\t\t\t// (No need to explore any further)\n\t\t\tif (nums[mid] > nums[left]) {\n\t\t\t\t// The min is in the right subarray.\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\t// The min is in the left subarray.\n\t\t\t\tright = mid - 1;\n\t\t\t\t// right = mid; // NG! (R = M version)\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "private Root compareRoots(ArrayList<Root> touchRoots, ArrayList<Coord> circs) {\n\t\tfor (Root r: touchRoots) {\n\t\t\tif (r.isSeed) {\n\t\t\t\tfor(Root touch:touchRoots) {\n\t\t\t\t\ttouch.touchseed = true;\n\t\t\t\t}\n\t\t\t\treturn r;\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Determine if one of the roots started at a very close z-value\n\t\t * and do not choose this one (this would occur with lateral roots).\n\t\t */\n\t\tint z = circs.get(0).z;\n\t\tArrayList<Root> smallRoot = new ArrayList<Root>();\n\t\tfor (Root r:touchRoots) {\n\t\t\tif (z-r.firstZ < 10) {\n\t\t\t\tsmallRoot.add(r);\n\t\t\t}\n\t\t}\n\t\tif (touchRoots.size()-smallRoot.size() == 1) {\n\t\t\ttouchRoots.removeAll(smallRoot);\n\t\t\treturn touchRoots.get(0);\n\t\t}\n\t\telse if(touchRoots.size() > smallRoot.size()) {\n\t\t\ttouchRoots.removeAll(smallRoot);\n\t\t}\n\n\t\t/*\n\t\t * If there is still more than one root that is touching, score\n\t\t * each root based on the amount of voxels in the root that touch\n\t\t * the voxels in the blob. Return the one with the highest score.\n\t\t * \n\t\t */\n\t\tint maxScore = 0;\n\t\tArrayList<Root> best = new ArrayList<Root>();\n\t\tfor (Root r:touchRoots) {\n\t\t\tint rootScore = 0;\n\t\t\tfor (Coord c1:r.lastLevel) {\n\t\t\t\tfor (Coord c2:circs){\n\t\t\t\t\tif (isTouching(c1,c2)) {\n\t\t\t\t\t\trootScore++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rootScore > maxScore) {\n\t\t\t\tmaxScore = rootScore;\n\t\t\t\tbest.clear();\n\t\t\t\tbest.add(r);\n\t\t\t}\n\t\t\telse if(rootScore == maxScore) {\n\t\t\t\tbest.add(r);\n\t\t\t}\n\t\t}\n\n\t\tif(best.size() == 1) {\n\t\t\treturn best.get(0);\n\t\t}\n\t\t/*\n\t\t * If two roots have the same score (very unlikely) return the \n\t\t * larger root.\n\t\t */\n\t\telse{\n\t\t\tint maxSize = 0;\n\t\t\tRoot ro = best.get(0);\n\t\t\tfor(Root r:best) {\n\t\t\t\tif(r.lastLevel.size() > maxSize) {\n\t\t\t\t\tmaxSize = r.lastLevel.size();\n\t\t\t\t\tro = r;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn ro;\n\t\t}\n\t}", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length && !found; i++) {\n for(int j = 0; j < A[0].length && !found; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "public static MLEPoint hillClimbSearch(MLEPoint point, MleLikelihoodCache mleCache, double[] T) {\n\n // init the MLE points\n MLEPoint temp = new MLEPoint(point.getPIuni(), point.getMu(), point.getSigma(), Double\n .NEGATIVE_INFINITY);\n\n boolean done = false;\n while (!done) {\n // Check each direction and move based on highest correlation\n for (HillClimbDirection dir : HillClimbDirection.values()) {\n // Skip NoMove direction\n if (dir == HillClimbDirection.NoMove)\n continue;\n\n // get the new MLE Point given the 3D hill climb direction\n int p = point.getPIuni() + dir.getPDir();\n int m = point.getMu() + dir.getMDir();\n int s = point.getSigma() + dir.getSDir();\n\n // Check if this point is within the search bounds\n if (p > 0 && p < 100 && m > 0 && m < 100 && s > 0 && s < 100) {\n // check cache to see if this likelihood has previously been computed\n double l = Double.NaN;\n if (mleCache != null)\n l = mleCache.getLikelihood(p, m, s);\n\n // if this value has not been computed\n if (Double.isNaN(l)) {\n // compute the likelihood\n l = computeMleLikelihood(T, p, m, s);\n // add it to the shared cache\n if (mleCache != null)\n mleCache.setLikelihood(p, m, s, l);\n }\n\n // if the new likelihood is better than the best local one so far record it\n if (l > temp.getLikelihood()) {\n temp.setPIuni(p);\n temp.setMu(m);\n temp.setSigma(s);\n temp.setLikelihood(l);\n }\n }\n }\n\n // if the best local neighborhood point is better that the current global best\n if (Double.isNaN(point.getLikelihood()) || temp.getLikelihood() > point.getLikelihood()) {\n // record current best\n point.setPIuni(temp.getPIuni());\n point.setMu(temp.getMu());\n point.setSigma(temp.getSigma());\n point.setLikelihood(temp.getLikelihood());\n } else {\n done = true;\n }\n }\n\n return point;\n }", "private static Coord findCoordinate(Coord p0, Coord p1, Coord p2, double r0, double r1, double r2){\r\n\r\n\tdouble x0, y0, x1, y1, x2, y2;\r\n\tx0 = p0.getX(); y0 = p0.getY();\r\n\tx1 = p1.getX(); y1 = p1.getY();\r\n\tx2 = p2.getX(); y2 = p2.getY();\r\n\t//core.Debug.p(\"x0:\" + x0 + \",y0:\" + y0 + \",r0:\" + r0);\r\n\t//core.Debug.p(\"x1:\" + x1 + \",y1:\" + y1 + \",r1:\" + r1);\r\n\t//core.Debug.p(\"x2:\" + x2 + \",y2:\" + y2 + \",r2:\" + r2);\r\n\tdouble a, dx, dy, d, h, rx, ry;\r\n\tdouble point2_x, point2_y;\r\n\r\n\t/* dx and dy are the vertical and horizontal distances between\r\n\t * the circle centers.\r\n\t */\t\r\n\tdx = x1 - x0;\r\n\tdy = y1 - y0;\r\n\r\n\t/* Determine the straight-line distance between the centers. */\r\n\td = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t/* Check for solvability. */\r\n\tif (d > (r0 + r1)){\r\n\t\t/* no solution. circles do not intersect. */\r\n\t\t//core.Debug.p(\"no solution1\");\r\n\t\treturn null;\r\n\t}\r\n\tif (d < Math.abs(r0 - r1)){\r\n\t\t/* no solution. one circle is contained in the other */\r\n\t\t//core.Debug.p(\"no solution2\");\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/* 'point 2' is the point where the line through the circle\r\n\t * intersection points crosses the line between the circle\r\n\t * centers.\r\n\t */\r\n\r\n\t/* Determine the distance from point 0 to point 2. */\r\n\ta = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ;\r\n\r\n\t/* Determine the coordinates of point 2. */\r\n\tpoint2_x = x0 + (dx * a/d);\r\n\tpoint2_y = y0 + (dy * a/d);\r\n\r\n\t/* Determine the distance from point 2 to either of the\r\n\t * intersection points.\r\n\t */\t\r\n\th = Math.sqrt((r0*r0) - (a*a));\r\n\r\n\t/* Now determine the offsets of the intersection points from\r\n\t * point 2.\r\n\t */\r\n\trx = -dy * (h/d);\r\n\try = dx * (h/d);\r\n\r\n\t/* Determine the absolute intersection points. */\r\n\tdouble intersectionPoint1_x = point2_x + rx;\r\n\tdouble intersectionPoint2_x = point2_x - rx;\r\n\tdouble intersectionPoint1_y = point2_y + ry;\r\n\tdouble intersectionPoint2_y = point2_y - ry;\r\n\r\n\t/* Lets determine if circle 3 intersects at either of the above intersection points. */\r\n\tdx = intersectionPoint1_x - x2;\r\n\tdy = intersectionPoint1_y - y2;\r\n\tdouble d1 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\tdx = intersectionPoint2_x - x2;\r\n\tdy = intersectionPoint2_y - y2;\r\n\tdouble d2 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t//core.Debug.p(\"d1: \" + d1 + \", d2: \" + d2 + \", r2: \" + r2);\r\n\t//core.Debug.p(\"diff1: \" + Math.abs(d1-r2));\r\n\t//core.Debug.p(\"point1: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t//core.Debug.p(\"diff2: \" + Math.abs(d2-r2));\r\n\t//core.Debug.p(\"point2: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\r\n\r\n\tif(Math.abs(d1 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t\treturn new Coord(intersectionPoint1_x, intersectionPoint1_y);\r\n\t}\r\n\telse if(Math.abs(d2 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\t\treturn new Coord(intersectionPoint2_x, intersectionPoint2_y);}\r\n\telse {\r\n\t\t//core.Debug.p(\"no intersection\");\r\n\t\treturn null;\r\n\t}\r\n}", "public int findSmallest(){\n\tint smallest = 0;\n\tint smallestVal = 0;\n\tint place = 0;\n\tif (size > 0){\n\t place = head+1;\n\t if (place == nums.length){\n\t\tplace = 0;\n\t }\n\t smallest = place;\n\t smallestVal = nums[place];\n\t if (place <= tail){\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }else{\n\t\twhile(place >= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t\tbreak;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t\twhile (place <= tail){\n\t\t if (place == nums.length){\n\t\t\tplace = 0;\n\t\t }\n\t\t if (nums[place] < smallestVal){\n\t\t\tsmallest = place;\n\t\t\tsmallestVal = nums[place];\n\t\t }\n\t\t place++;\n\t\t}\n\t }\n\t}\n return smallest;\n }", "public abstract IAttackable getEnemyInSearchArea(ShortPoint2D centerPos, IAttackable movable, short minSearchRadius, short maxSearchRadius,\n\t\t\t\t\t\t\t\t\t\t\t\t\t boolean includeTowers);", "public Coordinate getClosestCoordinateAround(Coordinate centeredCoordinate) {\n Set<Coordinate> allCellsAsCoordinates = getAllSurroundingCellsAsCoordinates();\n Coordinate closest = allCellsAsCoordinates\n .stream()\n .min((c1, c2) ->\n Float.compare(c1.distance(centeredCoordinate), c2.distance(centeredCoordinate))\n )\n .get();\n return closest;\n }", "static boolean betterCenter(double r,double g, double b, float center[],float best_center[]){\n\n float distance = (float) ((r-center[0])*(r-center[0]) + (g-center[1])*(g-center[1]) + (b-center[2])*(b-center[2]));\n\n float distance_best = (float) ((r-best_center[0])*(r-best_center[0]) + (g-best_center[1])*(g-best_center[1]) + (b-best_center[2])*(b-best_center[2]));\n\n\n if(distance < distance_best)\n return true;\n else\n return false;\n\n\n }", "public Point getFurthermost(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMin = Double.MAX_VALUE;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint closest = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance < distanceMin){\n\t\t\t\t\tdistanceMin = distance;\n\t\t\t\t\tclosest = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn closest;\n\t\t}", "public int findLeast() {\r\n\tint cor = 0;\r\n\tint x = 9;\r\n\tfor (int r = 0; r < 9; r++) {\r\n\t for (int c = 0; c < 9; c++) {\r\n\t\tif (!board[r][c].getIsDef()) {\r\n\t\t if (board[r][c].getNumPossible() == 2) {\r\n\t\t\treturn r*10 + c;\r\n\t\t }\r\n\t\t if (board[r][c].getNumPossible() < x) {\r\n\t\t\tcor = r*10 + c;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn cor;\r\n }", "static double bSearchSqrt(double t){\n\t\tdouble l = 0.0, r = t, res = -1.0;\n\t\twhile(Math.abs(r - l) > 1e-7){ //guaranteed 6 \"good\" digits\n\t\t\tdouble m = l + (r - l) / 2.0;\n\t\t\tif(m * m <= t){\n\t\t\t\tl = m;\n\t\t\t\tres = m;\n\t\t\t}else{\n\t\t\t\tr = m;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "public List<T> nearestNeighborsInRadiusNaive(double r, HasCoordinates searchPos)\n throws IllegalArgumentException {\n if (r < 0) {\n throw new IllegalArgumentException(\"ERROR: Radius must be \"\n + \"a positive integer\");\n }\n List<T> pointsCopy = new ArrayList<>(points);\n Collections.shuffle(pointsCopy);\n\n pointsCopy.removeIf(p -> searchPos.dist(p) > r);\n\n Collections.sort(pointsCopy, new PointComparator(searchPos));\n\n return pointsCopy;\n }", "private double findOuterRadius(double x, double y) {\n\t\tdouble dX = (lastClick.getX() - x);\n\t\tdouble dY = (lastClick.getY() - y);\n\t\tdouble dSquared = Math.pow(dX, 2) + Math.pow(dY, 2);\n\t\tdouble r = Math.sqrt(dSquared)/2.0;\n\t\tif (dX > 0) r = -r;\n\t\treturn r;\n\t}", "private Point[] nearestPairRec(Point[] range, boolean axis) {\n\t\t\tPoint[] Answer = new Point[2];\n\t\t\tif (range.length < 4) return nearestPair3Points(range);\n\t\t\tPoint[] MinPointsLeft = new Point[2];\n\t\t\tPoint[] MinPointsRight = new Point[2];\n\t\t\tPoint[] MinPointsInStrip = new Point[2];\n\t\t\tdouble MinDistance = -1; //it will be change for sure, because we pass the array only if it containes 4 points and above.\n\t\t\tdouble MinDistanceInStrip;\n\t\t\t//step 4\n\t\t\tif (axis){\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getX(), range[(range.length)/2].getX(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getX(), range[range.length-1].getX() ,axis), axis);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tMinPointsLeft = nearestPairRec(getPointsInRangeRegAxis(range[0].getY(), range[(range.length)/2].getY(), axis), axis);\n\t\t\t\tMinPointsRight =nearestPairRec(getPointsInRangeRegAxis(range[((range.length)/2)+1].getY(), range[range.length-1].getY() ,axis), axis);\n\t\t\t}\n\t\t\t//step 5\n\t\t\tif (MinPointsLeft!=null && MinPointsRight!=null){\n\t\t\t\tif (Distance(MinPointsLeft[0], MinPointsLeft[1]) > Distance(MinPointsRight[0], MinPointsRight[1])){\n\t\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\t\tAnswer = MinPointsRight;\n\t\t\t\t}else{\n\t\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t\t}\n\t\t\t}else if (MinPointsLeft!=null && MinPointsRight==null) {\n\t\t\t\tMinDistance = Distance(MinPointsLeft[0], MinPointsLeft[1]);\n\t\t\t\tAnswer = MinPointsLeft;\n\t\t\t}else if (MinPointsRight!=null && MinPointsLeft==null){\n\t\t\t\tMinDistance = Distance(MinPointsRight[0], MinPointsRight[1]);\n\t\t\t\tAnswer = MinPointsRight;\n\t\t\t}\n\t\t\t//step 6 find the nearest point around the median\n\t\t\tint upper;\n\t\t\tint lower;\n\t\t\tif (MinDistance==-1) MinDistance = 0;\n\t\t\tif (axis){\n\t\t\t\tupper = (int) (range[(range.length)/2].getX()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getX()-MinDistance);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tupper = (int) (range[(range.length)/2].getY()+MinDistance);\n\t\t\t\tlower = (int) (range[(range.length)/2].getY()-MinDistance);\n\t\t\t}\n\t\t\trange = getPointsInRangeOppAxis(lower, upper, axis);\n\t\t\tif (range.length>=2) MinPointsInStrip = nearestPointInArray(range);\n\t\t\tif (MinPointsInStrip[0]!=null){\n\t\t\t\tMinDistanceInStrip = Distance(MinPointsInStrip[0], MinPointsInStrip[1]);\n\t\t\t\tif (MinDistanceInStrip < MinDistance) return MinPointsInStrip;\n\t\t\t}\n\t\t\treturn Answer;\n\t\t}", "public Set<? extends Position> findNearest(Position position, int k);", "private int findCoordElementContiguous(double target, boolean bounded) {\n int n = orgGridAxis.getNcoords();\n\n // Check that the point is within range\n MinMax minmax = orgGridAxis.getCoordEdgeMinMax();\n if (target < minmax.min()) {\n return bounded ? 0 : -1;\n } else if (target > minmax.max()) {\n return bounded ? n - 1 : n;\n }\n\n int low = 0;\n int high = n - 1;\n if (orgGridAxis.isAscending()) {\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, true, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n low = mid;\n else\n high = mid;\n }\n return intervalContains(target, low, true, false) ? low : high;\n\n } else { // descending\n // do a binary search to find the nearest index\n int mid;\n while (high > low + 1) {\n mid = (low + high) / 2; // binary search\n if (intervalContains(target, mid, false, false))\n return mid;\n else if (orgGridAxis.getCoordEdge2(mid) < target)\n high = mid;\n else\n low = mid;\n }\n return intervalContains(target, low, false, false) ? low : high;\n }\n }", "@Override\r\n\tpublic List<GeoPoint> findIntersections(Ray ray) {\r\n\t\tList<GeoPoint> list = new ArrayList<GeoPoint>();\r\n\t\tVector rayDirection = ray.getDirection();\r\n\t\tPoint3D rayPoint = ray.getPOO();\r\n\r\n\t\t// case centerPoint same as the RayPoint\r\n\t\tif (centerPoint.equals(rayPoint)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(radius))));\r\n\t\t\treturn list;\r\n\t\t}\r\n\r\n\t\t// u = centerPoint - rayPoint\r\n\t\tVector u = centerPoint.subtract(rayPoint);\r\n\t\t// tm = u * rayDirection\r\n\t\tdouble tm = rayDirection.dotProduct(u);\r\n\t\t// distance = sqrt(|u|^2 - tm^2)\r\n\t\tdouble d = Math.sqrt(u.dotProduct(u) - tm * tm);\r\n\t\t// case the distance is bigger than radius no intersections\r\n\t\tif (d > radius)\r\n\t\t\treturn list;\r\n\r\n\t\t// th = sqrt(R^2 - d^2)\r\n\t\tdouble th = Math.sqrt(radius * radius - d * d);\r\n\r\n\t\tdouble t1 = tm - th;\r\n\t\tdouble t2 = tm + th;\r\n\r\n\t\tif (Util.isZero(t1) || Util.isZero(t2)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint));\r\n\t\t}\r\n\t\tif (Util.isZero(th)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(tm))));\r\n\t\t} else {\r\n\t\t\tif (t1 > 0 && !Util.isZero(t1))// one\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t1))));\r\n\t\t\tif (t2 > 0 && !Util.isZero(t2)) {// two\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t2))));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}", "private static Pair closest_pair(ArrayList<Point> pointset){\n\t\treturn null;\n\t}", "private Cell searchEmptySurrounding(){\n List <Cell> blocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n for (Cell block : blocks){\n if(!isCellOccupied(block)) return block;\n }\n return null;\n }", "public Point2D nearest(Point2D p) {\n \n if (p == null)\n throw new IllegalArgumentException(\"Got null object in nearest()\");\n \n double rmin = 2.;\n Point2D pmin = null;\n \n for (Point2D q : point2DSET) {\n \n double r = q.distanceTo(p);\n if (r < rmin) {\n \n rmin = r;\n pmin = q;\n }\n }\n return pmin;\n }", "public abstract Proximity2DResult[] getNearestVertices(Geometry geom,\n\t\t\tPoint inputPoint, double searchRadius, int maxVertexCountToReturn);", "Double getMinCurvatureRadius();", "private static double[][] makeRegularPoly(double centerLat, double centerLon, double radiusMeters, int gons) {\n\n double[][] result = new double[2][];\n result[0] = new double[gons+1];\n result[1] = new double[gons+1];\n for(int i=0;i<gons;i++) {\n double angle = i*(360.0/gons);\n double x = Math.cos(Math.toRadians(angle));\n double y = Math.sin(Math.toRadians(angle));\n double factor = 2.0;\n double step = 1.0;\n int last = 0;\n\n //System.out.println(\"angle \" + angle + \" slope=\" + slope);\n // Iterate out along one spoke until we hone in on the point that's nearly exactly radiusMeters from the center:\n while (true) {\n double lat = centerLat + y * factor;\n GeoUtils.checkLatitude(lat);\n double lon = centerLon + x * factor;\n GeoUtils.checkLongitude(lon);\n double distanceMeters = SloppyMath.haversinMeters(centerLat, centerLon, lat, lon);\n\n //System.out.println(\" iter lat=\" + lat + \" lon=\" + lon + \" distance=\" + distanceMeters + \" vs \" + radiusMeters);\n if (Math.abs(distanceMeters - radiusMeters) < 0.1) {\n // Within 10 cm: close enough!\n result[0][i] = lat;\n result[1][i] = lon;\n break;\n }\n\n if (distanceMeters > radiusMeters) {\n // too big\n //System.out.println(\" smaller\");\n factor -= step;\n if (last == 1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = -1;\n } else if (distanceMeters < radiusMeters) {\n // too small\n //System.out.println(\" bigger\");\n factor += step;\n if (last == -1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = 1;\n }\n }\n }\n\n // close poly\n result[0][gons] = result[0][0];\n result[1][gons] = result[1][0];\n\n return result;\n }", "private static MapLocation getBestPastrLocNearMeBasedOnCowGrowthRate() {\n\t\tif (Clock.getRoundNum() < 1) {\n\t\t\tallCowGrowths = rc.senseCowGrowth();\t\t\t\n\t\t}\n\t\tMapLocation bestLocation = new MapLocation(curLoc.x, curLoc.y);\n\t\tdouble cowGrowthAmount = 0;\n\t\tMapLocation enemyHQLocation = rc.senseEnemyHQLocation();\n\t\tdouble distanceToEnemyHQ = curLoc.distanceSquaredTo(enemyHQLocation);\n\t\tfor (int i = 15; i-- > 0;) {\n\t\t\tfor (int j = 15; j-- > 0;) {\n\t\t\t\t// Check that it's in bounds\n\t\t\t\tif (curLoc.x - i + 8 >= 0 && curLoc.x - i + 8 < rc.getMapWidth() &&\n\t\t\t\t\tcurLoc.y - j + 8 >= 0 && curLoc.y - j + 8 < rc.getMapHeight()) {\n\t\t\t\t\tMapLocation mapLoc = new MapLocation(curLoc.x - i + 8, curLoc.y - j + 8);\n\t\t\t\t\tdouble currentLocGrowth = allCowGrowths[curLoc.x - i + 8][curLoc.y - j + 8];\n\n\t\t\t\t\t// Check that it's behind a perpendicular line and not void\n\t\t\t\t\t// and choose the best point.\n\t\t\t\t\tif (mapLoc.distanceSquaredTo(enemyHQLocation) < distanceToEnemyHQ &&\n\t\t\t\t\t\tcurrentLocGrowth > cowGrowthAmount && rc.senseTerrainTile(mapLoc) != TerrainTile.VOID) {\n\t\t\t\t\t\tcowGrowthAmount = currentLocGrowth;\n\t\t\t\t\t\tbestLocation = mapLoc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn bestLocation;\n\t}", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "private int minFind(int[] nums, int lo, int hi){\n if (lo+1 >= hi) return Math.min(nums[lo], nums[hi]);\n // sorted. we return the minimum element.\n // to tell it is sorted or not, we need nums[lo] less than nums[hi], they cannot be equal.\n if (nums[lo] < nums[hi]) return nums[lo];\n // unsorted\n int mid = lo + (hi-lo)/2;\n // avoid overflow\n\n return Math.min(minFind(nums, lo, mid-1), minFind(nums, mid, hi));\n }", "private Point findTopLeftCornerPoint() {\n return new Point(origin.getX(), origin.getY() + width);\n }", "private int binarySearchLeft(int[] nums, int target) {\n \tint low=0;\n int high=nums.length-1;\n\n while(low<=high){\n int mid=low+(high-low)/2;\n if (nums[mid]==target){\n if(mid==0||nums[mid-1]<nums[mid]){\n return mid;\n }\n else{\n high=mid-1;\n }\n }\n else if(nums[mid]>target){\n high=mid-1;\n }\n else{\n low=mid+1;\n }\n \n }\n\t\treturn -1;\n\t}", "static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }", "private int guessRoundedSegments(float radius) {\n\t\tint segments;\n\t\tif (radius < 4)\n\t\t\tsegments = 0;\n\t\telse if (radius < 10)\n\t\t\tsegments = 2;\n\t\telse\n\t\t\tsegments = 4;\n\t\treturn segments;\n\t}", "private double findCenterRadius(double x, double y) {\n\t\tdouble dX = Math.abs(lastClick.getX() - x);\n\t\tdouble dY = Math.abs(lastClick.getY() - y);\n\t\tdouble dSquared = Math.pow(dX, 2) + Math.pow(dY, 2);\n\t\tdouble r = Math.sqrt(dSquared) / 2.0;\n\t\treturn r;\n\t}", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "public int getOptimalNumNearest();", "public int lowerBound(final List<Integer> a, int target){\n int l = 0, h = a.size()-1;\n while(h - l > 3){\n int mid = (l+h)/2;\n if(a.get(mid) == target)\n h = mid;\n else if(a.get(mid) < target){\n l = mid + 1;\n }\n else if(a.get(mid) > target){\n h = mid - 1;\n }\n }\n for(int i=l; i<=h; ++i){\n if(a.get(i) == target)\n return i;\n }\n return -1;\n }", "private int binarySearchToFindClosest(String overflowName, int bottomRecord, int topRecord) {\n // Base condition for only having two records left to choose from\n if (topRecord - bottomRecord == 1) {\n String topRecordName = getRecordCompanyName(\"normal\", topRecord);\n\n // If the name of the overflow company comes after the company name of the top record, then the top record is the closest\n if (overflowName.compareTo(topRecordName) >= 1) {\n return topRecord;\n // Otherwise, either the top and bottom records are equal length away, or the bottom record is closer, so return the bottom record\n } else {\n return bottomRecord;\n }\n // Base condition for having only 1 record left means that that record is the closest\n } else if (topRecord == bottomRecord) {\n return topRecord;\n }\n\n int middle = (topRecord + bottomRecord) / 2;\n String nameOfNormalRecord = getRecordCompanyName(\"normal\", middle);\n int alphabeticalOrder = overflowName.compareTo(nameOfNormalRecord);\n if (alphabeticalOrder == 0) {\n return middle;\n } else if (alphabeticalOrder < 0) {\n return binarySearchToFindClosest(overflowName, bottomRecord, middle);\n } else {\n return binarySearchToFindClosest(overflowName, middle + 1, topRecord);\n } \n }", "public Point2D nearest(Point2D p) {\n if (isEmpty()) {\n return null;\n }\n double minDistance = Double.POSITIVE_INFINITY;\n Point2D nearest = null;\n for (Point2D i : pointsSet) {\n if (i.distanceTo(p) < minDistance) {\n nearest = i;\n minDistance = i.distanceTo(p);\n }\n }\n return nearest;\n\n }", "public Point2D nearest(Point2D p) {\n\t\tRectHV rect = new RectHV(-Double.MAX_VALUE, -Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE);\n\t\treturn nearest(root, p, rect, true);\n\t}", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "public boolean adjoinsCircleExclusive(DecimalPosition center, int radius) {\n double distanceX = Math.abs(center.getX() - (double) center().getX());\n double distanceY = Math.abs(center.getY() - (double) center().getY());\n\n if (distanceX > (width() / 2 + radius)) {\n return false;\n }\n if (distanceY > (height() / 2 + radius)) {\n return false;\n }\n\n if (distanceX <= (width() / 2)) {\n return true;\n }\n if (distanceY <= (height() / 2)) {\n return true;\n }\n\n double squaredCornerDistance = Math.pow((distanceX - width() / 2), 2) + Math.pow((distanceY - height() / 2), 2);\n\n return squaredCornerDistance <= Math.pow(radius, 2);\n }", "synchronized protected int findClosestSegment(final int x_p, final int y_p, final long layer_id, final double mag) {\n\t\tif (1 == n_points) return -1;\n \t\tif (0 == n_points) return -1;\n \t\tint index = -1;\n \t\tdouble d = (10.0D / mag);\n \t\tif (d < 2) d = 2;\n \t\tdouble sq_d = d*d;\n \t\tdouble min_sq_dist = Double.MAX_VALUE;\n \t\tfinal Calibration cal = layer_set.getCalibration();\n \t\tfinal double z = layer_set.getLayer(layer_id).getZ() * cal.pixelWidth;\n \n \t\tdouble x2 = p[0][0] * cal.pixelWidth;\n \t\tdouble y2 = p[1][0] * cal.pixelHeight;\n \t\tdouble z2 = layer_set.getLayer(p_layer[0]).getZ() * cal.pixelWidth;\n \t\tdouble x1, y1, z1;\n \n \t\tfor (int i=1; i<n_points; i++) {\n \t\t\tx1 = x2;\n \t\t\ty1 = y2;\n \t\t\tz1 = z2;\n \t\t\tx2 = p[0][i] * cal.pixelWidth;\n \t\t\ty2 = p[1][i] * cal.pixelHeight;\n \t\t\tz2 = layer_set.getLayer(p_layer[i]).getZ() * cal.pixelWidth;\n \n \t\t\tdouble sq_dist = M.distancePointToSegmentSq(x_p * cal.pixelWidth, y_p * cal.pixelHeight, z,\n \t\t\t\t\t x1, y1, z1,\n \t\t\t\t\t\t\t\t x2, y2, z2);\n \n \t\t\tif (sq_dist < sq_d && sq_dist < min_sq_dist) {\n \t\t\t\tmin_sq_dist = sq_dist;\n \t\t\t\tindex = i-1; // previous\n \t\t\t}\n \t\t}\n \t\treturn index;\n \t}", "@Override\n public List<GeoPoint> findGeoIntersections(Ray ray , double maxDistance) {\n Point3D P0 = ray.getP0();\n Vector v = ray.getDir();\n\n if (P0.equals(_center)) {\n return List.of(new GeoPoint(this,_center.add(v.scale(_radius))));\n }\n\n Vector U = _center.subtract(P0);\n\n double tm = alignZero(v.dotProduct(U));\n double d = alignZero(Math.sqrt(U.lengthSquared() - tm * tm));\n\n // no intersections : the ray direction is above the sphere\n if (d >= _radius) {\n return null;\n }\n\n double th = alignZero(Math.sqrt(_radius * _radius - d * d));\n double t1 = alignZero(tm - th);\n double t2 = alignZero(tm + th);\n boolean validT1=alignZero(t1 - maxDistance ) <=0;\n boolean validT2=alignZero( t2 - maxDistance )<=0;\n if (t1>0 && t2>0 && validT1 && validT2) {\n Point3D P1 =ray.getPoint(t1);\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P1),new GeoPoint(this, P2));\n }\n if (t1>0 && validT1){\n Point3D P1 =ray.getPoint(t1);\n return List.of(new GeoPoint(this,P1));\n }\n if (t2>0 && validT2) {\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P2));\n }\n return null;\n }", "private Point[] nearestPointInArray(Point[] strip){\n\t\tint j = 1; // with each point we measure the distance with the following 6 point's\n\t\tPoint[] currentMinPoints = {strip[0],strip[1]};\n\t\tdouble currentMinDistance = Distance(currentMinPoints[0], currentMinPoints[1]);\n\t\tdouble currentDistance;\t\n\t\tfor (int i=0; i< strip.length; i++){\n\t\t\twhile (j<8 && i+j < strip.length){\n\t\t\t\tcurrentDistance = Distance(strip[i], strip[i+j]);\n\t\t\t\tif (currentDistance<currentMinDistance){\n\t\t\t\t\tcurrentMinDistance = currentDistance;\n\t\t\t\t\tcurrentMinPoints[0] = strip[i];\n\t\t\t\t\tcurrentMinPoints[1] = strip[i+j];\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tj=1;\n\t\t}\n\t\treturn currentMinPoints;\n\t}", "private int nearestPrime(int newTableLength)\n {\n int nearestPrimeTableLength = newTableLength;\n for (int i = 2; i < Integer.MAX_VALUE; i++)\n {\n if (isPrime(i) && i >= newTableLength)\n {\n nearestPrimeTableLength = i;\n break;\n }\n }\n return nearestPrimeTableLength;\n }", "public static int[] getMinKthNearestN(double[][] pts, int k){\n if(k>= pts.length){\n int[] indexs = new int[k];\n for(int i = 0;i<indexs.length;i++){\n indexs[i] = i;\n }\n return indexs;\n }\n\n double[][] distanceTo = new double[pts.length][pts.length];\n int[][] indexs = new int[pts.length][pts.length];\n for(int i = 0; i<pts.length;i++){\n for(int j = 0; j<pts.length;j++){\n indexs[i][j] = j;\n distanceTo[i][j] = Math.pow(pts[i][0] - pts[j][0],2)+Math.pow(pts[i][1] - pts[j][1],2);\n }\n }\n\n\n for(int i = 0; i<pts.length;i++){\n iSort(indexs[i],distanceTo[i]);\n }\n\n double minKthNearestN = Double.POSITIVE_INFINITY;\n int pos = -1;\n for(int i = 0; i<pts.length;i++){\n if(distanceTo[i][k] < minKthNearestN){\n minKthNearestN = distanceTo[i][k];\n pos = i;\n }\n }\n int[] space = new int[k+1];\n for(int i = 0; i<=k; i++){\n space[i] = indexs[pos][i];\n }\n\n return space;\n }", "public static double BruteForceClosestPairs(ArrayList<Point> P) {\n\n\t\t//Assume closest distance is very large\n\t\tdouble distance = Double.POSITIVE_INFINITY;\n\t\t//Size of Arraylist\n\t\tint size = P.size();\n\t\t// New minimum \n\t\tdouble distchange = 0.0;\n\n\t\tfor (int i = 0; i < size - 1; i++) {\n\t\t\tfor (int j = i + 1; j < size; j++) {\n\n\t\t\t\tdistchange = distance;\n\t\t\t\t// Calculate distance between two points\n\t\t\t\tdistance = Math.min(Math.sqrt(Math.pow(P.get(i).getX() - P.get(j).getX(), 2) \n\t\t\t\t\t\t + Math.pow(P.get(i).getY() - P.get(j).getY(), 2)), distance);\n\t\t\t\t\n\t\t\t\tif (distchange != distance) {\n\t\t\t\t\t// If a new min was found, assign the new points \n\t\t\t\t\t// used for output to get \"coordinates of closest pair\"\n\t\t\t\t\tcoordinatepairs = \"(\" + P.get(i).getX() + \", \" + P.get(i).getY()+ \"), \" +\n\t\t\t\t\t\t\t\t \"(\" + P.get(j).getX() + \", \" + P.get(j).getY() + \")\";\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn distance;\t\t\t\n\t}", "static float stripClosest(ArrayList<Point> strip, float d) \n\t{ \n\t float min = d; // Initialize the minimum distance as d \n\t \n\t //This loop runs at most 7 times \n\t for (int i = 0; i < strip.size(); ++i) \n\t for (int j = i+1; j < strip.size() && (strip.get(j).y - strip.get(i).y) < min; ++j) \n\t if (Dist(strip.get(i),strip.get(j)) < min) \n\t min = Dist(strip.get(i), strip.get(j)); \n\t \n\t return min; \n\t}", "public Point2D nearest(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"p cannot be null\");\n if (isEmpty()) return null;\n Point2D champ = root.p;\n champ = nearest(p, champ, root, inftyBbox);\n return champ;\n }", "private static int min(int[] arr, int i, int length, int r) {\n\n\t\tint mid = (i + length) / 2;\n\t\t\t\t\n\t\tif (i > length || i < 0)\n\t\t\treturn -1;\n\t\t\n\t\tif ((arr[mid] == r && mid == 0) || (arr[mid] == r && arr[mid - 1] < r))\n\t\t\treturn mid;\n\t\tif (arr[mid] >= r)\n\t\t\treturn min(arr, i, mid - 1, r);\n\t\telse\n\t\t\treturn min(arr, mid + 1, length, r);\n\t}", "private ArrayList<Point> calculateMidPoints() {\n ArrayList<Point> midPoints = new ArrayList<>();\n boolean isFirst = true; // Holds weather or not both points have been found yet.\n\n // Iterate over every point in the left and right lanes.\n for (int idx = 0; idx < leftLine.getLanePoints().size(); idx++) {\n Point leftPoint = leftLine.getLanePoints().get(idx); // The left point at the element idx.\n Point rightPoint = rightLine.getLanePoints().get(idx); // The right point at the element idx.\n int yValue = getCameraHeight() - (START_SEARCH + idx); // The y value of the left and right points.\n\n // If neither line is found, add a point at cameraWidth / 2, yValue\n if (leftPoint.isEmpty() && rightPoint.isEmpty()) {\n if (USE_NO_LANE_DETECTION) {\n midPoints.add(new Point(getCameraWidth() / 2, yValue));\n }\n // If Ony the right Point is found, add a point at the x rightPoint - road width / 2.\n } else if (leftPoint.isEmpty()) {\n midPoints.add(new Point(rightPoint.getX() - (calculateRoadWidth(yValue) / 2), yValue));\n // If Only the left Point is found, add a point at the x leftPoint + road width / 2.\n } else if (rightPoint.isEmpty()) {\n midPoints.add(new Point(leftPoint.getX() + (calculateRoadWidth(yValue) / 2), yValue));\n // If both lines are found, average the two lines.\n } else {\n midPoints.add(new Point((int) Math.round((leftPoint.getX() + rightPoint.getX()) / 2.0), yValue));\n // Set x1 and y1 to be the first Points to have lines on both sides.\n if (isFirst) {\n calcSlopePoint1.setX(Math.abs(leftPoint.getX() - rightPoint.getX()));\n calcSlopePoint1.setY(yValue);\n isFirst = false;\n // set x2 and y2 to be the last points to have lines on both sides.\n } else {\n calcSlopePoint2.setX(Math.abs(leftPoint.getX() - rightPoint.getX()));\n calcSlopePoint2.setY(yValue);\n }\n }\n }\n\n if (isReliable(calcSlopePoint1, calcSlopePoint2)) {\n slope = calculateRoadSlope(calcSlopePoint1, calcSlopePoint2);\n }\n return midPoints;\n }", "@Override\n public List<Obstacle> neighboursNearby(AbstractVehicle source, float radius) {\n List<Obstacle> neighbours = new ArrayList<Obstacle>();\n float r2 = radius * radius;\n Node n = source.flock != null ? source.flock : friendNode;\n for (Spatial s : n.getChildren())\n if (s instanceof Vehicle && !s.equals(source)) {\n Vehicle v = (Vehicle) s;\n float d = source.getWorldTranslation().subtract(v.getWorldTranslation()).lengthSquared();\n if (d < r2) // if it is within the radius\n if (source.flock != null && source.flock.has(v))\n neighbours.add(v.toObstacle());\n else if (source.flock == null)\n neighbours.add(v.toObstacle());\n }\n return neighbours;\n }", "public Money findMinPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney min = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (min.compareTo(current) == 1 || !flag) {\n\t\t\t\tmin = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t }\n\t\t}\n\t\treturn min;\n\t}", "List<Long> getBestSolIntersection();", "static int Floor(int[] arr, int target){\r\n int start = 0;\r\n int end = arr.length - 1;\r\n\r\n while(start <= end){\r\n //Find the middle element\r\n int mid = start + (end - start) / 2;\r\n if (target < arr[mid]){\r\n end = mid - 1;\r\n }else if (target > arr[mid]){\r\n start = mid + 1;\r\n }else {\r\n return mid;\r\n }\r\n }\r\n return start;\r\n }", "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "public Coordinates midPoint(Coordinates a, Coordinates b);", "public Point getClosest(){\n\t\t\tdouble distance;\n\t\t\tdouble distanceMax = 0.0;\n\t\t\tPoint centroid = centroid();\n\t\t\tPoint furthermost = new Point();\n\t\t\tfor(Point p : clusterPointsList){\n\t\t\t\tdistance = p.dist(centroid);\t\t\t\n\t\t\t\tif(distance > distanceMax){\n\t\t\t\t\tdistanceMax = distance;\n\t\t\t\t\tfurthermost = p;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn furthermost;\n\t\t}", "public static List<Point> ParetoOptimal(List<Point> listofPts)\n {\n \n if(listofPts.size() == 1 || listofPts.size() == 0)\n return listofPts;\n \n \n \n \n int pos = listofPts.size() /2 ;\n \n /*\n * quickSelect time complexity (n)\n */\n \n Point median = quickSelect(listofPts, pos, 0, listofPts.size() - 1); \n \n \n \n List<Point> points1 = new ArrayList<Point>();\n List<Point> points2 = new ArrayList<Point>();\n List<Point> points3 = new ArrayList<Point>();\n List<Point> points4 = new ArrayList<Point>();\n \n //O(n)\n if(oldMedian == median)\n {\n \t\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() <= median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n else\n {\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() < median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n //O(n)\n int yRightMax = -100000;\n for(int x= 0; x < points2.size(); x++)\n {\n if(points2.get(x).getY() > yRightMax)\n yRightMax = (int) points2.get(x).getY();\n \n }\n \n \n for(int x= 0; x < points1.size() ; x++)\n {\n if(points1.get(x).getY()> yRightMax)\n { \n points3.add(points1.get(x));\n \n } \n }\n \n for(int x= 0; x < points2.size() ; x++)\n {\n if(points2.get(x).getY() < yRightMax)\n {\n points4.add(points2.get(x));\n \n }\n \n }\n //System.out.println(\"points2: \" + points2);\n /*\n * Below bounded by T(n/c) + T(n/2) where c is ratio by which left side is shortened \n */\n oldMedian = median;\n return addTo \n ( ParetoOptimal(points3), \n ParetoOptimal(points2)) ;\n }", "private PointDist findNearest(Node curr, RectHV rect, PointDist minP, boolean Isx) {\n double currDist;\n PointDist p1;\n PointDist p2;\n // double currDist = findNearP.distanceSquaredTo(curr.point);\n /*\n if (currDist < pointDist.dist)\n minP = new PointDist(curr.point, currDist);\n else\n minP = pointDist;\n\n */\n if (Isx) {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), curr.point.x(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, false);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(curr.point.x(), rect.ymin(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, false);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n else {\n if (curr.left != null) {\n RectHV leftRect = new RectHV(rect.xmin(), rect.ymin(), rect.xmax(), curr.point.y());\n currDist = findNearP.distanceSquaredTo(curr.left.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.left.point, currDist);\n if (minP.dist > leftRect.distanceSquaredTo(findNearP)) {\n p1 = findNearest(curr.left, leftRect, minP, true);\n if (p1 != null)\n if (p1.dist < minP.dist)\n minP = p1;\n }\n }\n if (curr.right != null) {\n RectHV rightRect = new RectHV(rect.xmin(), curr.point.y(), rect.xmax(), rect.ymax());\n currDist = findNearP.distanceSquaredTo(curr.right.point);\n if (currDist < minP.dist)\n minP = new PointDist(curr.right.point, currDist);\n if (minP.dist > rightRect.distanceSquaredTo(findNearP)) {\n p2 = findNearest(curr.right, rightRect, minP, true);\n if (p2 != null)\n if (p2.dist < minP.dist)\n minP = p2;\n }\n }\n }\n return minP;\n }", "public static void main(String[] args) {\n int maxSolutions = 0;\r\n int bestPerimeter = 0;\r\n int[] perimeters = new int[1000];\r\n for (int a = 1; a <= 1000; a++) {\r\n for (int b = 1; b <= a; b++) {\r\n double c = Math.sqrt(a*a + b*b);\r\n if (c != (int)c) continue;\r\n int perimeter = a + b + (int)c;\r\n if (perimeter > 1000) break;\r\n perimeters[perimeter - 1]++;\r\n if (perimeters[perimeter - 1] > maxSolutions) {\r\n maxSolutions++;\r\n bestPerimeter = perimeter;\r\n }\r\n }\r\n }\r\n System.out.println(\"Best perimeter: \" + bestPerimeter);\r\n System.out.println(\"Solutions: \" + maxSolutions);\r\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "private int searchR(Searching[] array, int start, int half, int end, int value) {\n if (value > array[end].getValue() || value < array[start].getValue()) {\n return -1;\n }\n int a = end - start;\n int b = array[end].getValue() - array[start].getValue();\n int c = value - array[start].getValue();\n int d = (c * a) / b;\n int slide = d + start;\n if (slide > end || slide < start) {\n return -1;\n }\n if (array[slide].getValue() == value) {\n return slide;\n }\n if (value < array[slide].getValue()) {\n end = slide;\n return searchR(array, start, half, end, value);\n } else {\n start = slide;\n return searchR(array, start, half, end, value);\n }\n }", "@Override\n\tpublic List<Sector> solve() {\n\n\t\tQueue<TspNode> queue = new PriorityBlockingQueue<TspNode>(getInitialNodes());\n\n\t\t// start with max bound and no best path\n\t\tAtomicInteger bound = new AtomicInteger(Integer.MAX_VALUE);\n\t\tAtomicReference<List<Sector>> bestPath = new AtomicReference<>();\n\n\t\tConsumer<TspNode> nodeConsumer = node -> {\n\t\t\tsynchronized (bound) {\n\t\t\t\tif(node.getPath().size() == sectors.size() && node.getBound() < bound.get()) {\n\t\t\t\t\tbestPath.set(node.getPath());\n\t\t\t\t\tbound.set(node.getBound());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsectors.stream()\n\t\t\t\t.filter(s -> !node.getPath().isEmpty() && !node.getPath().contains(s))\n\t\t\t\t.map(s -> {\n\t\t\t\t\tList<Sector> newPath = new ArrayList<>(node.getPath());\n\t\t\t\t\tnewPath.add(s);\n\t\t\t\t\treturn new TspNode(newPath, getBoundForPath(newPath));\n\t\t\t\t})\n\t\t\t\t.filter(newNode -> newNode.getBound() <= bound.get())\n\t\t\t\t.forEach(queue::add);\n\t\t};\n\t\t\n\t\tSupplier<TspNode> nodeSupplier = () -> {\n\t\t\t\tsynchronized(queue){\n\t\t\t\t\treturn queue.isEmpty() ? new TspNode(new ArrayList<>(), Integer.MAX_VALUE) : queue.poll();\n\t\t\t\t}\n\t\t};\n\t\t\n\t\tStream.generate(nodeSupplier)\n\t\t\t.parallel()\n\t\t\t.peek(nodeConsumer)\n\t\t\t.filter(s -> s.getBound() > bound.get())\n\t\t\t.findAny();\n\t\t\n\t\t// if queue is empty and we haven't returned, then either we found no complete paths\n\t\t// (bestPath will be null), or the very last path we checked is the best path\n\t\t// (unlikely, but possible), in which case return it.\n\t\treturn bestPath.get();\n\t}", "static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }", "private GeoPoint getClosestPoint(List<GeoPoint> intersectionPoints) {\n Point3D p0 = scene.getCamera().getSpo();//the point location of the camera.\n double minDist = Double.MAX_VALUE;//(meatchelim ldistance hamaximily)\n double currentDistance = 0;\n GeoPoint pt = null;\n for (GeoPoint geoPoint : intersectionPoints) {\n currentDistance = p0.distance(geoPoint.getPoint());//checks the distance from camera to point\n if (currentDistance < minDist) {\n minDist = currentDistance;\n pt = geoPoint;\n }\n }\n return pt;\n }", "public abstract double getBoundingCircleRadius();", "public final Node getNearestNode(Point p) {\n double minDistanceSq = Double.MAX_VALUE;\n Node minPrimitive = null;\n for (Node n : getData().nodes) {\n if (n.deleted || n.incomplete)\n continue;\n Point sp = getPoint(n.eastNorth);\n double dist = p.distanceSq(sp);\n if (minDistanceSq > dist && dist < snapDistance) {\n minDistanceSq = p.distanceSq(sp);\n minPrimitive = n;\n }\n // prefer already selected node when multiple nodes on one point\n else if(minDistanceSq == dist && n.selected && !minPrimitive.selected)\n {\n minPrimitive = n;\n }\n }\n return minPrimitive;\n }", "public int indexOf(T t) {\n\n\t\t\tif (t instanceof String) {\n\t\t\t\tint x = Integer.parseInt((String) t);\n\t\t\t\tint middle = this.sortedList.size()/2;\n\t\t\t\t/*Set reference middle to be the center of the list\n\t\t\t\t*\tAs long as our middle reference doesn't correspond to the value we're looking for, move forward or backward depending on\n\t\t\t\t*\ton how the middle value compares to the value we want.\n\t\t\t\t*/\n\t\t\t\twhile (Integer.parseInt((String) this.sortedList.get(middle)) != x) {\n\t\t\t\t\tif(Integer.parseInt((String) this.sortedList.get(middle))>x) {\n\t\t\t\t\t\tmiddle = middle/2;\n\t\t\t\t\t}else if(Integer.parseInt((String) this.sortedList.get(middle))<x) {\n\t\t\t\t\t\tmiddle = middle + middle/2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn middle;\n\n\t\t\t\t\n\t\t\t\t/* \n\t\t\t\t *This block of code is for the case that t is an instanceof string \n\t\t\t\t */\n\t\t\t\t\n\t\t\t}else if(t instanceof Integer) {\n\t\t\t\tInteger x = (Integer)t;\n\t\t\t\tint middle = this.sortedList.size()/2;\n\t\t\t\t/*Set reference middle to be the center of the list\n\t\t\t\t*\tAs long as our middle reference doesn't correspond to the value we're looking for, move forward or backward depending on\n\t\t\t\t*\ton how the middle value compares to the value we want.\n\t\t\t\t*/\n\t\t\t\twhile (!this.sortedList.get(middle).equals(x)) {\n\t\t\t\t\tmiddle--;\n\t\t\t\t\tif((Integer)this.sortedList.get(middle) > x) {\n\t\t\t\t\t\tmiddle = middle - Math.round((middle+1)/2);\n\t\t\t\t\t}else if((Integer)this.sortedList.get(middle) < x) {\n\t\t\t\t\t\t//This is a safety measure in the event the middle reference isn't reaching the end of the list.\n\t\t\t\t\t\t//Ideally the algorithm wouldn't need this safety measure, but here we are.\n\t\t\t\t\t\tif (middle == this.sortedList.size()-3) {\n\t\t\t\t\t\t\tmiddle+=2;\t\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tmiddle = middle + (Math.round(sortedList.size()-middle)/2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }", "static long closer(int arr[], int n, long x)\n {\n int index = binarySearch(arr,0,n-1,(int)x); \n return (long) index;\n }", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "private static int first(int arr[], int low, int high, int x, int n)\n {\n if(high >= low){\n \n /*mid = low+high/2*/\n int mid = low + (high-low) / 2;\n\n //Wen we found the X at the MID\n if( (mid==0 || x > arr[mid-1]) && arr[mid] == x)\n return mid;\n\n //WEn the x is greater than mid go to right ie mid+1\n if( x > arr[mid])\n return first(arr, (mid+1), high, x, n);\n\n //Else case wen x is small go left ie mid-1\n return first(arr, low, (mid-1), x, n);\n\n }\n\n //Wen not found ie high <= low\n return -1;\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }" ]
[ "0.57499695", "0.57063305", "0.5576633", "0.55378836", "0.54824865", "0.53812325", "0.5352126", "0.53147507", "0.52882034", "0.52494246", "0.5200069", "0.5197032", "0.5180769", "0.51736635", "0.517221", "0.5166391", "0.51632786", "0.5138126", "0.513128", "0.5126179", "0.5120266", "0.5115801", "0.5113391", "0.5099142", "0.5093303", "0.5088604", "0.5082038", "0.5061098", "0.5060797", "0.50386435", "0.5037348", "0.5029291", "0.5023134", "0.5018119", "0.50149494", "0.5002432", "0.49925008", "0.49759609", "0.49673668", "0.49595782", "0.4958941", "0.49547884", "0.49544623", "0.49510086", "0.49419695", "0.49332225", "0.49313104", "0.49195105", "0.49156272", "0.49143514", "0.49096543", "0.489637", "0.48936415", "0.48928434", "0.48837817", "0.48768547", "0.48619595", "0.4846613", "0.4837426", "0.48327932", "0.4825266", "0.48240286", "0.48232096", "0.48224455", "0.48196214", "0.48093897", "0.479837", "0.47972", "0.47938812", "0.4791969", "0.47813463", "0.47791255", "0.4771013", "0.4769381", "0.47654483", "0.4759641", "0.4756123", "0.47532624", "0.47527418", "0.4746424", "0.47456193", "0.4745304", "0.4742495", "0.4736477", "0.47363335", "0.4736185", "0.47355407", "0.47329867", "0.47296444", "0.4729348", "0.47202912", "0.47173944", "0.47107327", "0.47094375", "0.47088763", "0.47078532", "0.47076815", "0.47057164", "0.47038484", "0.47025168", "0.47004673" ]
0.0
-1
Having found the correct size of balls and the sets of center points where those balls can be located, we need to fulfill the constraint for the fixedlength case that ||ft||_2 = l. To find f and t, we parameterize the path between the minimum distance and maximum distance points. Then we take the Euclidean distance and set it equal to l. The next step is to find the needed parameter for points f and t to have distance l.
private double getParam(Point p1, Point p2, double[] v1, double[] v2){ double r; double l = _highwayLength; // auxiliary variables double A = (Math.pow(v1[0] - v2[0], 2.0)) + (Math.pow(v1[1] - v2[1], 2.0)); double B = (2 * (p1.posX - p2.posX) * (v1[0] - v2[0])) + (2 * (p1.posY - p2.posY) * (v1[1] - v2[1])); double C = (Math.pow(p1.posX - p2.posX, 2.0)) + (Math.pow(p1.posY - p2.posY, 2.0)); // using pq formula to find r double phalf = B / (2 * A); double q = ((C - (l * l)) / A); double r1 = - phalf + Math.sqrt((phalf * phalf) - q); double r2 = - phalf - Math.sqrt((phalf * phalf) - q); if (r1 >= 0 && r1 <= 1) r = r1; else r = r2; return r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void collision(Ball b){\n float cir_center_X = b.getCenterX();\r\n float cir_center_Y = b.getCenterY();\r\n \r\n // aabb half extent\r\n float extent_X = (this.p4[0]-this.p1[0])/2; //half width\r\n float extent_Y = (this.p3[1]-this.p4[1])/2; // half height\r\n // rec center \r\n float rec_center_X = this.p1[0]+extent_X;\r\n float rec_center_Y = this.p1[1]+extent_Y;\r\n \r\n // difference between center : vector D = Vector Cir_center-Rec-center\r\n float d_X =cir_center_X-rec_center_X;\r\n float d_Y = cir_center_Y-rec_center_Y;\r\n \r\n //\r\n float p_X =Support_Lib.clamp(d_X,-extent_X,extent_X);\r\n float p_Y =Support_Lib.clamp(d_Y,-extent_Y,extent_Y);\r\n \r\n\r\n \r\n float closest_point_X = rec_center_X +p_X;\r\n float closest_point_Y = rec_center_Y +p_Y; \r\n \r\n \r\n d_X = closest_point_X -cir_center_X;\r\n d_Y = closest_point_Y -cir_center_Y;\r\n \r\n \r\n \r\n float length = (float)Math.sqrt((d_X*d_X)+(d_Y*d_Y));\r\n \r\n if(length+0.001 <=b.getRadius()){\r\n\r\n \r\n float ratio =(closest_point_X-rec_center_X)/(extent_X*2);\r\n b.accelartion(ratio);\r\n b.updateVelocity(Support_Lib.direction(d_X,d_Y));\r\n \r\n }\r\n \r\n \r\n }", "public void frighten(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n Random r = new Random();\r\n int targetX = 25;\r\n int targetY = 25;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX,2) + Math.pow(yPos - targetY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos-20) - targetY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX,2) + Math.pow((yPos+20) - targetY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n }", "public void findBoundary(boolean useDestinations)\r\n\t{\n\tdouble maxSpacing = res/5.0;\r\n\tif(maxSpacing<1) maxSpacing = 1;\r\n\t\r\n\t//First make sure point sampling is dense enough:\t\r\n\tVector<Int2d> surfaceT = new Vector<Int2d>();\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tsurfaceT.add(p);\r\n\t\tInt2d p2 = surface.get((it+1)%sl);\r\n\t\tdouble pdist = p2.distance(p);\r\n\t\tif(pdist > maxSpacing)\r\n\t\t\t{\r\n\t\t\t// populate this line segment with points\r\n\t\t\tint extraPoints = (int)(pdist/maxSpacing); // - 2 cause we already have 2 points\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<extraPoints; i++)\r\n\t\t\t\t{\r\n\t\t\t\tInt2d pN = new Int2d(p);\r\n\t\t\t\tInt2d diff = new Int2d();\r\n\t\t\t\tdiff.sub(p2,p);\r\n\t\t\t\tpN.scaleAdd((double)(i+1.)/(extraPoints+1.),diff,pN);\r\n\t\t\t\tsurfaceT.add(pN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t//System.out.println(\"got here2.1\");\r\n\tsurface = surfaceT;\r\n\tcanvas1.surface = surface;\r\n\tsl = surfaceT.size();\r\n\t\t\r\n\t//System.out.println(sl);\r\n\t\r\n\t\t\t\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tint i = (int)(p.x/res);\r\n\t\tint j = (int)(p.y/res);\r\n\t\tboolean extraWide = false;\r\n\t\tboolean extraHigh = false;\t\t\r\n\t\t\r\n\t\tif((p.y % res) == 0)\r\n\t\t\t{\r\n\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\textraHigh = true;\r\n\t\t\t}\r\n\t\tif((p.x % res) == 0)\r\n\t\t\t{\r\n\t\t\textraWide = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\tint len = 4;\r\n\t\tif(extraWide && extraHigh) len = 9;\r\n\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\r\n\t\tInt2d[] pi = new Int2d[len];\r\n\t\tint[] ic = new int[len];\r\n\t\tint[] jc = new int[len];\r\n\t\t\r\n\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\r\n\t\tfor(int c=0; c<len; c++)\r\n\t\t\t{\r\n\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t{\r\n\t\t\t\tif(!useDestinations)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t//else phi[ic[c]][jc[c]] = -phiStart;\r\n\t\t\t\t// Way suggested in paper, but this looks bad with interpolation\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(\"got here2.2\");\r\n\t\t\r\n\tif(useDestinations) //Use destinations\r\n\t\t{\t\t\r\n\t\t// Sets destination point distances accordingly\r\n\t\t\r\n\t\tint dl = destinations.size();\r\n\t\tfor(int it=0; it<dl; it++)\r\n\t\t\t{\r\n\t\t\tInt2d p = destinations.get(it);\r\n\t\t\tint i = (int)(p.x/res);\r\n\t\t\tint j = (int)(p.y/res);\r\n\t\t\tboolean extraWide = false;\r\n\t\t\tboolean extraHigh = false;\t\t\r\n\t\t\t\r\n\t\t\tif((p.y % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\t\textraHigh = true;\r\n\t\t\t\t}\r\n\t\t\tif((p.x % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\textraWide = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tint len = 4;\r\n\t\t\tif(extraWide && extraHigh) len = 9;\r\n\t\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\t\r\n\t\t\tInt2d[] pi = new Int2d[len];\r\n\t\t\tint[] ic = new int[len];\r\n\t\t\tint[] jc = new int[len];\r\n\t\t\t\r\n\t\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\t\r\n\t\t\tfor(int c=0; c<len; c++)\r\n\t\t\t\t{\r\n\t\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\tint bl = boundary.size();\r\n\t/*\r\n\tfor(int k=0; k<bl; k++)\r\n\t\t{\r\n\t\tSystem.out.println(boundary.get(k).x + \", \" + boundary.get(k).y + \": element \" + k);\r\n\t\t}\r\n\t\t*/\r\n\t\t\t\r\n\tfor(int i=0; i<bl; i++)\r\n\t\t{\r\n\t\tInt2d pi = boundary.get(i);\r\n\t\tpi.phi = phi[pi.x][pi.y];\r\n\t\t}\r\n\t}", "void findFeasible() {\n\n\t\tfor( int u = 0; u < neg.length; u++ ) {\t\n\t\t\tint i = neg[u];\n\t\t\tfor( int v = 0; v < pos.length; v++ ) {\t\n\t\t\t\tint j = pos[v];\n\t\t\t\tf[i][j] = -delta[i] < delta[j]? -delta[i]: delta[j];\n\t\t\t\tdelta[i] += f[i][j];\n\t\t\t\tdelta[j] -= f[i][j];\n\t\t\t}\n\t\t}\n\t}", "private void splitIntoRoots() {\n\t\tArrayList<ArrayList<Coord>> circ = findCircles();\n\t\tcombinePastRoots(circ);\n\t}", "public void calculateBounds(boolean force) {\n\t\tdouble left=java.lang.Double.MAX_VALUE, right=java.lang.Double.MIN_VALUE, \n\t\ttop=java.lang.Double.MAX_VALUE, bottom=java.lang.Double.MIN_VALUE;\n\t\t\n\t\tdouble theta;\n\t\tfor (int i=_segments-1; i>=0; i--) {\n\t\t\t/* Save calculation: if rotation hasn't changed and it is not forced,\n\t\t\t * don't calculate points again.\n\t\t\t */\n\t\t\tif (_lastTheta != _theta || force) {\n\t\t\t\ttheta=_theta+FastMath.atan2(_startPointY[i] ,_startPointX[i]);\n\t\t\t\tx1[i]=(int)(_m1[i]*FastMath.cos(theta));\n\t\t\t\ty1[i]=(int)(_m1[i]*FastMath.sin(theta));\n\t\t\t\ttheta=_theta+ FastMath.atan2(_endPointY[i], _endPointX[i]);\n\t\t\t\tx2[i]=(int)(_m2[i]*FastMath.cos(theta));\n\t\t\t\ty2[i]=(int)(_m2[i]*FastMath.sin(theta));\n\t\t\t}\n\t\t\t// Finds the rectangle that comprises the organism\n\t\t\tleft = Utils.min(left, x1[i]+ _dCenterX, x2[i]+ _dCenterX);\n\t\t\tright = Utils.max(right, x1[i]+ _dCenterX, x2[i]+ _dCenterX);\n\t\t\ttop = Utils.min(top, y1[i]+ _dCenterY, y2[i]+ _dCenterY);\n\t\t\tbottom = Utils.max(bottom, y1[i]+ _dCenterY, y2[i]+ _dCenterY);\n\t\t}\n\t\tsetBounds((int)left, (int)top, (int)(right-left+1)+1, (int)(bottom-top+1)+1);\n\t\t_lastTheta = _theta;\n\t}", "public void compute() {\n\n this.jddPtsInflexion.clear();\n ILineString lsInitialee = this.geom;\n\n ILineString lsInitiale = Operateurs.resampling(lsInitialee, 1);\n ILineString lsLisse = GaussianFilter.gaussianFilter(lsInitiale, 5, 1);\n\n double sumOfDistances = 0;\n double length = 70;// 200 m max\n double sumOfAngels = 0;\n // ArrayList<Double> angels=new ArrayList<Double>();\n ArrayList<Double> differences = new ArrayList<Double>();\n\n ArrayList<Double> distances = new ArrayList<Double>();\n\n IDirectPosition p1 = lsInitiale.coord().get(0);\n IDirectPosition p2 = lsInitiale.coord().get(1);\n\n distances.add(p1.distance2D(p2));\n sumOfDistances += distances.get(distances.size() - 1);\n\n double angel = Math.atan2(p1.getY() - p2.getY(), p1.getX() - p2.getX());\n\n angel = (angel + Math.PI) * 180 / Math.PI;\n\n // angels.add(angel);\n\n for (int i = 1; i < lsInitiale.coord().size() - 1; i++) {\n\n p1 = lsInitiale.coord().get(i);\n p2 = lsInitiale.coord().get(i + 1);\n\n distances.add(p1.distance2D(p2));\n sumOfDistances += distances.get(distances.size() - 1);\n\n double newAngel = Math\n .atan2(p1.getY() - p2.getY(), p1.getX() - p2.getX());\n\n // give the value that varie from 0 to 360-epsilon\n newAngel = (newAngel + Math.PI) * 180 / Math.PI;\n\n // angels.add(newAngel);\n\n while (sumOfDistances > length && differences.size() > 0) {\n sumOfDistances -= distances.get(0);\n\n sumOfAngels -= differences.get(0);\n\n distances.remove(0);\n // System.out.println(\"olddiff=\" + differences.get(0));\n differences.remove(0);\n\n }\n\n double diff = newAngel - angel;\n\n if (diff > 180)\n diff = -360 + diff;// for the case of angel=10 and newAngel=350;\n else if (diff < -180)\n diff = 360 + diff;\n\n differences.add(diff);\n sumOfAngels += diff;\n angel = newAngel;\n // System.out.println(\"sumOfAngels=\" + sumOfAngels);\n // System.out.println(\"angel=\" + newAngel);\n // System.out.println(\"diff=\" + diff);\n\n /*\n * for(int k=0;k<angels.size();k++){ double diff2=newAngel-angels.get(k));\n * if(diff2>180)diff2=360-diff2;// for the case of angel=10 and\n * newAngel=350; else if(diff2<-180)diff2=-360-diff2;\n * if(Math.abs(newAngel->200) {\n * \n * }\n * \n * \n * }\n */\n\n if (Math.abs(sumOfAngels) > 100) {\n\n double maxOfDiff = 0;\n int indexOfMaxOfDiff = -1;\n for (int k = 0; k < differences.size(); k++) {\n if (differences.get(k) > maxOfDiff) {\n maxOfDiff = differences.get(k);\n indexOfMaxOfDiff = k;\n\n }\n\n }\n double maxDistance = -1;\n int maxDistancePointIndex = -1;\n // if(i+differences.size()-indexOfMaxOfDiff-1>=jddPtsInflexion.size())\n for (int jj = 0; jj < differences.size(); jj++) {\n // jddPtsInflexion.add(lsInitiale.coord().get(i+differences.size()-indexOfMaxOfDiff-2));\n if (i + jj - indexOfMaxOfDiff >= 0\n && i + jj - indexOfMaxOfDiff < lsInitiale.coord().size()) {\n int currIndex = i + jj - indexOfMaxOfDiff;\n double distance = lsInitiale.coord().get(currIndex).distance2D(\n lsLisse.coord().get(currIndex));\n if (distance > maxDistance) {\n maxDistance = distance;\n maxDistancePointIndex = currIndex;\n }\n\n }\n\n }\n\n if (maxDistancePointIndex >= 0)\n this.jddPtsInflexion.add(lsInitiale.coord()\n .get(maxDistancePointIndex));\n\n differences.clear();\n sumOfDistances = distances.get(distances.size() - 1);\n distances.clear();\n sumOfAngels = 0;\n i++;\n\n }\n\n }\n\n }", "private void blpf(Complex[] F, int width, int height) {\r\n\t\tint centerY = width / 2;\r\n\t\tint centerX = height / 2;\r\n\t\tint D0 = 30;\r\n\t\t\r\n\t\t\t\t\t\t\r\n\t\tdouble value = 0;\r\n \r\n\t\tfor (int y = 0; y < width; y++)\r\n {\r\n for (int x = 0; x < height; x++)\r\n {\r\n int distance = (int)(Math.pow(x-centerX, 2)+Math.pow(y-centerY, 2));\r\n value = distance/Math.pow(D0, 2);\r\n value = value+1;\r\n value = 1/value;\r\n\r\n F[x*width+y] = F[x*width+y].mul(value); \r\n \r\n\t\t \t\t\t}\r\n }\t\t\r\n\t}", "private static void computeDistanceAndBearing(double lat1, double lon1,\n\t double lat2, double lon2, double[] results) {\n\n\t\tint MAXITERS = 20;\n\t\t// Convert lat/long to radians\n\t\tlat1 *= Math.PI / 180.0;\n\t\tlat2 *= Math.PI / 180.0;\n\t\tlon1 *= Math.PI / 180.0;\n\t\tlon2 *= Math.PI / 180.0;\n\n\t\tdouble a = 6378137.0; // WGS84 major axis\n\t\tdouble b = 6356752.3142; // WGS84 semi-major axis\n\t\tdouble f = (a - b) / a;\n\t\tdouble aSqMinusBSqOverBSq = (a * a - b * b) / (b * b);\n\n\t\tdouble L = lon2 - lon1;\n\t\tdouble A = 0.0;\n\t\tdouble U1 = Math.atan((1.0 - f) * Math.tan(lat1));\n\t\tdouble U2 = Math.atan((1.0 - f) * Math.tan(lat2));\n\n\t\tdouble cosU1 = Math.cos(U1);\n\t\tdouble cosU2 = Math.cos(U2);\n\t\tdouble sinU1 = Math.sin(U1);\n\t\tdouble sinU2 = Math.sin(U2);\n\t\tdouble cosU1cosU2 = cosU1 * cosU2;\n\t\tdouble sinU1sinU2 = sinU1 * sinU2;\n\n\t\tdouble sigma = 0.0;\n\t\tdouble deltaSigma = 0.0;\n\t\tdouble cosSqAlpha = 0.0;\n\t\tdouble cos2SM = 0.0;\n\t\tdouble cosSigma = 0.0;\n\t\tdouble sinSigma = 0.0;\n\t\tdouble cosLambda = 0.0;\n\t\tdouble sinLambda = 0.0;\n\n\t\tdouble lambda = L; // initial guess\n\t\tfor (int iter = 0; iter < MAXITERS; iter++) {\n\t\t\tdouble lambdaOrig = lambda;\n\t\t\tcosLambda = Math.cos(lambda);\n\t\t\tsinLambda = Math.sin(lambda);\n\t\t\tdouble t1 = cosU2 * sinLambda;\n\t\t\tdouble t2 = cosU1 * sinU2 - sinU1 * cosU2 * cosLambda;\n\t\t\tdouble sinSqSigma = t1 * t1 + t2 * t2; // (14)\n\t\t\tsinSigma = Math.sqrt(sinSqSigma);\n\t\t\tcosSigma = sinU1sinU2 + cosU1cosU2 * cosLambda; // (15)\n\t\t\tsigma = Math.atan2(sinSigma, cosSigma); // (16)\n\t\t\tdouble sinAlpha = (sinSigma == 0) ? 0.0 :\n\t\t\t\t\t\t\tcosU1cosU2 * sinLambda / sinSigma; // (17)\n\t\t\tcosSqAlpha = 1.0 - sinAlpha * sinAlpha;\n\t\t\tcos2SM = (cosSqAlpha == 0) ? 0.0 :\n\t\t\t\t\t\t\tcosSigma - 2.0 * sinU1sinU2 / cosSqAlpha; // (18)\n\n\t\t\tdouble uSquared = cosSqAlpha * aSqMinusBSqOverBSq; // defn\n\t\t\tA = 1 + (uSquared / 16384.0) * // (3)\n\t\t\t\t\t\t\t(4096.0 + uSquared *\n\t\t\t\t\t\t\t\t\t\t\t(-768 + uSquared * (320.0 - 175.0 * uSquared)));\n\t\t\tdouble B = (uSquared / 1024.0) * // (4)\n\t\t\t\t\t\t\t(256.0 + uSquared *\n\t\t\t\t\t\t\t\t\t\t\t(-128.0 + uSquared * (74.0 - 47.0 * uSquared)));\n\t\t\tdouble C = (f / 16.0) *\n\t\t\t\t\t\t\tcosSqAlpha *\n\t\t\t\t\t\t\t(4.0 + f * (4.0 - 3.0 * cosSqAlpha)); // (10)\n\t\t\tdouble cos2SMSq = cos2SM * cos2SM;\n\t\t\tdeltaSigma = B * sinSigma * // (6)\n\t\t\t\t\t\t\t(cos2SM + (B / 4.0) *\n\t\t\t\t\t\t\t\t\t\t\t(cosSigma * (-1.0 + 2.0 * cos2SMSq) -\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(B / 6.0) * cos2SM *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(-3.0 + 4.0 * sinSigma * sinSigma) *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(-3.0 + 4.0 * cos2SMSq)));\n\n\t\t\tlambda = L +\n\t\t\t\t\t\t\t(1.0 - C) * f * sinAlpha *\n\t\t\t\t\t\t\t\t\t\t\t(sigma + C * sinSigma *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(cos2SM + C * cosSigma *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(-1.0 + 2.0 * cos2SM * cos2SM))); // (11)\n\n\t\t\tdouble delta = (lambda - lambdaOrig) / lambda;\n\t\t\tif (Math.abs(delta) < 1.0e-12) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfloat distance = (float) (b * A * (sigma - deltaSigma));\n\t\tresults[0] = distance;\n\t\tfloat initialBearing = (float) Math.atan2(cosU2 * sinLambda,\n\t\t cosU1 * sinU2 - sinU1 * cosU2 * cosLambda);\n\t\tinitialBearing *= 180.0 / Math.PI;\n\t\tfloat finalBearing = (float) Math.atan2(cosU1 * sinLambda,\n\t\t -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda);\n\t\tfinalBearing *= 180.0 / Math.PI;\n\t\tresults[1] = finalBearing;\n\t}", "public static void main(String[] args) {\n setStandardInput();\n\n Scanner in = new Scanner(System.in);\n\n int N = in.nextInt(); // Denoting the number of balls.\n in.skip(\"\\n\");\n\n int maxN = 100005; // The maximum number of balls.\n int maxV = 10005; // The maximum value written on a ball.\n\n int[] nums = new int[maxN];\n ArrayList<Integer> sortedBalls = new ArrayList<>();\n\n for (int i = 1; i <= N; i++) {\n nums[i] = in.nextInt();\n sortedBalls.add(nums[i]);\n }\n\n Arrays.sort(sortedBalls.toArray());\n\n int[] balls = IntStream.of(nums).distinct().toArray(); // V\n\n HashMap<Integer, Integer> H = new HashMap<>();\n for (int i = 0; i < balls.length; i++) {\n H.put(balls[i], i);\n }\n\n int[] counter = new int[maxN];\n for (int i = 1; i <= N; i++) {\n counter[H.get(nums[i])]++;\n }\n\n long[] powerOfTwo = new long[maxN]; // Maybe I can change to LONG as solution\n powerOfTwo[0] = 1L;\n for (int i = 1; i <= N; i++) {\n powerOfTwo[i] = (powerOfTwo[i - 1] << 1L) % mod;\n }\n\n // Let ways[v] denotes the number of ways modulus 10^9+7 that balls can\n // be drawn from the set, so that their GCD equals the number v.\n int[] ways = new int[maxV];\n\n for (int i = 0; i < balls.length; i++) {\n// balls\n }\n\n for (int i = 0; i < balls.length; i++) {\n\n for (int v = 1; v <= 10000; v++) {\n\n int gcd = gcd(balls[i], v);\n ways[gcd] = add(ways[gcd], (int)((powerOfTwo[counter[i]] - 1) * ways[v]));\n }\n\n ways[balls[i]] = add(ways[balls[i]], (int)powerOfTwo[counter[i]] - 1);\n }\n\n int Q = in.nextInt(); // Representing the number of GCD queries that will have to be performed.\n in.nextLine();\n\n// in.skip(\"\\n\");\n\n for (int queryNum = 1; queryNum <= Q; queryNum++) {\n\n int X = in.nextInt(); // Denoting the GCD.\n\n System.out.println(ways[X]);\n }\n }", "void bellman_ford(int s)\n {\n int dist[]=new int[V]; \n \n //to track the path from s to all\n int parent[]=new int[V] ;\n //useful when a vertex has no parent\n for(int i=0;i<V;i++)\n parent[i]=-2;\n \n for(int i=0;i<V;i++) \n dist[i]=INF;\n \n //start from source vertex\n dist[s]=0;\n parent[s]=-1;\n \n //we have to iterate over all the edges for V-1 times\n //each ith iteration finds atleast ith path length dist\n //worst case each ith will find ith path length \n \n for(int i=1;i<V;i++) \n {\n for(int j=0;j<E;j++)\n {\n //conside for all edges (u,v), wt\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt; \n //since dist[u]=INF and adding to it=>overflow, therefore check first\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n dist[v]=dist[u]+wt;\n parent[v]=u;\n } \n }\n }\n \n //iterate for V-1 times, one more iteration necessarily gives a path length of atleast V in W.C=>cycle\n for(int j=0;j<E;j++) \n {\n int u=edge[j].src;\n int v=edge[j].dest;\n int wt=edge[j].wt;\n if( dist[u]!=INF && dist[u]+wt < dist[v])\n {\n System.out.println(\"Graph has cycle\");\n return;\n } \n }\n \n //print the distance to all from s\n System.out.println(\"from source \"+s+\" the dist to all other\");\n print_dist(dist); \n print_path(parent,dist,s); \n \n }", "public double getDistance(ArrayList<Integer> e, ArrayList<Integer> f) {\n double distance =0;\n if(e.size()>2 || f.size()>2){\n \n ArrayList<Double> aux = new ArrayList<>();\n aux.add (Math.sqrt(Math.pow(e.get(0) - f.get(0), 2) + Math.pow(e.get(1) - f.get(1), 2)));\n aux.add(Math.sqrt(Math.pow(e.get(0) - f.get(2), 2) + Math.pow(e.get(1) - f.get(3), 2)));\n aux.add(Math.sqrt(Math.pow(e.get(0) - f.get(4), 2) + Math.pow(e.get(1) - f.get(5), 2)));\n aux.add(Math.sqrt(Math.pow(e.get(0) - f.get(6), 2) + Math.pow(e.get(1) - f.get(7), 2)));\n Collections.sort(aux);\n distance = aux.get(0);\n \n }\n else{\n\n distance = Math.sqrt(Math.pow(e.get(0) - f.get(0), 2) + Math.pow(e.get(1) - f.get(1), 2));\n //distancia entre dois pontos\n }\n return distance;\n\n }", "static boolean betterCenter(double r,double g, double b, float center[],float best_center[]){\n\n float distance = (float) ((r-center[0])*(r-center[0]) + (g-center[1])*(g-center[1]) + (b-center[2])*(b-center[2]));\n\n float distance_best = (float) ((r-best_center[0])*(r-best_center[0]) + (g-best_center[1])*(g-best_center[1]) + (b-best_center[2])*(b-best_center[2]));\n\n\n if(distance < distance_best)\n return true;\n else\n return false;\n\n\n }", "public MPolygon computeVertex_latLong(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\t\tMPoint p1 = new MPoint();\r\n\r\n\t\tp1.x = f.getLatitude() + Math.cos(radian1) * (f.getVeiwDist() * 0.00001);\r\n\t\tp1.y = f.getLongitude() + Math.sin(radian1) * (f.getVeiwDist() * 0.00001);\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(radian2) * (f.getVeiwDist() * 0.00001);\r\n\t\tp2.y = f.getLongitude() + Math.sin(radian2) * (f.getVeiwDist() * 0.00001);\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(radian3) * (f.getVeiwDist() * 0.00001);\r\n\t\tp3.y = f.getLongitude() + Math.sin(radian3) * (f.getVeiwDist() * 0.00001);\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(radian4) * (f.getVeiwDist() * 0.00001);\r\n\t\tp4.y = f.getLongitude() + Math.sin(radian4) * (f.getVeiwDist() * 0.00001);\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(radianD) * (f.getVeiwDist() * 0.00001);\r\n\t\tD.y = f.getLongitude() + Math.sin(radianD) * (f.getVeiwDist() * 0.00001);\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.latitude;\r\n\t\tlocation.y = f.longitude;\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}", "public void step(double timeStep){\n\t\t\n\t\t//Base case of the recursive implementation --> end if we've basically reached negligible\n\t\t//amounts of time\n\t\tif(timeStep < TIME_EPSILON){\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\t//Modify the velocities of all of the balls according to gravity and friction\n//\t\tfor(Ball ball : balls){\n//\t\t\tdouble vY = ball.getVel().y();\n//\t\t\tdouble vX = ball.getVel().x();\n//\t\t double newVY = vY + GRAVITY * timeStep;\n//\t\t double newVX = vX * (1 - MU_1 * timeStep - MU_2 * Math.abs(vX) * timeStep);\n//\t\t newVY = newVY * (1 - MU_1 * timeStep - MU_2 * Math.abs(newVY) * timeStep);\n//\t\t \n//\t\t ball.setVel(new Vect(newVX, newVY));\n//\t\t}\n\t\t\n\t\tBall collisionBall1 = null;\n\t\tBall collisionBall2 = null;\n\t\tBall collisionBall3 = null;\n\t\tGadget collisionGadget = null;\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-ball\n\t\t//collision as well as the balls that actually collide\n\t\tdouble minTimeUntilBallBallCollision = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif(balls.size() > 1){\n\t\t\tcollisionBall1 = balls.get(0);\n\t\t\tcollisionBall2 = balls.get(1);\n\t\t\tfor(int i = 0; i < balls.size() - 1; i++){\n\t\t\t\tfor(int j = i + 1; j < balls.size(); j++){\n\t\t\t\t\tBall ball1 = balls.get(i);\n\t\t\t\t\tBall ball2 = balls.get(j);\n\t\t\t\t\tif(!ball1.getInAbsorber() && !ball2.getInAbsorber()){\t\n\t\t\t\t\t\tdouble timeUntilCollision = ball1.impactCalc(ball2)[0];\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallBallCollision){\n\t\t\t\t\t\t\tminTimeUntilBallBallCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall1 = ball1;\n\t\t\t\t\t\t\tcollisionBall2 = ball2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//With the current velocities and positions determine the time for the next ball-gadget\n\t\t//collision and determine the objects involved in that collision\n\t\tdouble minTimeUntilBallGadgetCollision = Double.POSITIVE_INFINITY;\n\t\tif(balls.size() > 0 && gadgets.size() > 0){\n\t\t\tcollisionBall3 = balls.get(0);\n\t\t\tcollisionGadget = gadgets.get(0);\n\t\t\tfor(Ball b : balls){\n\t\t\t\tif(!b.getInAbsorber()){\n\t\t\t\t\tfor(Gadget g : gadgets){\n\t\t\t\t\t\tdouble timeUntilCollision = ((BoardObject) g).impactCalc(b)[0];\n\t\t\t\t\t\t//System.out.println(g.getID() + \" \" +timeUntilCollision);\n\t\t\t\t\t\tif (timeUntilCollision < minTimeUntilBallGadgetCollision){\n\t\t\t\t\t\t\tminTimeUntilBallGadgetCollision = timeUntilCollision;\n\t\t\t\t\t\t\tcollisionBall3 = b;\n\t\t\t\t\t\t\tcollisionGadget = g;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t\t\n\t\t//Trivially progress the board if the next determined collision of any kind doesn't happen\n\t\t//within the time step\n\t\tif(Math.min(minTimeUntilBallBallCollision, minTimeUntilBallGadgetCollision) > timeStep){\n\t\t\tprogress(timeStep - TIME_EPSILON);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//If a ball-ball collision happens within the time step, progress the board trivially until\n\t\t//just before the collision, modify the ball velocities accordingly and recursively call the\n\t\t//step function passing the remaining time as the argument for step()\n\t\tif(minTimeUntilBallBallCollision < minTimeUntilBallGadgetCollision){\n\t\t\tprogress(minTimeUntilBallBallCollision - TIME_EPSILON);\n\t\t\t\n\t\t\tVect ball1Vel = new Vect(collisionBall2.impactCalc(collisionBall1)[1], collisionBall2.impactCalc(collisionBall1)[2]);\n\t\t\tVect ball2Vel = new Vect(collisionBall1.impactCalc(collisionBall2)[1], collisionBall1.impactCalc(collisionBall2)[2]);\n\t\t\t\n\t\t\tcollisionBall1.setVel(ball1Vel);\n\t\t\tcollisionBall2.setVel(ball2Vel);\n\t\t\t\n\t\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//In the final case, a ball-gadget collision occurs within the time step. In this case we\n\t\t//progress the board trivially until just before the collision, modify the ball velocity\n\t\t//and trigger the gadget. Then recursively call the step function passing the remaining time \n\t\t//as the argument for step()\n\t\t\n\t\tprogress(minTimeUntilBallGadgetCollision - TIME_EPSILON);\n\t\t\n\t\tVect ball3Vel = new Vect(((BoardObject)collisionGadget).impactCalc(collisionBall3)[1], ((BoardObject)collisionGadget).impactCalc(collisionBall3)[2]);\n\t\t\n\t\tif(collisionGadget instanceof Absorber){\n\t\t\tcollisionBall3.setVel(new Vect(0,0));\n\t\t\tVect newPos = new Vect(collisionGadget.getX() + collisionGadget.getWidth() - 0.25, collisionGadget.getY() + collisionGadget.getHeight() - 0.25);\n\t\t\tcollisionBall3.setPos(newPos);\n\t\t\tcollisionBall3.setInAbsorber(true);\n\t\t\t((Absorber) collisionGadget).addBallToAbsorber(collisionBall3);\n\t } else if(!(collisionGadget instanceof OuterWall) || ((OuterWall)collisionGadget).getConnectedBoard() == this && ((OuterWall)collisionGadget).getConnectedWall().equals(collisionGadget.getID())){\n\t\t\tcollisionBall3.setVel(ball3Vel);\n\t\t} else{\n\t\t\t//TODO @DANA, this has to do with the client/server ball passing stuff\n\t\t}\n\t\t\n\t\n\t\tcollisionGadget.trigger();\n\n\t\t\n\t\tstep(timeStep - minTimeUntilBallBallCollision);\n\t\treturn;\t\n\t}", "public void computeFractal(){\n\t\tint deltaX =p5.getX()-p1.getX();\n\t\tint deltaY =p5.getY()- p1.getY();\n\t\tint x2= p1.getX()+ (deltaX/3);\n\t\tint y2= p1.getY()+ (deltaY/3);\n\t\tdouble x3=((p1.getX()+p5.getX())/2)+( Math.sqrt(3)*\n\t\t\t\t(p1.getY()-p5.getY()))/6;\n\t\tdouble y3=((p1.getY()+p5.getY())/2)+( Math.sqrt(3)*\n\t\t\t\t(p5.getX()-p1.getX()))/6;\n\t\tint x4= p1.getX()+((2*deltaX)/3);\n\t\tint y4= p1.getY()+((2*deltaY)/3);\n\t\tthis.p2= new Point(x2,y2);\n\t\tthis.p3= new Point((int)x3,(int)y3);\n\t\tthis.p4= new Point(x4,y4);\n\t}", "public Ball(Point center, int r) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int q = sc.nextInt();\n\n for(int k = 0; k < q; k++) {\n int m = sc.nextInt();\n int n = sc.nextInt();\n\n // indicate number of pieces\n long x = 1;\n long y = 1;\n \n ArrayList<Long> c_y = new ArrayList<Long>();\n for(int i = 0; i < m - 1; i++) {\n c_y.add(sc.nextLong());\n }\n \n ArrayList<Long> c_x = new ArrayList<Long>();\n for(int i = 0; i < n - 1; i++) {\n c_x.add(sc.nextLong());\n }\n\n Collections.sort(c_y, Collections.reverseOrder());\n Collections.sort(c_x, Collections.reverseOrder());\n\n // cut: most expensive = cut first\n int index_X = 0;\n int index_Y = 0;\n long totalCost = 0;\n\n while(!(x == n && y == m)) {\n if(x < n && y < m) {\n // compare cost to decide whether cut horizontally or vertically\n if(c_y.get(index_Y) >= c_x.get(index_X)) {\n totalCost += c_y.get(index_Y) * x;\n y++;\n index_Y++;\n } else if(c_y.get(index_Y) < c_x.get(index_X)) {\n totalCost += c_x.get(index_X) * y;\n x++;\n index_X++; \n }\n } else if(x == n && y < m) {\n totalCost += c_y.get(index_Y) * x;\n index_Y++;\n y++;\n } else if(x < n && y == m) {\n totalCost += c_x.get(index_X) * y;\n index_X++;\n x++;\n }\n }\n\n totalCost = totalCost % (long)(Math.pow(10, 9) + 7);\n System.out.println(totalCost );\n }\n }", "private 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 CheckCollision(Ball b){\n\n if( b.getDirX() < 0f ){\n if( (b.getPosX() - b.getSizeX() ) < px + sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n } \n }else{\n if( (b.getPosX() + b.getSizeX() ) > px - sx){\n //if we're in the upper \n if( b.getPosY() > py+sy/2 && b.getPosY() < py+sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() + .25f);\n }\n //if we are in the lower\n else if( b.getPosY() < py-sy/2 && b.getPosY() > py-sy){\n b.setDirX(-b.getDirX());\n b.setDirY(b.getDirY() - .25f); \n }\n else if( b.getPosY() > py-sy && b.getPosY() < py+sy)\n b.setDirX(-b.getDirX());\n b.setVelocity(b.getVelocity() * 1.10f);\n }\n }\n }", "public void run(){\n \n while (true){\n double p1Xnext =l1.getStart().getX()+v1p1;\n double p2Xnext =l2.getStart().getX()+v1p2;\n double p3Xnext =l3.getStart().getX()+v1p3;\n double p1Ynext =l1.getStart().getY()+v2p1;\n double p2Ynext =l2.getStart().getY()+v2p2;\n double p3Ynext =l3.getStart().getY()+v2p3;\n double p4Xnext =l1.getEnd().getX()+v1p1;\n double p5Xnext =l2.getEnd().getX()+v1p2;\n double p6Xnext =l3.getEnd().getX()+v1p3;\n double p4Ynext =l1.getEnd().getY()+v2p1;\n double p5Ynext =l2.getEnd().getY()+v2p2;\n double p6Ynext =l3.getEnd().getY()+v2p3;\n\n if (p1Xnext > l1.getCanvas().getWidth()){\n v1p1=-v1p1; \n }\n if (p1Xnext< 0){\n v1p1=-v1p1;\n \n }\n if (p1Ynext > l1.getCanvas().getHeight()){\n v2p1=-v2p1;\n \n }\n if (p1Ynext< 0){\n v2p1=-v2p1;\n }\n if (p2Xnext > l1.getCanvas().getWidth()){\n v1p2=-v1p2; \n }\n if (p2Xnext< 0){\n v1p2=-v1p2;\n \n }\n if (p2Ynext > l1.getCanvas().getHeight()){\n v2p2=-v2p2;\n \n }\n if (p2Ynext< 0){\n v2p2=-v2p2;\n \n }\n if (p3Xnext > l1.getCanvas().getWidth()){\n v1p3=-v1p3; \n }\n if (p3Xnext< 0){\n v1p3=-v1p3;\n \n }\n if (p3Ynext > l1.getCanvas().getHeight()){\n v2p3=-v2p3;\n \n }\n if (p3Ynext< 0){\n v2p3=-v2p3;\n }\n l1.setStart(l1.getStart().getX()+v1p1, l1.getStart().getY()+v2p1);\n l2.setStart(l2.getStart().getX()+v1p2, l2.getStart().getY()+v2p2);\n l3.setStart(l3.getStart().getX()+v1p3, l3.getStart().getY()+v2p3);\n l1.setEnd(l3.getStart());\n l2.setEnd(l1.getStart());\n l3.setEnd(l2.getStart());\n pause(10);\n \n \n \n }\n}", "@Test\n\tpublic void testLongPath() {\n\t\tPosition start = new Position(0,0);\n\t\tPosition end = new Position(20,10);\n\n\t\t// The distance should equal integer value of (20^2 + 10^2)*weight\n\t\tint distance = euclideanSquaredMetric.calculateCost(start, end);\n\t\tassertEquals(500*lateralDistanceWeight, distance);\n\t}", "public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }", "private void collide() {\n int collisionRange;\n \n if(isObstacle) {\n for(Thing thg: proximity) {\n if(\n thg.isObstacle\n &&\n !thg.equals(this)\n ) {\n collisionRange = (thg.size + this.size)/2;\n deltaA = this.distance(thg);\n \n if( \n Math.abs(deltaA[0]) <= collisionRange\n &&\n Math.abs(deltaA[1]) <= collisionRange\n ){\n if(deltaA[0] > deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == 1) {\n dA[0] = 0;\n }\n }\n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == -1) {\n dA[1] = 0;\n }\n }\n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n if(dA[0] != 0) {\n dA[1] = dA[0];\n }\n if(dA[1] != 0) {\n dA[0] = dA[1];\n }\n }\n }\n \n if(deltaA[0] < deltaA[1]) {\n if(Math.abs(deltaA[0]) > Math.abs(deltaA[1])) {\n if(dA[0] == -1) {\n dA[0] = 0;\n }\n } \n if(Math.abs(deltaA[0]) < Math.abs(deltaA[1])) {\n if(dA[1] == 1) {\n dA[1] = 0;\n }\n } \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = dA[0];\n }\n }\n \n if(Math.abs(deltaA[0]) == Math.abs(deltaA[1])) {\n dA[0] = 1 - 2*(int) (Math.random()*2);\n dA[1] = -dA[0];\n }\n }\n }\n }\n }\n }", "private float distance(double startLat, double startLon,\n double endLat, double endLon) {\n // Based on http://www.ngs.noaa.gov/PUBS_LIB/inverse.pdf\n // using the \"Inverse Formula\" (section 4)\n int MAXITERS = 20;\n // Convert lat/long to radians\n startLat *= Math.PI / 180.0;\n endLat *= Math.PI / 180.0;\n startLon *= Math.PI / 180.0;\n endLon *= Math.PI / 180.0;\n double a = 6378137.0; // WGS84 major axis\n double b = 6356752.3142; // WGS84 semi-major axis\n double f = (a - b) / a;\n double aSqMinusBSqOverBSq = (a * a - b * b) / (b * b);\n double L = endLon - startLon;\n double A = 0.0;\n double U1 = Math.atan((1.0 - f) * Math.tan(startLat));\n double U2 = Math.atan((1.0 - f) * Math.tan(endLat));\n double cosU1 = Math.cos(U1);\n double cosU2 = Math.cos(U2);\n double sinU1 = Math.sin(U1);\n double sinU2 = Math.sin(U2);\n double cosU1cosU2 = cosU1 * cosU2;\n double sinU1sinU2 = sinU1 * sinU2;\n double sigma = 0.0;\n double deltaSigma = 0.0;\n double cosSqAlpha = 0.0;\n double cos2SM = 0.0;\n double cosSigma = 0.0;\n double sinSigma = 0.0;\n double cosLambda = 0.0;\n double sinLambda = 0.0;\n double lambda = L; // initial guess\n for (int iter = 0; iter < MAXITERS; iter++) {\n double lambdaOrig = lambda;\n cosLambda = Math.cos(lambda);\n sinLambda = Math.sin(lambda);\n double t1 = cosU2 * sinLambda;\n double t2 = cosU1 * sinU2 - sinU1 * cosU2 * cosLambda;\n double sinSqSigma = t1 * t1 + t2 * t2; // (14)\n sinSigma = Math.sqrt(sinSqSigma);\n cosSigma = sinU1sinU2 + cosU1cosU2 * cosLambda; // (15)\n sigma = Math.atan2(sinSigma, cosSigma); // (16)\n double sinAlpha = (sinSigma == 0) ? 0.0 :\n cosU1cosU2 * sinLambda / sinSigma; // (17)\n cosSqAlpha = 1.0 - sinAlpha * sinAlpha;\n cos2SM = (cosSqAlpha == 0) ? 0.0 :\n cosSigma - 2.0 * sinU1sinU2 / cosSqAlpha; // (18)\n double uSquared = cosSqAlpha * aSqMinusBSqOverBSq; // defn\n A = 1 + (uSquared / 16384.0) * // (3)\n (4096.0 + uSquared *\n (-768 + uSquared * (320.0 - 175.0 * uSquared)));\n double B = (uSquared / 1024.0) * // (4)\n (256.0 + uSquared *\n (-128.0 + uSquared * (74.0 - 47.0 * uSquared)));\n double C = (f / 16.0) *\n cosSqAlpha *\n (4.0 + f * (4.0 - 3.0 * cosSqAlpha)); // (10)\n double cos2SMSq = cos2SM * cos2SM;\n deltaSigma = B * sinSigma * // (6)\n (cos2SM + (B / 4.0) *\n (cosSigma * (-1.0 + 2.0 * cos2SMSq) -\n (B / 6.0) * cos2SM *\n (-3.0 + 4.0 * sinSigma * sinSigma) *\n (-3.0 + 4.0 * cos2SMSq)));\n lambda = L +\n (1.0 - C) * f * sinAlpha *\n (sigma + C * sinSigma *\n (cos2SM + C * cosSigma *\n (-1.0 + 2.0 * cos2SM * cos2SM))); // (11)\n double delta = (lambda - lambdaOrig) / lambda;\n if (Math.abs(delta) < 1.0e-12) {\n break;\n }\n }\n float distance = (float) (b * A * (sigma - deltaSigma));\n return distance;\n }", "public void reinitiallizeDistanceFunctionInside() {\n\t\tint i, j;\r\n\t\tfor (i = 0; i < _levelSet.length; i++) {\r\n\t\t\tfor (j = 0; j < _levelSet[i].length; j++) {\r\n\t\t\t\tint iPlus = imposeBorder(i + 1, _iSize);\r\n\t\t\t\tint iMinus = imposeBorder(i - 1, _iSize);\r\n\t\t\t\tint jPlus = imposeBorder(j + 1, _iSize);\r\n\t\t\t\tint jMinus = imposeBorder(j - 1, _iSize);\r\n\t\t\t\tif (_levelSet[i][j] <= 0) // // the check for points in region\r\n\t\t\t\t\t// // the check for points in border\r\n\t\t\t\t\tif (MatrixMath.anyNeighborIsOutside(_levelSet, i, j, iPlus,\r\n\t\t\t\t\t\t\tiMinus, jPlus, jMinus)) {\r\n\t\t\t\t\t\t// points in border are placed in narrowband\r\n\t\t\t\t\t\t// _narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t\t_narrowBandInside.add(new Location(i, j));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// and location in distance matrix is set to infinite\r\n\t\t\t\t\t\t_levelSet[i][j] = Double.NEGATIVE_INFINITY;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// iterate until narrow band is empty\r\n\t\t// OrderByLevelSetValue comparator = new OrderByLevelSetValue();\r\n\t\t// while (_narrowBandInside.size() > 0) {\r\n\t\twhile (_narrowBandInside.size() > 0) {\r\n\t\t\t// get the maximum value\r\n\t\t\t// Location maxVal = _narrowBandInside.last();\r\n\t\t\tLocation maxVal = _narrowBandInside.last();\r\n\t\t\t// System.out.println(\"maxVal \" + maxVal);\r\n\t\t\t// System.out.println(\"_narrowBandInside.contains(maxVal) \"\r\n\t\t\t// + _narrowBandInside.contains(maxVal));\r\n\t\t\t// System.out.println(\"maxVal.compareTo(maxVal) \"\r\n\t\t\t// + maxVal.compareTo(maxVal));\r\n\r\n\t\t\t// get the neighbors that are still in _faraway\r\n\t\t\tint iPlus = imposeBorder(maxVal.i + 1, _iSize);\r\n\t\t\tint iMinus = imposeBorder(maxVal.i - 1, _iSize);\r\n\t\t\tint jPlus = imposeBorder(maxVal.j + 1, _iSize);\r\n\t\t\tint jMinus = imposeBorder(maxVal.j - 1, _iSize);\r\n\t\t\ttransferNeighborInside(iPlus, maxVal.j);\r\n\t\t\ttransferNeighborInside(iMinus, maxVal.j);\r\n\t\t\ttransferNeighborInside(maxVal.i, jPlus);\r\n\t\t\ttransferNeighborInside(maxVal.i, jMinus);\r\n\t\t\t// remove the value from the narrowband\r\n\t\t\t// _narrowBandInside.remove(maxVal);\r\n\t\t\t_narrowBandInside.remove(maxVal);\r\n\t\t}\r\n\t\t// done\r\n\t}", "private PointList center(PointList T, double radius){\n\t\t\n\t\tPointList centers = new PointList(Color.PINK);\n\t\tPoint[] extrema = new Point[4];\n\t\tPoint currentCenter;\n\t\t\n\t\tdouble xLength;\n\t\tdouble yLength;\n\t\tdouble xStart;\n\t\tdouble xEnd;\n\t\tdouble yStart;\n\t\tdouble yEnd;\n\t\t\n\t\textrema = T.getExtremePoints();\n\t\t\n\t\tif (extrema[0] == null) return centers; // centers is empty\n\t\t\n\t\tif (radius < T.delta()) return centers; // centers is empty\n\t\t\n\t\t// find X coordinates\n\t\tcurrentCenter = new Point(extrema[0].posX + radius, extrema[0].posY);\n\t\tif (currentCenter.posX + radius == extrema[1].posX) {\n\t\t\t// current x position is only possible x position\n\t\t\txStart = currentCenter.posX;\n\t\t\txEnd = xStart;\n\t\t\t\n\t\t} else {\n\t\t\t// we can move in x direction\n\t\t\txLength = Math.abs(currentCenter.posX + radius - extrema[1].posX);\n\t\t\txStart = currentCenter.posX - xLength;\n\t\t\txEnd = currentCenter.posX;\n\t\t}\n\n\t\t// find Y coordinates\n\t\tcurrentCenter = new Point(extrema[2].posX, extrema[2].posY + radius);\n\t\tif (currentCenter.posY + radius == extrema[3].posY) {\n\t\t\t// current y position is only possible y position\n\t\t\tyStart = currentCenter.posY;\n\t\t\tyEnd = yStart;\n\t\t} else {\n\t\t\t// we can move in y direction\n\t\t\tyLength = Math.abs(currentCenter.posY + radius - extrema[3].posY);\n\t\t\tyStart = currentCenter.posY - yLength;\n\t\t\tyEnd = currentCenter.posY;\n\t\t}\n\t\t\n\t\tcenters.addPoint(new Point(xStart, yStart));\n\t\tif (!centers.contains(new Point(xStart, yEnd))){\n\t\t\tcenters.addPoint(new Point(xStart, yEnd));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yStart))){\n\t\t\tcenters.addPoint(new Point(xEnd, yStart));\n\t\t}\n\t\tif (!centers.contains(new Point(xEnd, yEnd))){\n\t\t\tcenters.addPoint(new Point(xEnd, yEnd));\n\t\t}\n\t\t\n\t\treturn centers;\n\t\n\t}", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "private double[] getGoalPointAtLookaheadDistance(\n double[] initialPointOfLine, double[] finalPointOfLine, double[] nearestPoint) {\n\n // TODO: use lookahead distance proportional to robot max speed -> 0.5 * getRobotMaxSpeed()\n return Geometry.getPointAtDistance(\n initialPointOfLine, finalPointOfLine, nearestPoint, lookaheadDistance);\n }", "public Ball(Point center, int r, GameEnvironment environment) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n this.gameEnvironment = environment;\n }", "public void recalculateDistanceFunction()\r\n {\n findBoundaryGivenPhi();\r\n \r\n active.removeAllElements();\r\n\tfor(int i=0; i<pixelsWide; i++)\r\n\t\tfor(int j=0; j<pixelsHigh; j++)\r\n\t\t\t{\r\n if(!boundary.contains(new Int2d(i,j))) phi[i][j] = phiStart;\r\n //else System.out.println(\"Boundary point at i,j = \" + i + \", \" + j + \" with phi = \" + phi[i][j]);\r\n\t\t\t}\r\n \r\n //System.out.println(\"Building Initial Band\");\r\n\tbuildInitialBand(); \r\n \r\n //System.out.println(active.size());\r\n \r\n //System.out.println(\"Running Algorithm\");\r\n\twhile(active.size()>0)\r\n\t\t{\r\n\t\trunAlgorithmStep();\r\n\t\t}\r\n\t\r\n //System.out.println(\"Distance function calculated\");\r\n\t//maxPhi = findMaxPhi();\r\n }", "public void computeOptimalDir(CameraPlacementProblem problem)\n {\n \tint i, maxX = problem.getMaxX();\n \tint j, maxY = problem.getMaxY();\n \tint pos, maxTiles, angle, angleBest, goodCov;\n\n \tArrayList<Camera> cameraTestList = new ArrayList<Camera>();\n\n \t//Clear previous list\n \toptimalDir.clear();\n\n \tCameraPlacementResult result = null;\n \tCameraPlacementResult testResult = null;\n\n \t//Result of all previous cameras together in cameraList\n\t\tresult = CameraPlacement.evaluatePlacement(problem, cameraList);\n\n \t// iteratively walk along bottom wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxX; pos += posIncre)\n\t\t{\n\t\t\t//Quick check if current location is valid (saves time)\n\t\t\tif (!isValid(pos, 1))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, 1), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\t\t\t\t\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t//Result of newly created camera, alone\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t//Compute total good Coverage by camera (# tiles covered that were prev uncovered)\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\t//Concatentate bestInfo into double array\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = pos;\n\t\t\t\tinfo[3] = 1;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t// iteratively walk along top wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxX; pos += posIncre)\n\t\t{\n\t\t\tif (!isValid(pos, maxY - 1))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, maxY - 1), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = pos;\n\t\t\t\tinfo[3] = maxY - 1;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\t\t\n\t\t// iteratively walk along left wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxY; pos += posIncre)\n\t\t{\n\n\t\t\tif (!isValid(1, pos))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(1, pos), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\t\n\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = 1;\n\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t// iteratively walk along right wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxY; pos += posIncre)\n\t\t{\n\n\t\t\tif (!isValid(maxX - 1, pos))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(maxX - 1, pos), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = maxX - 1;\n\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t//================================================\n\t\t// Now need to do interior walls:/\n\t\t//================================================\n\t\t\n\t\tArrayList<Wall> interiorWalls = problem.getInteriorWalls();\n\t\tIterator intWallItr = interiorWalls.iterator();\n\n\t\twhile (intWallItr.hasNext())\n\t\t{\n\n\t\t\tWall wall = (Wall) intWallItr.next();\n\n\t\t\t//If vertical int wall\n\t\t\tif (wall.start.x == wall.end.x) \n\t\t\t{\n\t\t\t\t//For left side of wall\n\t\t\t\tfor (pos = (int) wall.start.y; pos <= wall.end.y; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(wall.start.x, pos), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = (int) wall.start.x;\n\t\t\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\n\t\t\t\t//Now for right side of wall\n\t\t\t\tfor (pos = (int) wall.start.y; pos <= wall.end.y; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(wall.start.x + 1, pos), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = (int) wall.start.x + 1;\n\t\t\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\n\n\t\t\t\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Else horizontal wall\n\t\t\telse\n\t\t\t{\n\t\t\t\t//For bottom side of wall\n\t\t\t\tfor (pos = (int) wall.start.x; pos <= wall.end.x; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, wall.start.y), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = pos;\n\t\t\t\t\t\tinfo[3] = (int) wall.start.y;\n\n\t\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\n\t\t\t\t//Now for top side of wall\n\t\t\t\tfor (pos = (int) wall.start.x; pos <= wall.end.x; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, wall.start.y + 1), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\tif (maxTiles > 0)\n\t\t\t\t{\n\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\tinfo[2] = pos;\n\t\t\t\t\tinfo[3] = (int) wall.start.y + 1;\n\n\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t}\n\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\n\n\t\t//for (j = 0; j < optimalDir.size(); j++)\n\t\t//\tSystem.out.println(\"[ \" + optimalDir.get(j)[0] + \" \" + optimalDir.get(j)[1] + \" \" + optimalDir.get(j)[2] + \" \" + optimalDir.get(j)[3] + \" ]\");\n }", "protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }", "private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\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\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}", "static int circularWalk(int n, int s, int t, int r_0, int g, int seed, int p){\n\t\tPoint[] points=new Point[n];\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tPoint point=new Point(r_0, false, false);\n\t\t\tif(i!=0)\n\t\t\t{\n\t\t\t\tpoint.rValue=((long)(points[i-1].rValue*g+seed))%p;\n\t\t\t}\n\t\t\tif(i==s){\n\t\t\t\tpoint.isSource=true;\n\t\t\t}\n\t\t\tif(i==t)\n\t\t\t\tpoint.isTarget=true;\n\t\t\tpoints[i]=point;\n\t\t}\n\t\tif(s==t)\n\t\t\treturn 0;\n\t\t//maintain visited and calculate if we can reach t from s,if we can't reach from a certain point,return Max\n\t\t//find the min of all the dfs possibilities\n\t\tHashSet<Integer> set=new HashSet<>();\n\t\treturn dfs(points,s,t,0,set);\n\t}", "private double getBPradius(PointList list1, PointList list2, double m, double M){\n\t\t\n\t\tdouble y = (m+M)/2;\n\t\t\n\t\tdouble e1 = Math.max(0, list1.delta() + _highwayLength/_velocity - list2.delta());\n\t\tdouble e2 = Math.max(0, list2.delta() - list1.delta() - _highwayLength/_velocity);\n\t\t\n\t\tPointList centers1 = center(list1, list1.delta() + e2 + y); // Center(H, d(H)+e2+x)\n\t\tPointList centers2 = center(list2, list2.delta() + e1 + y); // Center(W, d(W)+e1+x)\n\t\t\n\t\t// find maximum distance between centers1 and centers2\n\t\tdouble maxDist = centers1.objectMaxDist(centers2);\n\t\t\n\t\t// find minimum distance between centers1 and centers2\n\t\tdouble minDist = centers1.objectMinDist(centers2);\n\t\t\n\t\tif ((int)Math.abs(_prevY - y) == 0){\n\t\t\treturn _prevY;\n\t\t}\n\t\tif (maxDist >= _highwayLength && minDist <= _highwayLength){\n\t\t\t_prevY = y;\n\t\t\tif ((int)Math.abs(M-m) == 0){\n\t\t\t\treturn y;\n\t\t\t} else return getBPradius(list1, list2, m, y);\n\t\t} else {\n\t\t\treturn getBPradius(list1, list2, y, M);\n\t\t}\n\t\t\n\t}", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "public void updateGoalPositions() {\n // Convert angle to unit vector\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n // Create troops and set starting positions for each troop\n double topX = anchorX - (width - 1) * unitStats.spacing * sideUnitX / 2;\n double topY = anchorY - (width - 1) * unitStats.spacing * sideUnitY / 2;\n\n // Update troops goal positions\n for (int row = 0; row < aliveTroopsFormation.length; row++) {\n for (int col = 0; col < aliveTroopsFormation[0].length; col++) {\n BaseSingle troop = aliveTroopsFormation[row][col];\n if (troop == null) continue;\n double xGoalSingle;\n double yGoalSingle;\n // If the person is the flanker, go straight to the assigned position in flankers offset.\n if (state == UnitState.FIGHTING) {\n if (row < flankersCount[col]) {\n double offsetSide = flankerOffsets[col].get(row)[0];\n double offsetDown = flankerOffsets[col].get(row)[1];\n xGoalSingle = this.unitFoughtAgainst.getAverageX() + offsetSide * sideUnitX + offsetDown * downUnitX;\n yGoalSingle = this.unitFoughtAgainst.getAverageY() + offsetSide * sideUnitY + offsetDown * downUnitY;\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + (row - flankersCount[col]) * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + (row - flankersCount[col]) * unitStats.spacing * downUnitY;\n }\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + row * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + row * unitStats.spacing * downUnitY;\n }\n // Set the goal and change the state\n troop.setxGoal(xGoalSingle);\n troop.setyGoal(yGoalSingle);\n troop.setAngleGoal(anchorAngle);\n }\n }\n }", "public void runAlgorithm(PointList customers, int highwayLength, int velocity) {\n\t\t\n\t\tif (!customers.isEmpty()){\n\t\t\tthis._highwayLength = highwayLength;\n\t\t\tthis._velocity = velocity;\n\t\t\t_maxDist = customers.maxDist();\n\t\t\t\n\t\t\t// for drawing purposes only\n\t\t\tfacilityPoints = new ArrayList<Point>();\n\t\t\tturnpikePoints = new ArrayList<Point>();\n\t\t\tpartitionRadius = new ArrayList<Double>();\n\t\t\t\n\t\t\tset_withTurnpike = new ArrayList<PointList>();\n\t\t\tset_withoutTurnpike = new ArrayList<PointList>();\n\t\t\textremePoints1 = new ArrayList<Point[]>();\n\t\t\textremePoints2 = new ArrayList<Point[]>();\n\t\t\tlist_centersWithoutTurnpike = new ArrayList<PointList>();\n\t\t\tlist_centersWithTurnpike = new ArrayList<PointList>();\n\t\t\t\n\t\t\tgetPartition(customers);\n\t\t\t\n\t\t\tmaxDist1 = new ArrayList<Point>();\n\t\t\tmaxDist2 = new ArrayList<Point>();\n\t\t\tminDist1 = new ArrayList<Point>();\n\t\t\tminDist2 = new ArrayList<Point>();\n\t\t\t\n\t\t\t// compute extreme points\n\t\t\tfor (PointList p : set_withTurnpike){\n\t\t\t\textremePoints1.add(p.getExtremePoints());\n\t\t\t}\n\t\t\tfor (PointList p : set_withoutTurnpike){\n\t\t\t\textremePoints2.add(p.getExtremePoints());\n\t\t\t}\n\t\t\t\n\t\t\t// solve basic problem for all partitions {W,H}\n\t\t\tfor (int i = 0; i < set_withTurnpike.size(); i++){\n\n\t\t\t\t_eps1 = Math.max(0, set_withTurnpike.get(i).delta() + highwayLength/velocity - set_withoutTurnpike.get(i).delta());\n\t\t\t\t_eps2 = Math.max(0, set_withoutTurnpike.get(i).delta() - set_withTurnpike.get(i).delta() - highwayLength/velocity);\n\n\t\t\t\tsolveBP(set_withTurnpike.get(i), set_withoutTurnpike.get(i)); \n\t\t\t\tfacilityPoints.add(_currentFacility);\n\t\t\t\tturnpikePoints.add(_currentTurnpikeStart);\n\t\t\t\tpartitionRadius.add(_currentRadius);\n\t\t\t\t\n\t\t\t\t// for drawing purposes\n\t\t\t\t// fixed length\n\t\t\t\tlist_centersWithoutTurnpike.add(center(set_withTurnpike.get(i), set_withTurnpike.get(i).delta() + _eps2 + _x));\n\t\t\t\tlist_centersWithTurnpike.add(center(set_withoutTurnpike.get(i), set_withoutTurnpike.get(i).delta() + _eps1 + _x));\n\t\t\t\t\n\t\t\t\tif (list_centersWithoutTurnpike.get(i).objectContains\n\t\t\t\t\t\t(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0])\n\t\t\t\t\t\t|| list_centersWithTurnpike.get(i).objectContains\n\t\t\t\t\t\t(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1])){\n\t\t\t\t\tminDist1.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0]); \n\t\t\t\t\tminDist2.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1]);\n\t\t\t\t} else {\n\t\t\t\t\tminDist1.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[1]); \n\t\t\t\t\tminDist2.add(list_centersWithoutTurnpike.get(i).objectMinDistPoints(list_centersWithTurnpike.get(i))[0]);\n\t\t\t\t}\n\t\t\t\tmaxDist1.add(list_centersWithoutTurnpike.get(i).objectMaxDistPoints(list_centersWithTurnpike.get(i))[0]); \n\t\t\t\tmaxDist2.add(list_centersWithoutTurnpike.get(i).objectMaxDistPoints(list_centersWithTurnpike.get(i))[1]);\n\t\t\t}\t\n\t\t\t\n\t\t\tif(customers.getSize() > 1){\n\t\t\t\t// find optimal solution\n\t\t\t\tsolutionIndex = getMinRadiusIndex(); \n\t\t\t\tsolution_facility = facilityPoints.get(solutionIndex);\n\t\t\t\tsolution_turnpikeStart = turnpikePoints.get(solutionIndex);\n//\t\t\t\tsolution_radius = partitionRadius.get(solutionIndex);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n Random r = new Random();\n// r.setSeed(1982);\n int R = 500;\n int L = 100000;\n\n int start = -500;\n int end = 500;\n HashSet<Point> hi3 = new HashSet<>();\n List<Point> hi5 = new ArrayList<>();\n Stopwatch sw = new Stopwatch();\n for (int i = 0; i < L; i += 1) {\n double ran = r.nextDouble();\n double x = start + (ran * (end - start));\n ran = r.nextDouble();\n double y = start + (ran * (end - start));\n Point temp = new Point(x, y);\n hi5.add(temp);\n\n }\n KDTree speedTest = new KDTree(hi5);\n NaivePointSet speedTest2 = new NaivePointSet(hi5);\n\n// for (int i = 0; i < 1000; i++) {\n// double ran = r.nextDouble();\n// double x2 = start + (ran *(end - start));\n// ran = r.nextDouble();\n// double y2 = start + (ran *(end - start));\n// assertEquals(speedTest2.nearest(x2, y2), speedTest.nearest(x2, y2 ));\n// }\n// assertEquals(speedTest2.nearest(r.nextInt(R + 1 - 500) + 500,\n// r.nextInt(R + 1 - 500) + 100), speedTest.nearest(427.535670, -735.656403));\n\n System.out.println(\"elapsed time1: \" + sw.elapsedTime());\n\n int R2 = 100;\n int L2 = 10000;\n Stopwatch sw2 = new Stopwatch();\n for (int i = 0; i < L2; i += 1) {\n\n speedTest2.nearest(r.nextDouble(), r.nextDouble());\n }\n\n System.out.println(\"elapsed time: \" + sw2.elapsedTime());\n }", "private double calculateSpiralDistanceFromCentre(double phi)\n\t{\n\t\treturn a*Math.exp(b*phi);\n\t}", "private static float[] getPlanBounds(List<float[]> list) {\n float xStart = Float.MAX_VALUE;\n float yStart = Float.MAX_VALUE;\n float zStart = Float.MAX_VALUE;\n float xEnd = Float.MIN_VALUE;\n float yEnd = Float.MIN_VALUE;\n float zEnd = Float.MIN_VALUE;\n for (float[] point : list) {\n if (point[0] < xStart) {\n xStart = point[0];\n }\n if (point[0] > xEnd) {\n xEnd = point[0];\n }\n if (point[1] < yStart) {\n yStart = point[1];\n }\n if (point[1] > yEnd) {\n yEnd = point[1];\n }\n if (point[2] < zStart) {\n zStart = point[2];\n }\n if (point[2] > zEnd) {\n zEnd = point[2];\n }\n }\n return new float[]{xStart, xEnd, yStart, yEnd, zStart, zEnd};\n }", "public void lookHere(int x, int y, int ID){\n\n\n\n switch (ID){\n case FLY:\n //find faces close enough\n /*for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n if(ViewTools.getDistancetoNonSQRTD(x,y,face.getCenterX(),face.getCenterY())<FlyFocusDistanceNONSQRTD){\n lookHere(x,y,face,FLY);\n }else StopLookingOne(FLY, face);\n }*/\n\n //pick one face\n class faceDistance{\n public float distance;\n public Face face;\n faceDistance(float distance, Face face) {\n this.distance = distance;\n this.face = face;\n }\n\n }\n ArrayList<faceDistance> distances = new ArrayList<faceDistance>();\n for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n float flyDistance = ViewTools.getDistancetoNonSQRTD(x, y, face.getCenterX(), face.getCenterY());\n //Log.d(\"BRAIN\", \"FLY DISTANCE SQUARED:\" + FlyFocusDistanceNONSQRTD + \" this face distance: \"+ flyDistance);\n if(flyDistance <FlyFocusDistanceNONSQRTD){\n distances.add(new faceDistance(flyDistance,mFaces.get(i)));\n }else StopLookingOne(FLY, face);\n\n }\n\n ArrayList<faceDistance> distancesSorted = new ArrayList<faceDistance>();\n if(distances.size()>0)distancesSorted.add(distances.get(0));\n for(int i=1;i<distances.size();i++){\n int distanceSortedSize=distancesSorted.size();\n for(int i2=0;i2<distanceSortedSize;i2++){\n if(i2==distancesSorted.size()-1)distancesSorted.add(distances.get(i));\n else if(distances.get(i).distance<distancesSorted.get(i2).distance){\n distancesSorted.add(i2,distances.get(i));\n i2=distancesSorted.size();\n }\n }\n\n }\n\n\n for(int i=0;i<distancesSorted.size();i++){\n if(i< MAX_FLY_FOCUSES||MAX_FLY_FOCUSES==UNRESTRICTED)lookHere(x,y,distancesSorted.get(i).face,FLY);\n else StopLookingOne(FLY,distancesSorted.get(i).face);\n\n }\n\n ///picking one face\n\n\n break;\n case FINGER:\n for(int i=0;i<mFaces.size();i++){\n Face face = mFaces.get(i);\n if(ViewTools.getDistancetoNonSQRTD(x,y,face.getCenterX(),face.getCenterY())<FlyFocusDistanceNONSQRTD*2){\n lookHere(x,y,face,FINGER);\n }else StopLookingOne(FINGER, face);\n }\n break;\n case FROG:\n ///select a face to look at the frog\n //command to look only sent once, eyes stay looking at frog, until relase code sent\n int faceSelected = mRandom.nextInt(mFaces.size()-1);\n if(faceSelected== mFrogIndex)faceSelected++;\n mFaces.get(faceSelected).SetEyeAdjustDuration(true);\n lookHere(x, y, mFaces.get(faceSelected), FROG);\n\n new lookAway(mFaces.get(faceSelected),mFrog.getFrogLookAttentionLength());\n\n //mFrog.setFrogLookAttentionLength(mFrog.getFrogLookAttentionLength()*2);\n //mFrog.setFrogLookInterval((long) (mFrog.getFrogLookInterval()*.90));\n //Log.d(\"Brain\", \"frog look interval:\"+ mFrog.getFrogLookInterval());\n //Log.d(\"Brain\", \"frog look lenght:\"+ mFrog.getFrogLookAttentionLength());\n\n break;\n case REVEALED_FROG:\n ///\n break;\n\n }\n\n }", "private void calculateDistances() {\n for (int point = 0; point < ntree.size(); point++) {\n calculateDistances(point);\n }\n }", "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Point3D(0, 2, -10));\n list.add(new Point3D(0.5, 0, -100));\n\n assertEquals(list.get(2), ray.findClosestPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<Point3D> list2 = null;\n assertNull(\"try again\",ray.findClosestPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<Point3D> list3 = new LinkedList<Point3D>();\n list3.add(new Point3D(0, 2, -10));\n list3.add(new Point3D(-1, 1, -99));\n list3.add(new Point3D(1, 1, -100));\n list3.add(new Point3D(0.5, 0, -100));\n assertEquals(list3.get(0), ray.findClosestPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<Point3D> list4 = new LinkedList<Point3D>();\n list4.add(new Point3D(1, 1, -100));\n list4.add(new Point3D(0.5, 0, -100));\n list4.add(new Point3D(-1, 1, -99));\n list4.add(new Point3D(0, 2, -10));\n assertEquals(list4.get(3), ray.findClosestPoint(list4));\n\n }", "public boolean constrainEdges(final TimeStep step) {\n\t\tfloat perimeter = 0.0f;\n\t\tfor (int i=0; i<bodies.length; ++i) {\n\t\t\tfinal int next = (i==bodies.length-1)?0:i+1;\n\t\t\tfinal float dx = bodies[next].getWorldCenter().x-bodies[i].getWorldCenter().x;\n\t\t\tfinal float dy = bodies[next].getWorldCenter().y-bodies[i].getWorldCenter().y;\n\t\t\tfloat dist = MathUtils.sqrt(dx*dx+dy*dy);\n\t\t\tif (dist < Settings.EPSILON) {\n\t\t\t\tdist = 1.0f;\n\t\t\t}\n\t\t\tnormals[i].x = dy / dist;\n\t\t\tnormals[i].y = -dx / dist;\n\t\t\tperimeter += dist;\n\t\t}\n\n\t\tfinal Vector delta = pool.popVector();\n\n\t\tfinal float deltaArea = targetVolume - getArea();\n\t\tfinal float toExtrude = 0.5f*deltaArea / perimeter; //*relaxationFactor\n\t\t//float sumdeltax = 0.0f;\n\t\tboolean done = true;\n\t\tfor (int i=0; i<bodies.length; ++i) {\n\t\t\tfinal int next = (i==bodies.length-1)?0:i+1;\n\t\t\tdelta.set(toExtrude * (normals[i].x + normals[next].x),\n\t\t\t\t\ttoExtrude * (normals[i].y + normals[next].y));\n\t\t\t//sumdeltax += dx;\n\t\t\tfinal float norm = delta.length();\n\t\t\tif (norm > Settings.maxLinearCorrection){\n\t\t\t\tdelta.scaleLocal(Settings.maxLinearCorrection/norm);\n\t\t\t}\n\t\t\tif (norm > Settings.linearSlop){\n\t\t\t\tdone = false;\n\t\t\t}\n\t\t\tbodies[next].m_sweep.c.x += delta.x;\n\t\t\tbodies[next].m_sweep.c.y += delta.y;\n\t\t\tbodies[next].synchronizeTransform();\n\t\t\t//bodies[next].m_linearVelocity.x += delta.x * step.inv_dt;\n\t\t\t//bodies[next].m_linearVelocity.y += delta.y * step.inv_dt;\n\t\t}\n\n\t\tpool.pushVector(1);\n\t\t//System.out.println(sumdeltax);\n\t\treturn done;\n\t}", "public static float[] getPlanCenter(List<float[]> list) {\n float[] bounds = getPlanBounds(list);\n return new float[]{(bounds[0] + bounds[1]) / 2, (bounds[2] + bounds[3]) / 2,\n (bounds[4] + bounds[5]) / 2};\n }", "public void updateAccelerations(double xLimit, double yLimit) {\n // Loop all entities and update their accelerations in parallel\n entities.parallelStream().forEach(cur -> {\n int alignmentNeighbors = 0;\n int cohesionNeighbors = 0;\n int separationNeighbors = 0;\n Vector2D alignment = new Vector2D();\n Vector2D cohesion = new Vector2D();\n Vector2D separation = new Vector2D();\n\n // Use nearby entities to determinate forces\n for (Entity ee : entities) {\n if (ee == cur) continue;\n //if (cur.angleToEntity(ee) > detectionAngleBox.val/2) continue;\n double dist = Math.max(cur.distanceFrom(ee), 0.001);\n\n if (dist < alignmentDistanceBox.val) {\n alignmentNeighbors++;\n alignment.add(ee.getVelocity());\n }\n if (dist < cohesionDistanceBox.val) {\n cohesionNeighbors++;\n cohesion.add(ee.getPosition());\n }\n if (dist < separationDistanceBox.val) {\n separationNeighbors++;\n separation.add(new Vector2D(cur.getPosition()).subtract(ee.getPosition())\n .ensureDirection()\n .divide(dist*dist));\n }\n }\n\n if (alignmentNeighbors != 0)\n alignment\n .divide(alignmentNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (cohesionNeighbors != 0)\n cohesion\n .divide(cohesionNeighbors)\n .subtract(cur.getPosition())\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n if (separationNeighbors != 0)\n separation\n .divide(separationNeighbors)\n .setMagnitude(maxSpeedBox.val)\n .subtract(cur.getVelocity())\n .limit(maxForceBox.val);\n\n cur.getAcceleration()\n .add(alignment.multiply(alignmentMultiplierBox.val))\n .add(cohesion.multiply(cohesionMultiplierBox.val))\n .add(separation.multiply(separationMultiplierBox.val))\n .limit(maxSpeedBox.val);\n\n // Border force\n double bfX = cur.getX() < xLimit/2 ? 100/Math.pow(cur.getX(),2) : -100/Math.pow(xLimit - cur.getX(),2);\n double bfY = cur.getY() < yLimit/2 ? 100/Math.pow(cur.getY(),2) : -100/Math.pow(yLimit - cur.getY(),2);\n cur.getAcceleration().add(new Vector2D(bfX, bfY)).limit(maxSpeedBox.val);\n });\n }", "public void checkBallCollisions(Ball ball, Board board, ArrayList<Brick> bricks) {\n float currDir = ball.getDirection();\n // check if the ball has hit any of the bricks\n for(Brick brick : bricks){\n boolean hitBrick = false;\n boolean hitCorner = false;\n\n if (ball.intersects(brick.getTopLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle<reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getTopRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getTopRightCorner());\n if (ball.hasPositiveXDirection() && angle>reverseVerticalDirection(angle) && angle<Math.PI) ball.reverseVerticalDirection();\n else if (ball.hasPositiveYDirection() && (angle<reverseHorizontalDirection(angle)\n || angle>Math.PI)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomLeftCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomLeftCorner());\n if ((!ball.hasPositiveXDirection()) && angle>reverseVerticalDirection(angle)) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle<reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n } else if (ball.intersects(brick.getBottomRightCorner())) {\n float angle = getDirectionAfterCollisionWithCircle(ball,brick.getBottomRightCorner());\n if (ball.hasPositiveXDirection() && angle<reverseVerticalDirection(angle) && angle>Math.PI) ball.reverseVerticalDirection();\n else if ((!ball.hasPositiveYDirection()) && angle>reverseHorizontalDirection(angle)) ball.reverseHorizontalDirection();\n else ball.setDirection(angle);\n hitCorner = true;\n }\n if (hitCorner) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n if (ball.intersects(brick.getNorthLine()) && Math.PI<=currDir\n && currDir<=2*Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getSouthLine()) && 0<=currDir\n && currDir<=Math.PI) {\n ball.reverseVerticalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getWestLine()) && ((0<=currDir\n && currDir<=(Math.PI)/2) || ((3*Math.PI)/2<=currDir\n && currDir<=2*Math.PI))) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n } else if (ball.intersects(brick.getEastLine()) && (Math.PI)/2<=currDir\n && currDir<=(3*Math.PI)/2) {\n ball.reverseHorizontalDirection();\n hitBrick = true;\n }\n if (hitBrick) {\n brick.decrementLife(); Points.getInstance().addPoints(10);\n break;\n }\n }\n\n // check if the ball has hit the ceiling or one of the walls\n if (ball.getY() <= ceilingPos) {\n ball.setY(ceilingPos);\n ball.reverseVerticalDirection();\n } else if (ball.getMaxX() >= rightWallPos) {\n ball.setX(rightWallPos - 2 * ball.getRadius());\n ball.reverseHorizontalDirection();\n } else if (ball.getX() <= leftwallPos) {\n ball.setX(leftwallPos);\n ball.reverseHorizontalDirection();\n }\n\n // check if the ball has hit the board\n if (currDir>((Math.PI)/6) && currDir<((3*Math.PI)/6)) return;\n if (ball.intersects(board.getBody()) && currDir>Math.PI) {\n ball.reverseVerticalDirection();\n } else if (ball.intersects(board.getLeftEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getLeftEdge());\n if (angle<((Math.PI)/2) || angle>(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n } else if (ball.intersects(board.getRightEdge())) {\n float angle = getDirectionAfterCollisionWithCircle(ball, board.getRightEdge());\n if (angle>((Math.PI)/2) && angle<(3*Math.PI)/2) ball.reverseVerticalDirection();\n else ball.setDirection(angle);\n }\n }", "public void scatter(ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n final int MAXTILE = 160;\r\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls,0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if(isIntersection) {\r\n if(!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isLeftCollision && this.direction !=2) {\r\n leftDistance = Math.pow((xPos - 20) - SCATTERX,2) + Math.pow(yPos - SCATTERY,2);\r\n }\r\n if(!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos-20) - SCATTERY,2);\r\n }\r\n if(!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - SCATTERX,2) + Math.pow((yPos+20) - SCATTERY,2);\r\n }\r\n if(upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n }\r\n else if(downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n }\r\n\r\n else if(rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n }\r\n\r\n else if(leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if(this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if(this.direction ==1) {\r\n yPos = yPos + 5;\r\n }\r\n if(this.direction ==2) {\r\n xPos = xPos + 5;\r\n }\r\n if(this.direction == 3) {\r\n xPos = xPos -5;\r\n }\r\n\r\n }", "public void chase(int targetX, int targetY, ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls, 0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if (isIntersection) {\r\n if (!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isLeftCollision && this.direction != 2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos - 20) - targetY, 2);\r\n }\r\n if (!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos + 20) - targetY, 2);\r\n }\r\n if (upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n } else if (downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n } else if (rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n } else if (leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if (this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if (this.direction == 1) {\r\n yPos = yPos + 5;\r\n }\r\n if (this.direction == 2) {\r\n xPos = xPos + 5;\r\n }\r\n if (this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n\r\n }", "public void moveOneStep(double dt) {\r\n double movementX = this.p.getX() + dt * this.vel.getDx();\r\n double movementY = this.p.getY() + dt * this.vel.getDy();\r\n Line trajectory = new Line(this.p, new Point(movementX, movementY));\r\n CollisionInfo collInfo = gameE.getClosestCollision(trajectory);\r\n // if there is a collision point collInfo doesn't equal to null.\r\n if (collInfo != null) {\r\n double x = this.getX();\r\n double y = this.getY();\r\n Point collisionPoint = collInfo.collisionPoint();\r\n Collidable obj = collInfo.collisionObject();\r\n Rectangle r = obj.getCollisionRectangle();\r\n // Check if the ball hit on one of the corners block.\r\n if (collisionPoint.getY() == collisionPoint.getX()) {\r\n // If the ball hit on the top corners.\r\n if (collisionPoint.getY() == r.getUpperLeft().getY()\r\n || collisionPoint.getX() == r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() - this.getSize() - 0.001;\r\n y = collisionPoint.getY() - this.getSize() - 0.001;\r\n // else the ball hit on the bottom corners.\r\n } else {\r\n x = collisionPoint.getX() + this.getSize() + 0.001;\r\n y = collisionPoint.getY() + this.getSize() + 0.001;\r\n }\r\n // Set a new velocity.\r\n this.setVelocity(obj.hit(this, collInfo.collisionPoint(), this.getVelocity()));\r\n this.p = new Point(x, y);\r\n return;\r\n }\r\n\r\n // If the ball hit on the left border block.\r\n if (collisionPoint.getX() == r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() - this.getSize() - 0.001;\r\n y = collisionPoint.getY();\r\n // If the ball hit on the right border block.\r\n } else if (collisionPoint.getX() == r.getWidth() + r.getUpperLeft().getX()) {\r\n x = collisionPoint.getX() + this.getSize() + 0.001;\r\n y = collisionPoint.getY();\r\n\r\n }\r\n // If the ball hit on the top border block.\r\n if (collisionPoint.getY() == r.getUpperLeft().getY()) {\r\n y = collisionPoint.getY() - this.getSize() - 0.001;\r\n x = collisionPoint.getX();\r\n // If the ball hit on the bottom border block.\r\n } else if (collisionPoint.getY() == r.getHeight() + r.getUpperLeft().getY()) {\r\n y = collisionPoint.getY() + this.getSize() + 0.001;\r\n x = collisionPoint.getX();\r\n }\r\n // set a new velocity.\r\n this.setVelocity(obj.hit(this, collInfo.collisionPoint(), this.getVelocity()));\r\n this.p = new Point(x, y);\r\n // else move the ball one step.\r\n } else {\r\n this.p = this.getVelocity().applyToPoint(this.p, dt);\r\n }\r\n }", "private static double[][] makeRegularPoly(double centerLat, double centerLon, double radiusMeters, int gons) {\n\n double[][] result = new double[2][];\n result[0] = new double[gons+1];\n result[1] = new double[gons+1];\n for(int i=0;i<gons;i++) {\n double angle = i*(360.0/gons);\n double x = Math.cos(Math.toRadians(angle));\n double y = Math.sin(Math.toRadians(angle));\n double factor = 2.0;\n double step = 1.0;\n int last = 0;\n\n //System.out.println(\"angle \" + angle + \" slope=\" + slope);\n // Iterate out along one spoke until we hone in on the point that's nearly exactly radiusMeters from the center:\n while (true) {\n double lat = centerLat + y * factor;\n GeoUtils.checkLatitude(lat);\n double lon = centerLon + x * factor;\n GeoUtils.checkLongitude(lon);\n double distanceMeters = SloppyMath.haversinMeters(centerLat, centerLon, lat, lon);\n\n //System.out.println(\" iter lat=\" + lat + \" lon=\" + lon + \" distance=\" + distanceMeters + \" vs \" + radiusMeters);\n if (Math.abs(distanceMeters - radiusMeters) < 0.1) {\n // Within 10 cm: close enough!\n result[0][i] = lat;\n result[1][i] = lon;\n break;\n }\n\n if (distanceMeters > radiusMeters) {\n // too big\n //System.out.println(\" smaller\");\n factor -= step;\n if (last == 1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = -1;\n } else if (distanceMeters < radiusMeters) {\n // too small\n //System.out.println(\" bigger\");\n factor += step;\n if (last == -1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = 1;\n }\n }\n }\n\n // close poly\n result[0][gons] = result[0][0];\n result[1][gons] = result[1][0];\n\n return result;\n }", "public static void addVectorCircle(MapLocation center, float size, float baseDesire, float distanceDesire) {\n switch (vectorCircleCount) {\n case 0:\n Z1vc_baseDesire = baseDesire + (distanceDesire * size);\n Z1vc_distanceDesire = -distanceDesire;\n Z1vc_center = center;\n Z1vc_size = size;\n vectorCircleCount++;\n break;\n case 1:\n Z2vc_baseDesire = baseDesire + (distanceDesire * size);\n Z2vc_distanceDesire = -distanceDesire;\n Z2vc_center = center;\n Z2vc_size = size;\n vectorCircleCount++;\n break;\n case 2:\n Z3vc_baseDesire = baseDesire + (distanceDesire * size);\n Z3vc_distanceDesire = -distanceDesire;\n Z3vc_center = center;\n Z3vc_size = size;\n vectorCircleCount++;\n break;\n case 3:\n Z4vc_baseDesire = baseDesire + (distanceDesire * size);\n Z4vc_distanceDesire = -distanceDesire;\n Z4vc_center = center;\n Z4vc_size = size;\n vectorCircleCount++;\n break;\n case 4:\n Z5vc_baseDesire = baseDesire + (distanceDesire * size);\n Z5vc_distanceDesire = -distanceDesire;\n Z5vc_center = center;\n Z5vc_size = size;\n vectorCircleCount++;\n break;\n case 5:\n Z6vc_baseDesire = baseDesire + (distanceDesire * size);\n Z6vc_distanceDesire = -distanceDesire;\n Z6vc_center = center;\n Z6vc_size = size;\n vectorCircleCount++;\n break;\n case 6:\n Z7vc_baseDesire = baseDesire + (distanceDesire * size);\n Z7vc_distanceDesire = -distanceDesire;\n Z7vc_center = center;\n Z7vc_size = size;\n vectorCircleCount++;\n break;\n case 7:\n Z8vc_baseDesire = baseDesire + (distanceDesire * size);\n Z8vc_distanceDesire = -distanceDesire;\n Z8vc_center = center;\n Z8vc_size = size;\n vectorCircleCount++;\n break;\n case 8:\n Z9vc_baseDesire = baseDesire + (distanceDesire * size);\n Z9vc_distanceDesire = -distanceDesire;\n Z9vc_center = center;\n Z9vc_size = size;\n vectorCircleCount++;\n break;\n case 9:\n Z10vc_baseDesire = baseDesire + (distanceDesire * size);\n Z10vc_distanceDesire = -distanceDesire;\n Z10vc_center = center;\n Z10vc_size = size;\n vectorCircleCount++;\n break;\n case 10:\n Z11vc_baseDesire = baseDesire + (distanceDesire * size);\n Z11vc_distanceDesire = -distanceDesire;\n Z11vc_center = center;\n Z11vc_size = size;\n vectorCircleCount++;\n break;\n case 11:\n Z12vc_baseDesire = baseDesire + (distanceDesire * size);\n Z12vc_distanceDesire = -distanceDesire;\n Z12vc_center = center;\n Z12vc_size = size;\n vectorCircleCount++;\n break;\n case 12:\n Z13vc_baseDesire = baseDesire + (distanceDesire * size);\n Z13vc_distanceDesire = -distanceDesire;\n Z13vc_center = center;\n Z13vc_size = size;\n vectorCircleCount++;\n break;\n case 13:\n Z14vc_baseDesire = baseDesire + (distanceDesire * size);\n Z14vc_distanceDesire = -distanceDesire;\n Z14vc_center = center;\n Z14vc_size = size;\n vectorCircleCount++;\n break;\n case 14:\n Z15vc_baseDesire = baseDesire + (distanceDesire * size);\n Z15vc_distanceDesire = -distanceDesire;\n Z15vc_center = center;\n Z15vc_size = size;\n vectorCircleCount++;\n break;\n case 15:\n Z16vc_baseDesire = baseDesire + (distanceDesire * size);\n Z16vc_distanceDesire = -distanceDesire;\n Z16vc_center = center;\n Z16vc_size = size;\n vectorCircleCount++;\n break;\n case 16:\n Z17vc_baseDesire = baseDesire + (distanceDesire * size);\n Z17vc_distanceDesire = -distanceDesire;\n Z17vc_center = center;\n Z17vc_size = size;\n vectorCircleCount++;\n break;\n case 17:\n Z18vc_baseDesire = baseDesire + (distanceDesire * size);\n Z18vc_distanceDesire = -distanceDesire;\n Z18vc_center = center;\n Z18vc_size = size;\n vectorCircleCount++;\n break;\n case 18:\n Z19vc_baseDesire = baseDesire + (distanceDesire * size);\n Z19vc_distanceDesire = -distanceDesire;\n Z19vc_center = center;\n Z19vc_size = size;\n vectorCircleCount++;\n break;\n case 19:\n Z20vc_baseDesire = baseDesire + (distanceDesire * size);\n Z20vc_distanceDesire = -distanceDesire;\n Z20vc_center = center;\n Z20vc_size = size;\n vectorCircleCount++;\n break;\n }\n }", "int fordFulkerson(int graph[][], int s, int t) {\n int u, v; // Create a residual graph and fill the residual graph with given capacities in the original graph as residual capacities in residual graph\n int rGraph[][] = new int[MaxFlow.graph.getNumOfNode()][MaxFlow.graph.getNumOfNode()]; // Residual graph where rGraph[i][j] indicates residual capacity of edge from i to j (if there is an edge. If rGraph[i][j] is 0, then there is not)\n\n for (u = 0; u < MaxFlow.graph.getNumOfNode(); u++)\n for (v = 0; v < MaxFlow.graph.getNumOfNode(); v++)\n rGraph[u][v] = graph[u][v]; //store the graph capacities\n\n int parent[] = new int[MaxFlow.graph.getNumOfNode()]; // This array is filled by BFS and to store path\n int max_flow = 0; // There is no flow initially\n\n while (bfs(rGraph, s, t, parent)) { // Augment the flow while there is path from source to sink\n int path_flow = Integer.MAX_VALUE; // Find minimum residual capacity of the edges along the path filled by BFS. Or we can say find the maximum flow through the path found.\n for (v = t; v != s; v = parent[v]) { //when v=0 stop the loop\n u = parent[v];\n path_flow = Math.min(path_flow, rGraph[u][v]);\n }\n\n for (v = t; v != s; v = parent[v]) { // update residual capacities of the edges and reverse edges along the path\n u = parent[v];\n rGraph[u][v] -= path_flow; //min the path cap\n rGraph[v][u] += path_flow; //add the path cap\n\n }\n System.out.println(\"Augmenting Path \"+ path_flow);\n max_flow += path_flow; // Add path flow to overall flow\n }\n return max_flow; // Return the overall flow\n }", "public void resolveConstraints(){\n double distX = pointA.getCurrent().getX() - pointB.getCurrent().getX();\n double distY = pointA.getCurrent().getY() - pointB.getCurrent().getY();\n double dist = Math.sqrt((distX*distX) + (distY*distY));\n double difference = (restingDistance - dist) / dist;\n\n // Use this scalar to determine how much to move points A and B.\n // Move points halfway towards their resting distance.\n double moveX = distX * 0.5 * difference;\n double moveY = distY * 0.5 * difference;\n pointA.getCurrent().setLocation(pointA.getCurrent().getX() + moveX, pointA.getCurrent().getY() + moveY);\n pointB.getCurrent().setLocation(pointB.getCurrent().getX() - moveX, pointB.getCurrent().getY() - moveY);\n }", "public void lungs(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-45);\n double r2 = angle + Math.toRadians(45);\n double r3 = angle + Math.toRadians(135);\n double r4 = angle + Math.toRadians(-135);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n double l4 = length/1.3 + (l4I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n int dx = (int)(x - Math.sin(r4)*l4)+(int)(l4I);\n int dy = (int)(y - Math.cos(r4)*l4)+(int)(l4I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n bbg.drawLine(x,y,dx,dy);\n\n\n\n //call recursively to draw fractal\n lungs(bbg, n - 1, (int)l1, ax,ay,r1);\n lungs(bbg, n - 1, (int)l2, bx,by,r2);\n lungs(bbg, n - 1, (int)l3, cx,cy,r3);\n lungs(bbg, n - 1, (int)l4, dx,dy,r4);\n\n\n }", "private static double findOneSetCost(int r, int [] set,\r\n Vector oneSetVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n ArrayList setNeighbors = new ArrayList();\r\n for ( int i = 0; i < set.length; i++)\r\n {\r\n int index = set[i] - 1;\r\n Host neighbor = (Host) neighbors.get(index);\r\n setNeighbors.add(neighbor);\r\n }\r\n double [][] setDistanceArray = findDistanceArray(currentNode, destList, setNeighbors);\r\n //the setDistanceArray[r][m]\r\n\r\n //check if any neighbor in set is not common neighbor for all dests\r\n //if a neighbor is so, return a MaxDistance, hopArray = NULL\r\n int m = destList.size();\r\n for ( int i = 0; i < m; i++)\r\n {\r\n int num = 0;\r\n for ( int j = 0; j < r; j++)\r\n {\r\n if (setDistanceArray[j][i] < 0)\r\n {\r\n num++;\r\n setDistanceArray[j][i] = MaxDistance;\r\n }\r\n }\r\n if ( num >= r )\r\n {\r\n // All the neighbors in set cannot forward to destination[i]\r\n oneSetVector.clear(); // ???\r\n return MaxDistance;\r\n }\r\n }\r\n\r\n //find forward nodes provides min remain distance\r\n double totalCost = 0.0;\r\n\r\n //go thourgh destList, find a best forward neighbor for each dest\r\n //add the distance to totalRemainDistance\r\n for (int i = 0; i < m; ++i) {//loop through destList\r\n double minCost = setDistanceArray[0][i];//get first neighbor for each dest\r\n oneSetVector.add(i, setNeighbors.get(0));\r\n for (int j = 0; j < r; ++j) {// Loop through the neighbor\r\n if (minCost > setDistanceArray[j][i]) {\r\n // Swap\r\n minCost = setDistanceArray[j][i];\r\n oneSetVector.set(i, setNeighbors.get(j));\r\n }\r\n }\r\n totalCost += minCost;\r\n }\r\n\r\n return totalCost;\r\n }", "public static void main(String[] args) {\n MaxDistance max = new MaxDistance();\n //int arr[] = {9, 2, 3, 4, 5, 6, 7, 8, 18, 0};\n\n //int arr[] = {3, 5, 4, 2};\n //int arr[] = {3,2,1};\n //int arr[] = {1,10};\n int arr[] = {100, 100, 100}; //return 0, not checking equal value\n \n //int arr[] = { 83564666, 2976674, 46591497, 24720696, 16376995, 63209921, 25486800, 49369261, 20465079, 64068560, 7453256, 14180682, 65396173, 45808477, 10172062, 28790225, 82942061, 88180229, 62446590, 77573854, 79342753, 2472968, 74250054, 17223599, 47790265, 24757250, 40512339, 24505824, 30067250, 82972321, 32482714, 76111054, 74399050, 65518880, 94248755, 76948016, 76621901, 46454881, 40376566, 13867770, 76060951, 71404732, 21608002, 26893621, 27370182, 35088766, 64827587, 67610608, 90182899, 66469061, 67277958, 92926221, 58156218, 44648845, 37817595, 46518269, 44972058, 27607545, 99404748, 39262620, 98825772, 89950732, 69937719, 78068362, 78924300, 91679939, 52530444, 71773429, 57678430, 75699274, 5835797, 74160501, 51193131, 47950620, 4572042, 85251576, 49493188, 77502342, 3244395, 51211050, 44229120, 2135351, 47258209, 77312779, 37416880, 59038338, 96069936, 20766025, 35497532, 67316276, 38312269, 38357645, 41600875, 58590177, 99257528, 99136750, 4796996, 84369137, 54237155, 64368327, 94789440, 40718847, 12226041, 80504660, 8177227, 85151842, 36165763, 72764013, 36326808, 80969323, 22947547, 76322099, 7536094, 18346503, 65759149, 45879388, 53114170, 92521723, 15492250, 42479923, 20668783, 64053151, 68778592, 3669297, 73903133, 28973293, 73195487, 64588362, 62227726, 17909010, 70683505, 86982984, 64191987, 71505285, 45949516, 28244755, 33863602, 18256044, 25110337, 23997763, 81020611, 10135495, 925679, 98158797, 73400633, 27282156, 45863518, 49288993, 52471826, 30553639, 76174500, 28828417, 41628693, 80019078, 64260962, 5577578, 50920883, 16864714, 54950300, 9267396, 56454292, 40872286, 33819401, 75369837, 6552946, 26963596, 22368984, 43723768, 39227673, 98188566, 1054037, 28292455, 18763814, 72776850, 47192134, 58393410, 14487674, 4852891, 44100801, 9755253, 37231060, 42836447, 38104756, 77865902, 67635663, 43494238, 76484257, 80555820, 8632145, 3925993, 81317956, 12645616, 23438120, 48241610, 20578077, 75133501, 46214776, 35621790, 15258257, 20145132, 32680983, 94521866, 43456056, 19341117, 29693292, 38935734, 62721977, 31340268, 91841822, 22303667, 96935307, 29160182, 61869130, 33436979, 32438444, 87945655, 43629909, 88918708, 85650550, 4201421, 11958347, 74203607, 37964292, 56174257, 20894491, 33858970, 45292153, 22249182, 77695201, 34240048, 36320401, 64890030, 81514017, 58983774, 88785054, 93832841, 12338671, 46297822, 26489779, 85959340 };\n\n //int arr[] = { 46158044, 9306314, 51157916, 93803496, 20512678, 55668109, 488932, 24018019, 91386538, 68676911, 92581441, 66802896, 10401330, 57053542, 42836847, 24523157, 50084224, 16223673, 18392448, 61771874, 75040277, 30393366, 1248593, 71015899, 20545868, 75781058, 2819173, 37183571, 94307760, 88949450, 9352766, 26990547, 4035684, 57106547, 62393125, 74101466, 87693129, 84620455, 98589753, 8374427, 59030017, 69501866, 47507712, 84139250, 97401195, 32307123, 41600232, 52669409, 61249959, 88263327, 3194185, 10842291, 37741683, 14638221, 61808847, 86673222, 12380549, 39609235, 98726824, 81436765, 48701855, 42166094, 88595721, 11566537, 63715832, 21604701, 83321269, 34496410, 48653819, 77422556, 51748960, 83040347, 12893783, 57429375, 13500426, 49447417, 50826659, 22709813, 33096541, 55283208, 31924546, 54079534, 38900717, 94495657, 6472104, 47947703, 50659890, 33719501, 57117161, 20478224, 77975153, 52822862, 13155282, 6481416, 67356400, 36491447, 4084060, 5884644, 91621319, 43488994, 71554661, 41611278, 28547265, 26692589, 82826028, 72214268, 98604736, 60193708, 95417547, 73177938, 50713342, 6283439, 79043764, 52027740, 17648022, 33730552, 42851318, 13232185, 95479426, 70580777, 24710823, 48306195, 31248704, 24224431, 99173104, 31216940, 66551773, 94516629, 67345352, 62715266, 8776225, 18603704, 7611906 };\n\n int n = arr.length;\n int maxDiff = max.maxIndexDiff(arr, n);\n System.out.println(maxDiff);\n }", "@Override\n\tpublic List getBoundaryShape(Ball b) {\n\t List shapes = new ArrayList();\n\t double x2 = x+width*GameBoard.PixelsPerL - 1;\n\t double y2 = y+height*GameBoard.PixelsPerL - 1;\n\t \n\t if (b.equals(firingBall)) {\n\t //leave out section of top and corner cirle so ball being fired\n\t //can exit\n\t shapes.add(new LineSegment(x, y, x2-GameBoard.PixelsPerL, y));\n\t } else {\n\t shapes.add(new Circle(x2, y, 0));\n\t shapes.add(new LineSegment(x, y, x2, y));\n\t }\n\n\t shapes.add(new LineSegment(x, y, x, y2));\n\t shapes.add(new LineSegment(x2, y, x2, y2));\n\t shapes.add(new LineSegment(x, y2, x2, y2));\n\t //0-radius circles at corners\n\t \n\t shapes.add(new Circle(x2, y2, 0));\n\t shapes.add(new Circle(x, y2, 0));\n\t shapes.add(new Circle(x, y, 0));\n\t return shapes;\n\t}", "private void createBall(double par1, int par3, int[] par4ArrayOfInteger, int[] par5ArrayOfInteger, boolean par6, boolean par7)\n {\n double d1 = this.posX;\n double d2 = this.posY;\n double d3 = this.posZ;\n\n for (int j = -par3; j <= par3; ++j)\n {\n for (int k = -par3; k <= par3; ++k)\n {\n for (int l = -par3; l <= par3; ++l)\n {\n double d4 = (double)k + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d5 = (double)j + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d6 = (double)l + (this.rand.nextDouble() - this.rand.nextDouble()) * 0.5D;\n double d7 = (double)MathHelper.sqrt_double(d4 * d4 + d5 * d5 + d6 * d6) / par1 + this.rand.nextGaussian() * 0.05D;\n this.createParticle(d1, d2, d3, d4 / d7, d5 / d7, d6 / d7, par4ArrayOfInteger, par5ArrayOfInteger, par6, par7);\n\n if (j != -par3 && j != par3 && k != -par3 && k != par3)\n {\n l += par3 * 2 - 1;\n }\n }\n }\n }\n }", "public void calculate(List<Double> x){\n\n for(int j=1;j<=m;j++){\n th[1][j] = wdotF(-1,j,x,1);\n }\n for(int i=2;i<=n;i++){\n for(int l=1;l<=m;l++){\n double max = Double.MIN_VALUE;\n for(int j=1;j<=m;j++){\n double value = th[i-1][j]+ wdotF(j,l,x,i);\n if(value> max){\n max = value;\n path[i][l] = j;\n }\n }\n th[i][l] = max;\n }\n }\n double maxValue = Double.MIN_VALUE;\n int pathValue = 0;\n List<Integer> goodPath = new ArrayList<>();\n for(int j=1;j<=m;j++){\n double value = th[n][j];\n if(value> maxValue){\n maxValue = value;\n pathValue = j;\n }\n }\n goodPath.add(pathValue);\n for(int i=n-1;i>0;i--){\n int value = path[i+1][pathValue];\n pathValue = value;\n goodPath.add(0,pathValue);\n }\n System.out.print(\"path is :\");\n for(Integer path : goodPath){\n System.out.print(path+\" \");\n }\n }", "public void checkBodyCollisions(ArrayList<CollisionBody> bodies) {\n for (CollisionBody body : bodies) {\n if (this.collidesWith(body)) {\n Line line = (Line) body.getShape();\n\n double lineMidX = (line.getStartX() + line.getEndX()) / 2;\n double lineMidY = (line.getStartY() + line.getEndY()) / 2;\n double ballMidX = ball.getLayoutX();\n double ballMidY = ball.getLayoutY();\n double ratioX = (ballMidX - lineMidX) / Math.min(Math.abs(ballMidX - lineMidX), Math.abs(ballMidY - lineMidY));\n double ratioY = (ballMidY - lineMidY) / Math.min(Math.abs(ballMidX - lineMidX), Math.abs(ballMidY - lineMidY));\n\n double increment = 0.05;\n while (collidesWith(body)) {\n System.out.print(\"|\");\n ball.setLayoutX(ball.getLayoutX() + (ratioX * increment));\n ball.setLayoutY(ball.getLayoutY() + (ratioY * increment));\n }\n System.out.println(\"\");\n\n double lineAngle = getAngleFromXY(line.getEndX() - line.getStartX(), line.getStartY() - line.getEndY());\n double velAngle = getAngleFromXY(velX, velY);\n double totalVel = Math.hypot(velX, velY);\n\n velAngle -= lineAngle;\n velAngle = normalizeAngle(velAngle);\n velAngle = 360 - velAngle;\n velAngle += lineAngle;\n\n velX = totalVel * Math.cos(Math.toRadians(velAngle)) * frictionX;\n velY = totalVel * Math.sin(Math.toRadians(velAngle)) * frictionY;\n }\n }\n }", "private Corners findCorners(ArrayList<MatOfPoint> markers) {\n ArrayList<Point> corners = new ArrayList<>();\n for (MatOfPoint mrk : markers) {\n List<Point> list = mrk.toList();\n mrk.release();\n double sumx = 0, sumy = 0;\n for (Point p : list) {\n sumx += p.x;\n sumy += p.y;\n }\n corners.add(new Point(sumx/list.size(), sumy/list.size()));\n // System.out.println(list.size());\n }\n sortCorners(corners);\n // for (Point p : corners) System.out.println(p.x + \" \" + p.y);\n for (int i = 0; i < corners.size(); i++) {\n corners.get(i).x /= width;\n corners.get(i).y /= height;\n }\n if (corners.size() == 4) {\n return new Corners(corners.get(0), corners.get(1), corners.get(3), corners.get(2));\n }\n return null;\n }", "static double distance(double[] lines, double[] cols, double nu, double lambda, double cutoff) {\n\t\tif (lines.length < cols.length) {\n\t\t\tdouble[] swap = lines;\n\t\t\tlines = cols;\n\t\t\tcols = swap;\n\t\t}\n\n\t\t// --- --- --- Declarations\n\t\tint nblines = lines.length;\n\t\tint nbcols = cols.length;\n\n\t\t// Setup buffers - no extra initialization required - border condition managed in the code.\n\t\tdouble[] buffers = new double[2 * nbcols];\n\t\tint c = 0;\n\t\tint p = nbcols;\n\n\t\t// Buffer holding precomputed distance between columns\n\t\tdouble[] distcol = new double[nbcols];\n\n\t\t// Line & columns indices\n\t\tint i = 0;\n\t\tint j = 0;\n\n\t\t// Cost accumulator in a line, also used as the \"left neighbor\"\n\t\tdouble cost = 0;\n\n\t\t// EAP variable: track where to start the next line, and the position of the previous pruning point.\n\t\t// Must be init to 0: index 0 is the next starting point and also the \"previous pruning point\"\n\t\tint next_start = 0;\n\t\tint prev_pp = 0;\n\n\t\t// Constants: we only consider timestamp spaced by 1, so:\n\t\t// In the \"delete\" case, we always have a time difference of 1, so we always have 1*nu+lambda\n\t\tfinal double nu_lambda = nu + lambda;\n\t\t// In the \"match\" case, we always have nu*(|i-j|+|(i-1)-(j-1)|) == 2*nu*|i-j|\n\t\tfinal double nu2 = 2 * nu;\n\n\t\t// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n\t\t// Create a new tighter upper bounds using the last alignment.\n\t\t// The last alignment can only be computed if we have nbcols >= 2\n\t\tdouble ub = cutoff;\n\t\tif (nbcols >= 2) {\n\t\t\tdouble li = lines[nblines - 1];\n\t\t\tdouble li1 = lines[nblines - 2];\n\t\t\tdouble co = cols[nbcols - 1];\n\t\t\tdouble co1 = cols[nbcols - 2];\n\t\t\tdouble distli = dist(li1, li);\n\t\t\tdouble distco = dist(co1, co);\n\t\t\tdouble la = min(distco + nu_lambda, // \"Delete_B\": over the columns / Prev\n\t\t\t\t\tdist(li, co) + dist(li1, co1) + nu2 * (nblines - nbcols), // Match: Diag. Ok: nblines >= nbcols\n\t\t\t\t\tdistli + nu_lambda // \"Delete_A\": over the lines / Top\n\t\t\t);\n\t\t\tub = (cutoff + utils.EPSILON) - la;\n\t\t}\n\n\t\t// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n\t\t// Initialisation of the first line. Deal with the line top border condition.\n\t\t{\n\t\t\t// Case [0,0]: special \"Match case\"\n\t\t\tcost = dist(lines[0], cols[0]);\n\t\t\tbuffers[c + 0] = cost;\n\t\t\t// Distance for the first column is relative to 0 \"by conventions\" (from the paper, section 4.2)\n\t\t\tdistcol[0] = dist(0, cols[0]);\n\t\t\t// Rest of the line: [i==0, j>=1]: \"Delete_B case\" (prev). We also initialize 'distcol' here.\n\t\t\tfor (j = 1; j < nbcols; ++j) {\n\t\t\t\tdouble d = dist(cols[j - 1], cols[j]);\n\t\t\t\tdistcol[j] = d;\n\t\t\t\tcost = cost + d + nu_lambda;\n\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\tif (cost <= ub) {\n\t\t\t\t\tprev_pp = j + 1;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Complete the initialisation of distcol\n\t\t\tfor (; j < nbcols; ++j) {\n\t\t\t\tdouble d = dist(cols[j - 1], cols[j]);\n\t\t\t\tdistcol[j] = d;\n\t\t\t}\n\t\t\t// Next line.\n\t\t\t++i;\n\t\t}\n\n\t\t// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n\t\t// Main loop, starts at the second line\n\t\tfor (; i < nblines; ++i) {\n\t\t\t// --- --- --- Swap and variables init\n\t\t\tint swap = c;\n\t\t\tc = p;\n\t\t\tp = swap;\n\t\t\tdouble li = lines[i];\n\t\t\tdouble li1 = lines[i - 1];\n\t\t\tdouble distli = dist(li1, li);\n\t\t\tint curr_pp = next_start; // Next pruning point init at the start of the line\n\t\t\tj = next_start;\n\t\t\t// --- --- --- Stage 0: Special case for the first column. Can only look up (border on the left)\n\t\t\t{\n\t\t\t\tcost = buffers[p + j] + distli + nu_lambda; // \"Delete_A\" / Top\n\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\tif (cost <= ub) {\n\t\t\t\t\tcurr_pp = j + 1;\n\t\t\t\t} else {\n\t\t\t\t\t++next_start;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\t// --- --- --- Stage 1: Up to the previous pruning point while advancing next_start: diag and top\n\t\t\tfor (; j == next_start && j < prev_pp; ++j) {\n\t\t\t\tcost = min(buffers[p + j - 1] + dist(li, cols[j]) + dist(li1, cols[j - 1]) + nu2 * abs(i - j), // \"Match\": Diag\n\t\t\t\t\t\tbuffers[p + j] + distli + nu_lambda // \"Delete_A\" / Top\n\t\t\t\t);\n\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\tif (cost <= ub) {\n\t\t\t\t\tcurr_pp = j + 1;\n\t\t\t\t} else {\n\t\t\t\t\t++next_start;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// --- --- --- Stage 2: Up to the previous pruning point without advancing next_start: left, diag and top\n\t\t\tfor (; j < prev_pp; ++j) {\n\t\t\t\tcost = min(cost + distcol[j] + nu_lambda, // \"Delete_B\": over the columns / Prev\n\t\t\t\t\t\tbuffers[p + j - 1] + dist(li, cols[j]) + dist(li1, cols[j - 1]) + nu2 * abs(i - j), // \"Matc\"h: Diag\n\t\t\t\t\t\tbuffers[p + j] + distli + nu_lambda // \"Delete_A\": over the lines / Top\n\t\t\t\t);\n\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\tif (cost <= ub) {\n\t\t\t\t\tcurr_pp = j + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// --- --- --- Stage 3: At the previous pruning point. Check if we are within bounds.\n\t\t\tif (j < nbcols) { // If so, two cases.\n\t\t\t\tif (j == next_start) { // Case 1: Advancing next start: only diag.\n\t\t\t\t\tcost = buffers[p + j - 1] + dist(li, cols[j]) + dist(li1, cols[j - 1]) + nu2 * abs(i - j); // \"Match\": Diag\n\t\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\t\tif (cost <= ub) {\n\t\t\t\t\t\tcurr_pp = j + 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Special case if we are on the last alignment: return the actual cost if we are <= cutoff\n\t\t\t\t\t\tif (i == nblines - 1 && j == nbcols - 1 && cost <= cutoff) {\n\t\t\t\t\t\t\treturn cost;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn POSITIVE_INFINITY;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else { // Case 2: Not advancing next start: possible path in previous cells: left and diag.\n\t\t\t\t\tcost = min(cost + distcol[j] + nu_lambda, // \"Delete_B\": over the columns / Prev\n\t\t\t\t\t\t\tbuffers[p + j - 1] + dist(li, cols[j]) + dist(li1, cols[j - 1]) + nu2 * abs(i - j) // \"Match\": Diag\n\t\t\t\t\t);\n\t\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\t\tif (cost <= ub) {\n\t\t\t\t\t\tcurr_pp = j + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t} else { // Previous pruning point is out of bound: exit if we extended next start up to here.\n\t\t\t\tif (j == next_start) {\n\t\t\t\t\t// But only if we are above the original UB\n\t\t\t\t\t// Else set the next starting point to the last valid column\n\t\t\t\t\tif (cost > cutoff) {\n\t\t\t\t\t\treturn POSITIVE_INFINITY;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnext_start = nbcols - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// --- --- --- Stage 4: After the previous pruning point: only prev.\n\t\t\t// Go on while we advance the curr_pp; if it did not advance, the rest of the line is guaranteed to be > ub.\n\t\t\tfor (; j == curr_pp && j < nbcols; ++j) {\n\t\t\t\tcost = cost + distcol[j] + nu_lambda; // \"Delete_B\": over the columns / Prev\n\t\t\t\tbuffers[c + j] = cost;\n\t\t\t\tif (cost <= ub) {\n\t\t\t\t\t++curr_pp;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// --- --- ---\n\t\t\tprev_pp = curr_pp;\n\t\t} // End of main loop for(;i<nblines;++i)\n\n\t\t// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n\t\t// Finalization\n\t\t// Check for last alignment (i==nblines implied, Stage 4 implies j<=nbcols).\n\t\t// Cost must be <= original bound.\n\t\tif (j == nbcols && cost <= cutoff) {\n\t\t\treturn cost;\n\t\t} else {\n\t\t\treturn POSITIVE_INFINITY;\n\t\t}\n\n\t}", "private int[] shortestPath(int x, int xEnd, int y, boolean leftToRight)\n {\n \tint xStart = x;\n \tint yStart = y;\n \tfinal float k = 5.f;\n \t\n \tint dir = 1;\n \tif(!leftToRight)\n \t\tdir = -1;\n \t\n \tmCostList[y*mWidth+x] = 0.0f;\n \t\n\t\twhile(x != xEnd)\n\t\t{\n\t\t\tx+=dir;\n\n\t\t\t//only search update/search y positions as far as we've moved x\n\t\t\t// this is because each move in x, we only allow the staff line to move up or down a maximum of 1 pixel\n\t\t\tint xDiff = Math.abs(x - xStart);\n\t\t\tint yIndexMin = Math.max(0, yStart-xDiff);\n\t\t\tint yIndexMax = Math.min(mHeight-1, yStart+xDiff);\n\n\t\t\twhile(yIndexMin <= yIndexMax)\n\t\t\t{\n\t\t\t\tint curBufferIndex = yIndexMin*mWidth+x;\n\t\t\t\tfloat pixelWeight = k*(mPixelBuffer[curBufferIndex] + 1.f);\t//bigger k value = less likely to choose background pixel\n\t\t\t\t\n\t\t\t\tfloat costFromPrev = 1.0f + mCostList[yIndexMin*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\tif(costFromPrev < mCostList[curBufferIndex])\n\t\t\t\t\tmCostList[curBufferIndex] = costFromPrev;\n\n\t\t\t\tif(yIndexMin > 0)\n\t\t\t\t{\n\t\t\t\t\tfloat costFromPrevUp = 1.414f + mCostList[(yIndexMin-1)*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\t\tif(costFromPrevUp < mCostList[curBufferIndex])\n\t\t\t\t\t\t mCostList[curBufferIndex] = costFromPrevUp;\n\t\t\t\t}\n\t\t\t\tif(yIndexMin < mHeight-1)\n\t\t\t\t{\n\t\t\t\t\tfloat costFromPrevDown = 1.414f + mCostList[(yIndexMin+1)*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\t\tif(costFromPrevDown < mCostList[curBufferIndex])\n\t\t\t\t\t\t mCostList[curBufferIndex] = costFromPrevDown;\n\t\t\t\t}\n\n\t\t\t\t++yIndexMin;\n\t\t\t}\n\t\t}\n \t\n\t\t//fill out the actual path based on lowest cost at each x\n\t\tint path[] = new int[mWidth];\n\t\tfloat bestCost = Float.MAX_VALUE;\n\t\tint bestY = y;\n\t\t\n\t\tx = xStart;\n\t\ty = yStart;\n\t\twhile(x != xEnd)\n\t\t{\n\t\t\tpath[x] = y;\n\t\t\tx+=dir;\n\t\t\t\n\t\t\tbestCost = mCostList[y*mWidth+x];\n\t\t\tbestY = y;\n\t\t\t \n\t\t\tif(y > 0)\n\t\t\t{\n\t\t\t\tif(mCostList[(y-1)*mWidth+x] < bestCost)\n\t\t\t\t{\n\t\t\t\t\tbestCost = mCostList[(y-1)*mWidth+x];\n\t\t\t\t\tbestY = y-1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(y < mHeight-1)\n\t\t\t{\n\t\t\t\tif(mCostList[(y+1)*mWidth+x] < bestCost)\n\t\t\t\t{\n\t\t\t\t\tbestCost = mCostList[(y+1)*mWidth+x];\n\t\t\t\t\tbestY = y+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\ty = bestY;\n\t\t}\n\n\t\treturn path;\n }", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }", "public static int bfs() {\r\n check = new int[N][N]; // check 변수 초기화\r\n q = new LinkedList<Point>();\t\t\t\t\t//bfs 할때 필요한 그 stack. first in first out\r\n q.offer(new Point(shark.x, shark.y));\t\t\t//q.offer == 해당 큐의 맨 뒤에 전달된 요소를 삽입함. list에서 list.add와 같은 말임.\r\n check[shark.x][shark.y] = 1;\r\n\r\n int FishCheck = 0;\t\t\t\t\t\t\t\t//the number of the fish in the sea map\r\n Shark fish = new Shark(N, N);\t\t\t\t\t//new shark initiation\r\n loop: while (!q.isEmpty()) {\r\n int r = q.peek().x;\t\t\t\t\t\t\t//q.peek == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환함\r\n int c = q.poll().y;\t\t\t\t\t\t\t//q.poll == 해당 큐의 맨 앞에 있는(제일 먼저 저장된) 요소를 반환하고, 해당 요소를 큐에서 제거함. 만약 큐가 비어있으면 null을 반환함.\r\n\r\n for (int d = 0; d < dr.length; d++) {\r\n int nr = r + dr[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nr == new row\r\n int nc = c + dc[d];\t\t\t\t\t\t//북(0),남(1),동(2),서(3) 순으로. nc == new column\r\n\r\n // 지나갈 수 있는 곳: 자신보다 큰 물고기가 없는 곳\r\n if (isIn(nr, nc) && check[nr][nc] == 0 && sea[nr][nc] <= shark.lv) {\r\n check[nr][nc] = check[r][c] + 1;\r\n q.offer(new Point(nr, nc));\r\n\r\n // 위치가 더 커질 경우, 더이상 확인할 필요 X\r\n if (FishCheck != 0 && FishCheck < check[nr][nc]) {\r\n break loop;\r\n }\r\n \r\n // 처음 먹을 수 있는 자기보다 물고기가 발견 되었을 때\r\n if (0 < sea[nr][nc] && sea[nr][nc] < shark.lv && FishCheck == 0) {\r\n FishCheck = check[nr][nc];\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n // 같은 위치에 여러 마리 있을 경우, 가장 위의 가장 왼쪽 물고기부터 먹음\r\n else if (FishCheck == check[nr][nc] && 0 < sea[nr][nc] && sea[nr][nc] < shark.lv) {\r\n if (nr < fish.x) { // 가장 위에 있는 거 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n } else if (nr == fish.x && nc < fish.y) { // 다 가장 위일 경우, 가장 왼쪽 우선권\r\n fish.x = nr;\r\n fish.y = nc;\r\n fish.lv = sea[nr][nc];\r\n }\r\n\r\n }\r\n\r\n }else if(isIn(nr, nc) && check[nr][nc] == 0) {\r\n check[nr][nc] = -1;\r\n }\r\n }\r\n }\r\n // idx 초과 안날 경우\r\n if (fish.x != N && fish.y != N) {\r\n eatFish(fish);\r\n }\r\n \r\n return (FishCheck - 1);\r\n }", "Execution getFarthestDistance();", "void makeService(int loc_temp,int des_temp,ArrayList<Coordinate> path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint last_direction = 0;\r\n\t\t\tint[] shortest_path = new int[6400];\r\n\t\t\tint j_current = loc_temp % 80;\r\n\t\t\tint i_current = loc_temp / 80;\r\n\t\t\tBFS.setShortest(des_temp,shortest_path,BFS.adj_const);\r\n\t\t\tint temp = shortest_path[loc_temp];\r\n\t\t\twhile(temp != -1)\r\n\t\t\t{\r\n\t\t\t\tint length_min = BFS.getShortest(temp, des_temp,BFS.adj_const);\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((i_current-1)>=0 && BFS.adj_const[(i_current-1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current-1][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current-1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current-1][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif((i_current+1)<80 && BFS.adj_const[(i_current+1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current+1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current-1)>=0 && BFS.adj_const[i_current*80+j_current-1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current-1][0]<flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current-1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current-1][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\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\tif((j_current+1)<80 && BFS.adj_const[i_current*80+j_current+1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][0]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current+1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(i_current,j_current);\r\n\t\t\t\tif(light != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean first = true;\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tif(first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Waiting at a traffic light\");\r\n\t\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Going through a traffic light\");\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current-1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current-1][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current+1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t\tloc = new Coordinate(i_current,j_current);\r\n\t\t\t\tpath.add(loc);\r\n\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc);\r\n\t\t\t\ttemp = shortest_path[i_current*80+j_current];\r\n\t\t\t}\t\t\r\n\t\t\tSystem.out.println(\"Passenger\" + passenger.loc + passenger.des + \": Taxi-\" + id + \" arrives at \" + des);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");;\r\n\t\t}\r\n\t}", "public static List<Point> ParetoOptimal(List<Point> listofPts)\n {\n \n if(listofPts.size() == 1 || listofPts.size() == 0)\n return listofPts;\n \n \n \n \n int pos = listofPts.size() /2 ;\n \n /*\n * quickSelect time complexity (n)\n */\n \n Point median = quickSelect(listofPts, pos, 0, listofPts.size() - 1); \n \n \n \n List<Point> points1 = new ArrayList<Point>();\n List<Point> points2 = new ArrayList<Point>();\n List<Point> points3 = new ArrayList<Point>();\n List<Point> points4 = new ArrayList<Point>();\n \n //O(n)\n if(oldMedian == median)\n {\n \t\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() <= median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n else\n {\n for(int x= 0; x < listofPts.size(); x++)\n {\n if(listofPts.get(x).getX() < median.getX())\n {\n points1.add(listofPts.get(x));\n \n }\n else\n {\n points2.add(listofPts.get(x));\n \n }\n }\n \n \n }\n //O(n)\n int yRightMax = -100000;\n for(int x= 0; x < points2.size(); x++)\n {\n if(points2.get(x).getY() > yRightMax)\n yRightMax = (int) points2.get(x).getY();\n \n }\n \n \n for(int x= 0; x < points1.size() ; x++)\n {\n if(points1.get(x).getY()> yRightMax)\n { \n points3.add(points1.get(x));\n \n } \n }\n \n for(int x= 0; x < points2.size() ; x++)\n {\n if(points2.get(x).getY() < yRightMax)\n {\n points4.add(points2.get(x));\n \n }\n \n }\n //System.out.println(\"points2: \" + points2);\n /*\n * Below bounded by T(n/c) + T(n/2) where c is ratio by which left side is shortened \n */\n oldMedian = median;\n return addTo \n ( ParetoOptimal(points3), \n ParetoOptimal(points2)) ;\n }", "private void obtainRefiningPoints(ArrayList<double[]> points2d_in, Matrix P, double gridSize_in, int gridCount_in[], ArrayList<double[]> points2d_out, ArrayList<double[]> points3d_out) {\n\t\tdouble fuzziness = 25;\n\t\tfor (int x = (gridCount_in[0] > 1 ? 1 : 0); x < gridCount_in[0]; x += 2) {\n\t\t\tfor (int y = (gridCount_in[1] > 1 ? 1 : 0); y < gridCount_in[1]; y += 2) {\n\t\t\t\tfor (int z = 1; z < gridCount_in[2]; z += 2) {\n\t\t\t\t\tMatrix x3D = new Matrix(4, 1);\n\t\t\t\t\tx3D.set(0, 0, x * gridSize_in);\n\t\t\t\t\tx3D.set(1, 0, y * gridSize_in);\n\t\t\t\t\tx3D.set(2, 0, z * gridSize_in);\n\t\t\t\t\tx3D.set(3, 0, 1.0);\n\t\t\t\t\tMatrix x2D = P.mul(x3D);\n\t\t\t\t\tx2D = x2D.div(x2D.get(2));\n\t\t\t\t\tdouble minDistance = 100000;\n\t\t\t\t\tint minDistanceIndex = 0;\n\t\t\t\t\tfor (int j=0;j<points2d_in.size();j++) {\n\t\t\t\t\t\tdouble distance = Math.pow(x2D.get(0) - points2d_in.get(j)[0], 2) + Math.pow(x2D.get(1) - points2d_in.get(j)[1], 2);\n\t\t\t\t\t\tif (distance < minDistance) {\n\t\t\t\t\t\t\tminDistance = distance;\n\t\t\t\t\t\t\tminDistanceIndex = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (minDistance < fuzziness) {\n\t\t\t\t\t\tpoints2d_out.add(points2d_in.get(minDistanceIndex));\n\t\t\t\t\t\tpoints3d_out.add(new Matrix(x3D).data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void testForWallCollision() {\n\t\tVector2 n1 = temp;\n\t\tVector2 hitPoint = temp2;\n\t\t\n\t\tArrayList<Vector2> list;\n\t\tdouble angleOffset;\n\t\t\n\t\tfor (int w=0; w < 2; w++) {\n\t\t\tif (w == 0) {\n\t\t\t\tlist = walls1;\n\t\t\t\tangleOffset = Math.PI/2;\n\t\t\t} else {\n\t\t\t\tlist = walls2;\n\t\t\t\tangleOffset = -Math.PI/2;\n\t\t\t}\n\t\t\tn1.set(list.get(0));\n\t\t\t\n\t\t\tfor (int i=1; i < list.size(); i++) {\n\t\t\t\tVector2 n2 = list.get(i);\n\t\t\t\tif (Intersector.intersectSegments(n1, n2, oldPos, pos, hitPoint)) {\n\t\t\t\t\t// bounceA is technically the normal. angleOffset is used\n\t\t\t\t\t// here to get the correct side of the track segment.\n\t\t\t\t\tfloat bounceA = (float) (Math.atan2(n2.y-n1.y, n2.x-n1.x) + angleOffset);\n\t\t\t\t\tVector2 wall = new Vector2(1, 0);\n\t\t\t\t\twall.setAngleRad(bounceA).nor();\n\t\t\t\t\t\n\t\t\t\t\t// move the car just in front of the wall.\n\t\t\t\t\tpos.set(hitPoint.add((float)Math.cos(bounceA)*0.05f, (float)Math.sin(bounceA)*0.05f));\n\t\t\t\t\t\n\t\t\t\t\t// Lower the speed depending on which angle you hit the wall in.\n\t\t\t\t\ttemp2.setAngleRad(angle).nor();\n\t\t\t\t\tfloat wallHitDot = wall.dot(temp2);\n\t\t\t\t\tspeed *= (1 - Math.abs(wallHitDot)) * 0.85;\n\t\t\t\t\t\n\t\t\t\t\t// calculate the bounce using the reflection formula.\n\t\t\t\t\tfloat dot = vel.dot(wall);\n\t\t\t\t\tvel.sub(wall.scl(dot*2));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tn1.set(n2);\n\t\t\t}\n\t\t}\n\t}", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\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 int maxSolutions = 0;\r\n int bestPerimeter = 0;\r\n int[] perimeters = new int[1000];\r\n for (int a = 1; a <= 1000; a++) {\r\n for (int b = 1; b <= a; b++) {\r\n double c = Math.sqrt(a*a + b*b);\r\n if (c != (int)c) continue;\r\n int perimeter = a + b + (int)c;\r\n if (perimeter > 1000) break;\r\n perimeters[perimeter - 1]++;\r\n if (perimeters[perimeter - 1] > maxSolutions) {\r\n maxSolutions++;\r\n bestPerimeter = perimeter;\r\n }\r\n }\r\n }\r\n System.out.println(\"Best perimeter: \" + bestPerimeter);\r\n System.out.println(\"Solutions: \" + maxSolutions);\r\n }", "@Test\n public void findClosestGeoPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n Geometry geo = new Sphere(new Point3D(1,1,1),2);\n\n List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>();\n list.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n\n\n assertEquals(list.get(2), ray.findClosestGeoPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<GeoPoint> list2 = null;\n assertNull(\"try again\",ray.findClosestGeoPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<GeoPoint> list3 = new LinkedList<GeoPoint>();\n list3.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list3.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n assertEquals(list3.get(0), ray.findClosestGeoPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<GeoPoint> list4 = new LinkedList<GeoPoint>();\n list4.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list4.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n\n assertEquals(list4.get(3), ray.findClosestGeoPoint(list4));\n }", "@SuppressWarnings(\"unused\")\n \tpublic static double Distance(\tArrayList<Float> x_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> y_accel, \n \t\t\t\t\t\t\t\t\tArrayList<Float> z_accel,\n \t\t\t\t\t\t\t\t\tArrayList<Float> t)\n \t{\n \t\tArrayList<Float> dx_veloc = new ArrayList<Float>(); dx_veloc.add(0f);\n \t\tArrayList<Float> dy_veloc = new ArrayList<Float>(); dy_veloc.add(0f);\n \t\tArrayList<Float> dz_veloc = new ArrayList<Float>(); dz_veloc.add(0f);\n \t\t\n \t\tArrayList<Float> x_veloc = new ArrayList<Float>(); x_veloc.add(0f);\n \t\tArrayList<Float> y_veloc = new ArrayList<Float>(); y_veloc.add(0f);\n \t\tArrayList<Float> z_veloc = new ArrayList<Float>(); z_veloc.add(0f);\n \t\t\n \t\t//compose velocity\n \t\tint I = x_accel.size();\n \t\tfloat dt;\n \t\tSystem.out.println(\"Composing Velocity...\\n\");\n \t\tfor( int i = 1; i < I; i++ )\n \t\t{\t\n \t\t\t//x'_i = x''_(i-1) * dt\n \t\t\t//y'_i = y''_(i-1) * dt\n \t\t\t//z'_i = z''_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_veloc.add( x_accel.get(i-1) * dt);\n \t\t\tdy_veloc.add( y_accel.get(i-1) * dt);\n \t\t\tdz_veloc.add( z_accel.get(i-1) * dt);\n \t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tv_x: \"+ dx_veloc.get(i) + \"\\n\\tv_y: \" + dy_veloc.get(i) + \"\\n\\tv_z: \" + dz_veloc.get(i));\n \t\t}\n \t\tfloat temp = 0f;\n \t\tfor(float d : dx_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tx_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dy_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\ty_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\ttemp = 0;\n \t\tfor(float d : dz_veloc)\n \t\t\t{\n \t\t\t\ttemp += d;\n \t\t\t\tz_veloc.add(temp);\n \t\t\t}\n \t\t\n \t\tArrayList<Float> dx_disp = new ArrayList<Float>(); dx_disp.add(0f); dx_disp.add(0f);\n \t\tArrayList<Float> dy_disp = new ArrayList<Float>(); dy_disp.add(0f); dy_disp.add(0f);\n \t\tArrayList<Float> dz_disp = new ArrayList<Float>(); dz_disp.add(0f); dz_disp.add(0f);\n \t\t\n \t\tArrayList<Float> x_disp = new ArrayList<Float>(); x_disp.add(0f); x_disp.add(0f);\n \t\tArrayList<Float> y_disp = new ArrayList<Float>(); y_disp.add(0f); y_disp.add(0f);\n \t\tArrayList<Float> z_disp = new ArrayList<Float>(); z_disp.add(0f); z_disp.add(0f);\n \t\t\n \t\t//compose displacement\n \t\tI = t.size();\n \t\tfor( int i = 2; i < I; i++ )\n \t\t{\t\n \t\t\t//x_i = x'_(i-1) * dt\n \t\t\t//y_i = y'_(i-1) * dt\n \t\t\t//z_i = z'_(i-1) * dt\n \t\t\tdt = t.get(i) - t.get(i-1);\n \t\t\tdx_disp.add( x_veloc.get(i-1) * dt);\n \t\t\tdy_disp.add( y_veloc.get(i-1) * dt);\n \t\t\tdz_disp.add( z_veloc.get(i-1) * dt);\n \t\t}\n \t\t\n \t\t//compose total displacement\n \t\tfloat distance = 0;\n \n \t\tif( true/*Euclidean_Distance_Mode */)\n \t\t{\n \t\t\t//vector addition, constructing R\n \t\t\tSystem.out.println(\"Composing R...\\n\");\n \t\t\tfloat r[] = new float[3]; //[x, y, z]\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\tr[0] += dx_disp.get(i);\n \t\t\t\tr[1] += dy_disp.get(i);\n \t\t\t\tr[2] += dz_disp.get(i);\n \t\t\t\tSystem.out.println(\"Step: \" + i + \"\\n\\tr_x: \"+ r[0] + \"\\n\\tr_y: \" + r[1] + \"\\n\\tr_z: \" + r[2]);\n \t\t\t}\n \t\t\n \t\t\t//Distance formula, constructing D\n \t\t\t//D = sqrt(X^2 + Y^2 + Z^2)\n \t\t\tdistance = (float) Math.sqrt( \n \t\t\t\t\t\t\tMath.pow(r[0], 2) + \n \t\t\t\t\t\t\tMath.pow(r[1], 2) +\n \t\t\t\t\t\t\tMath.pow(r[2], 2)\n \t\t\t\t\t\t\t);\n \t\t\treturn distance;\n \t\t}\n \n \t\telse if ( false /*Path_Distance_Mode */)\n \t\t{\n \t\t\t//sum up individual distances, constructing D\n \t\t\tfor( int i = 0; i < I; i++)\n \t\t\t{\n \t\t\t\t//dD = sqrt( dx^2 + dy^2 + dz^2 )\n \t\t\t\tdistance += Math.sqrt(\n \t\t\t\t\t\t\t\tMath.pow(dx_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dy_disp.get(i), 2) +\n \t\t\t\t\t\t\t\tMath.pow(dz_disp.get(i), 2)\n \t\t\t\t\t\t\t\t);\n \t\t\t}\t\t\n \t\t\treturn distance;\n \t\t} \n \treturn 0; //won't get here.\n }", "int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }", "private static double findMinCost(double lemda, Vector finalVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n int n = neighbors.size();\r\n int m = destList.size();\r\n int w = n > m ? m : n;\r\n\r\n double [] costFor_r = new double[w];\r\n\r\n double minCost = MaxDistance;\r\n double totalCurToAll = findDistanceCurToAll(currentNode, destList);\r\n for ( int r = 0 ; r < w; r ++ )\r\n {\r\n Vector rSetVector = new Vector();\r\n costFor_r[r] = getMinSetCost_given_r( r+1, rSetVector,\r\n currentNode,\r\n neighbors,\r\n destList);\r\n costFor_r[r] = (1.0 - lemda) * (r + 1) / n + costFor_r[r] / totalCurToAll;\r\n if ( costFor_r[r] < minCost ) {\r\n minCost = costFor_r[r];\r\n finalVector.clear();\r\n for (int k = 0; k < rSetVector.size(); ++k) {\r\n finalVector.add(k, rSetVector.get(k));\r\n }\r\n }\r\n }\r\n\r\n return minCost;\r\n }", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "@Test\n\tpublic void circleLeastStationTest() {\n\t\tList<String> newTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"1\");\n\t\tnewTrain.add(\"4\");\n\t\tList<TimeBetweenStop> timeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\tTimeBetweenStop timeBetweenStop = new TimeBetweenStop(\"1\", \"4\", 20);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"B\", timeBetweenStops);\n\t\t\n\t\tList<String> answer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"3\");\n\t\tanswer.add(\"4\");\n\t\tTrip trip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(9, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, least time\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"1\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"1\", \"4\", 8);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"C\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(8, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, more stop but even less time\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"2\");\n\t\tnewTrain.add(\"5\");\n\t\tnewTrain.add(\"6\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"2\", \"5\", 2);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"5\", \"6\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"6\", \"4\", 2);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"D\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"5\");\n\t\tanswer.add(\"6\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(7, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, less time than above\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"7\");\n\t\tnewTrain.add(\"2\");\n\t\tnewTrain.add(\"3\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"7\", \"2\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"2\", \"3\", 3);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"3\", \"4\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"E\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"3\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(6, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\t}", "public static int findPath(int currentTime[],int tLeave[], int timeStation[][], int transferTime[][], int totalStations) {\n\t\tint numofLines = currentTime.length;\n\t\tif(numofLines != 2){\n\t\t\tSystem.err.println(\"Only two assembly line supported\");\n\t\t\treturn -1;\n\t\t}\n\t\t//Cost function array\n\t\tint f[][] = new int[numofLines][totalStations];\n\t\t//Station index back track array\n\t\tint i[][] = new int[numofLines][totalStations];\n\t\t\n\t\t//Final Cost and Final Station\n\t\tint finalCost = 0;\n\t\tint lastStation = 0;\n\t\t\n\t\t//Time for first station\n\t\tf[0][0] = currentTime[0]+timeStation[0][0];\n\t\tf[1][0] = currentTime[1]+timeStation[1][0];\n\t\t\n\t\t\n\t\tfor (int j = 1; j < totalStations; j++) {\n\t\t\t\n\t\t\t\n\t\t\tif((f[0][j-1] + timeStation[0][j]) <= (f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j])){\n\t\t\t\tf[0][j]= f[0][j-1]+ timeStation[0][j];\n\t\t\t\ti[0][j] = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[0][j]= f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j];\n\t\t\t\ti[0][j]=1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(f[1][j-1] + timeStation[1][j] <= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j]){\n\t\t\t\tf[1][j]= f[1][j-1]+ timeStation[1][j];\n\t\t\t\ti[1][j] = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[1][j]= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j];\n\t\t\t\ti[1][j] = 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((f[0][totalStations-1]+tLeave[0]) <= (f[1][totalStations-1]+tLeave[1] )){\n\t\t\tfinalCost = f[0][totalStations-1]+tLeave[0];\n\t\t\tlastStation = 0;\n\t\t}\n\t\telse{\n\t\t\tfinalCost = f[1][totalStations-1]+tLeave[1] ;\n\t\t\tlastStation = 1;\n\t\t}\t\n\t\n\t\tprintStation(lastStation,finalCost, i, totalStations);\n\t\treturn finalCost;\n\t}", "public static void main(String args[]) throws Exception {\n Scanner sc = new Scanner(System.in);\n //Scanner sc = new Scanner(new FileInputStream(\"input.txt\"));\n String st = \"abc\";\n\n System.out.print(st.substring(0,1));\n int T = sc.nextInt();\n\n for (int test_case = 0; test_case < T; test_case++) {\n\n // Answer = 0;\n /////////////////////////////////////////////////////////////////////////////////////////////\n\t\t\t/*\n\t\t\t Implement your algorithm here.\n\t\t\t The answer to the case will be stored in variable Answer.\n\t\t\t */\n /////////////////////////////////////////////////////////////////////////////////////////////\n int N = sc.nextInt();\n int points[][] = new int[N][2];\n double dist[][] = new double[N][N];\n\n for(int i=0;i<N;i++)\n {\n points[i][0] = sc.nextInt();\n points[i][1] = sc.nextInt();\n }\n\n double max = -1;\n for(int i=0;i<N;i++)\n {\n\n double [] result = getIntersection(points[i],points[0],points[N-1]);\n double tdist= (points[i][0]-result[0])*(points[i][0]-result[0]) +\n (points[i][1]-result[1])*(points[i][1]-result[1]);\n tdist=Math.sqrt(tdist);\n max=Math.max(tdist,max);\n\n for(int j=0;j<N-1;j++)\n {\n\n result = getIntersection(points[i],points[j],points[j+1]);\n tdist= (points[i][0]-result[0])*(points[i][0]-result[0]) +\n (points[i][1]-result[1])*(points[i][1]-result[1]);\n tdist=Math.sqrt(tdist);\n max=Math.max(tdist,max);\n }\n\n }\n Answer = max;\n\n // Print the answer to standard output(screen).\n System.out.println(\"Case #\" + (test_case + 1));\n System.out.format(\"%.2f\",Answer);\n }\n }", "public void moveOneStep() {\r\n\r\n // detects what direction the ball moves and switches it.\r\n double xDirection, yDirection;\r\n if (v.getDx() < 0) {\r\n xDirection = -r;\r\n } else {\r\n xDirection = r;\r\n }\r\n if (v.getDy() < 0) {\r\n yDirection = -r;\r\n } else {\r\n yDirection = r;\r\n }\r\n // if the ball is in the paddle because they move towards each other, the ball moves to the top of the paddle.\r\n Rectangle danger;\r\n // finding the paddle.\r\n for (Collidable c: environment.getCollidables()) {\r\n if (c.getCollisionRectangle().getUpperLeft().getY() == 550) {\r\n danger = c.getCollisionRectangle();\r\n // moving the ball up if its in the paddle.\r\n if (center.getY() > danger.getUpperLeft().getY()\r\n && center.getX() > danger.getUpperLeft().getX()\r\n && center.getX() < danger.getUpperRight().getX()) {\r\n this.center = new Point(center.getX(), danger.getUpperLeft().getY() - r);\r\n }\r\n }\r\n }\r\n Line yTrajectory = new Line(center.getX(), center.getY() + yDirection,\r\n center.getX() + v.getDx(), center.getY() + yDirection + v.getDy());\r\n Line xTrajectory = new Line(center.getX() + xDirection, center.getY(),\r\n center.getX() + v.getDx() + xDirection, center.getY() + v.getDy());\r\n // the collision is on the y field.\r\n if (environment.getClosestCollision(yTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(yTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(yTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(this.center.getX(),\r\n bangedPoint.getY() - yDirection - v.getDy());\r\n }\r\n // the collision is on the x field.\r\n if (environment.getClosestCollision(xTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(xTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(xTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(bangedPoint.getX() - xDirection - v.getDx(),\r\n this.center.getY());\r\n }\r\n this.center = this.getVelocity().applyToPoint(this.center);\r\n }", "private static void bellmanfordTest() {\n\t\t\n\t\tgraphs.objectorientedgraph.Graph<Integer> graph = new graphs.objectorientedgraph.Graph<Integer>();\n\t\t\n\t\tfor (int i = 0; i < 6; i++)\n\t\t\tgraph.addVertex(i, i);\n\t\t\n\t\tgraph.addDirectedEdge(0, 1, 0);\n\t\tgraph.addDirectedEdge(0, 2, 0);\n\t\tgraph.addDirectedEdge(0, 3, 0);\n\t\tgraph.addDirectedEdge(0, 4, 0);\n\t\tgraph.addDirectedEdge(0, 5, 0);\n\t\tgraph.addDirectedEdge(5, 1, -1);\n\t\tgraph.addDirectedEdge(5, 2, 1);\n\t\tgraph.addDirectedEdge(1, 4, 4);\n\t\tgraph.addDirectedEdge(1, 3, 5);\n\t\tgraph.addDirectedEdge(2, 1, 0);\n\t\tgraph.addDirectedEdge(3, 5, -3);\n\t\tgraph.addDirectedEdge(3, 4, -1);\n\t\tgraph.addDirectedEdge(4, 5, -3);\n\t\t\n\t\tBellmanFordAlgo<Integer> bellnBellmanFordAlgo = new BellmanFordAlgo(graph ,graph.vertexList.get(0));\n\t\t\n\t\tbellnBellmanFordAlgo.getSingleSourceShortestPath();\n\t\t\n\t\tbellnBellmanFordAlgo.printPath(graph.vertexList.get(3));\n\t\t\n\t}", "public final float minimumMarchingDistance(float[] val, boolean[] flag) {\n\n // s = a + b +c; s2 = a*a + b*b +c*c\n s = 0;\n s2 = 0;\n count = 0;\n\n for (int n=0; n<6; n+=2) {\n\t\t\tif (flag[n] && flag[n+1]) {\n\t\t\t\ttmp = Numerics.min(val[n], val[n+1]); // Take the smaller one if both are processed\n\t\t\t\ts += tmp;\n\t\t\t\ts2 += tmp*tmp;\n\t\t\t\tcount++;\n\t\t\t} else if (flag[n]) {\n\t\t\t\ts += val[n]; // Else, take the processed one\n\t\t\t\ts2 += val[n]*val[n];\n\t\t\t\tcount++;\n\t\t\t} else if (flag[n+1]) {\n\t\t\t\ts += val[n+1];\n\t\t\t\ts2 += val[n+1]*val[n+1];\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n // count must be greater than zero since there must be at least one processed pt in the neighbors\n \n tmp = (s+Math.sqrt( (s*s-count*(s2-1.0f))))/count;\n\n // The larger root\n return (float)tmp;\n }", "public static ArrayList<Freebody> preset4(){\n\t\t\r\n\t\tinitializePreqs();\r\n\t\tint size = 8; //radius of balls\r\n\t\tfloat bounce = 1; //elasticity of balls\r\n\t\tfloat drag=1;\r\n\t\t// DRAG IS A VALUE BETWEEN 0 AND 1!! 1 would make it completely stop, by sapping\r\n\t\t// away all velocity.\r\n\t\t// 0.5 would reduce the speed by 1/2 each tick, and 0 is no friction\r\n\t\tint locX,locY,locZ;\r\n\t\t\r\n\t\tint dis=1500;\t\t\t \t//distance between the main mass and secondary masses\r\n\t\t\r\n\t\tfloat invertMass=-200000;\t\t//mass of the secondary masses, negative mass makes them repel the smaller particles, not attract\r\n\t\tfloat mainMass = 850000;\t\t//mass of the main Freebody.\r\n\t\t\r\n\t\tfloat ratio=(-invertMass/mainMass);\r\n\t\tint secSize=(int) ((Math.cbrt(ratio)*10*size)); \t //size of secondary masses; size is proportional to mass.\r\n\t\tint worldSize=0;\r\n\t\t\r\n\t\tif(worldSize!=0) { locX=worldSize/2;locY=worldSize/2;locZ=worldSize/2; } //location of the action, typically the middle of the scene, or where the main mass is located.\r\n\t\t else { locX=2500;locY=2500;locZ=2500; }\r\n\t\t\r\n\t\t//Black hole\r\n\t\tlist.add(new Freebody(0, 0, mainMass, locX,locY,locZ, (int)(size)*10, bounce, drag));\r\n\t\t\r\n\t\t//below is secondary masses creation\r\n\t\t//z axis offset\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX,locY,locZ+dis, secSize, size, size, bounce, 1, Color.blue));\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX,locY,locZ-dis, secSize, size, size, bounce, 1, Color.blue));\r\n\t\t//x axis offset\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX+dis,locY,locZ, secSize, size, size, bounce, drag, Color.blue));\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX-dis,locY,locZ, secSize, size, size, bounce, drag, Color.blue));\r\n\t\t//y axis offset\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX,locY+dis,locZ, secSize, size, size, bounce, drag, Color.blue));\r\n\t\t//list.add(new Freebody(0, 0, invertMass, locX,locY-dis,locZ, secSize, size, size, bounce, drag, Color.blue));\r\n\t\t//end of large masses creation\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//variable to make it easier to change the # of particles\r\n\t\tint c=25;\r\n\t\t\r\n\t\t//below is explaining how to setup the particles around the center mass.\r\n\t\t//make symmetry with 1000 open space on both sides\r\n\t\t//worldsize-2000=usable space\r\n\t\t//c*2*d is space used by objects\r\n\t\t//worldsize-2000=c*2*d\r\n\t\t//d=(worldsize-2000)/(2c)\r\n\t\t//starting x is 1000.\r\n\t\t\r\n\t\t//y starting is so that c/2 is at locY.\r\n\t\t//worldSize/2=y+(c/2*d)\r\n\t\t//y starting = (worldSize/2)-(c/2*d)\r\n\t\t//END of explanation\r\n\t\t\r\n\t\tfloat d=(locX*2-2000)/(2*c);\r\n\t\tfloat yStart=(locY)-((c/2)*d);\r\n\t\t//setting the max sizes of i,j,k in the for loops.\r\n\t\tint I=1*c;\r\n\t\tint J=2*c;\r\n\t\tint K=2;\r\n\t\t//speed and angle of particles, defaulted inverted for symmetry.\r\n\t\tint sped=500;\r\n\t\tint ang=30;\r\n\t\t\r\n\t\tint start=1000;\r\n\t\tfor(int i=0; i<I; i++) {\r\n\t\t\tfor(int j=0; j<J;j++) {\r\n\t\t\t\tfor(int k=0; k<K;k++) { \r\n\t\t\t\t\tlist.add(new Freebody(-sped, ang, 1, start+(int)(d*j), (int)(i*d+yStart), (int)(-k*d)+(locZ -1000), size, bounce, 0.001f));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i=0; i<I; i++) {\r\n\t\t\tfor(int j=0; j<J;j++) {\r\n\t\t\t\tfor(int k=0; k<K;k++) {\r\n\t\t\t\t\tlist.add(new Freebody( sped, ang, 1, start+(int)(d*j), (int)(i*d+yStart), (int)(k*d)+(locZ +1000), size, bounce, 0.001f));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tint obsInOnHalf=I*J*K; //how many particles(Freebodys) are in one \"half\" (presets are normally made with 2 distinct halves)\r\n\t\t\t\t\t\t\t\t //below is to set velocities of every particle easily.\r\n\t\tint larges=1; //set this value equal to how many large masses were made.\r\n\t\t\r\n\t\t//vels of particles\r\n\t\tfloat vX=sped,vY=sped,vZ=0;\r\n\t\tfor(int i=5; i<(obsInOnHalf)+larges;i++) {\r\n\t\t\tlist.get(i).setVel(vX, vY, vZ);\r\n\t\t}\r\n\t\tfor(int i=(obsInOnHalf)+larges; i<list.size();i++) {\r\n\t\t\tlist.get(i).setVel(-vX, -vY, 0);\r\n\t\t}\r\n\t\t\r\n\t\t//set worldSize to 0 for no boundaries (unlimited universe)\t\t\t\r\n\t\tuni = new WorldCreator(worldSize, worldSize, worldSize, 0,2,locX,locY,locZ);\r\n\t\t\r\n\t\t//turns on(or off) object/object collisions, off by default.\r\n\t\tuni.collisions(false);\t\t\t\r\n\t\treturn list;\r\n\t}", "public void testGetBoundingBox(){\r\n\t\tdouble xc = 0;\r\n\t\tdouble yc = 0;\r\n\t\tdouble r = 10;\r\n\t\tdouble r2 = r*Math.sqrt(2)/2;\r\n\t\tdouble t0 = PI/4;\r\n\t\tdouble t1 = 3*PI/4;\r\n\t\tdouble t2 = 5*PI/4;\r\n\t\tdouble t3 = 7*PI/4;\r\n\t\tdouble dt = PI/2;\r\n\t\t\r\n\t\t// declare variables\r\n\t\tCircleArc2D arc0, arc1, arc2, arc3;\r\n\t\tBox2D box0, box1, box2, box3;\r\n\t\tBox2D bounds0, bounds1, bounds2, bounds3;\r\n\t\t\r\n\t\t// top\r\n\t\tarc0 \t= new CircleArc2D(xc, yc, r, t0, dt);\r\n\t\tbox0 \t= new Box2D(xc-r2, xc+r2, r2, r);\r\n\t\tbounds0 = arc0.boundingBox();\r\n\t\tassertTrue(box0.almostEquals(bounds0, Shape2D.ACCURACY));\r\n\r\n\t\t// left\r\n\t\tarc1 \t= new CircleArc2D(xc, yc, r, t1, dt);\r\n\t\tbox1 \t= new Box2D(xc-r, xc-r2, -r2, r2);\r\n\t\tbounds1 = arc1.boundingBox();\r\n\t\tassertTrue(box1.almostEquals(bounds1, Shape2D.ACCURACY));\r\n\r\n\t\t// bottom\r\n\t\tarc2 \t= new CircleArc2D(xc, yc, r, t2, dt);\r\n\t\tbox2 \t= new Box2D(xc-r2, xc+r2, -r, -r2);\r\n\t\tbounds2 = arc2.boundingBox();\r\n\t\tassertTrue(box2.almostEquals(bounds2, Shape2D.ACCURACY));\r\n\r\n\t\t// right\r\n\t\tarc3 \t= new CircleArc2D(xc, yc, r, t3, dt);\r\n\t\tbox3 \t= new Box2D(r2, r, -r2, r2);\r\n\t\tbounds3 = arc3.boundingBox();\r\n\t\tassertTrue(box3.almostEquals(bounds3, Shape2D.ACCURACY));\r\n\r\n\t\t/// circle arcs with extent 3*pi/2\r\n\t\tdt = 3*PI/2;\r\n\t\t\r\n\t\t// top\r\n\t\tarc0 \t= new CircleArc2D(xc, yc, r, t3, dt);\r\n\t\tbox0 \t= new Box2D(xc-r, xc+r, -r2, r);\r\n\t\tbounds0 = arc0.boundingBox();\r\n\t\tassertTrue(box0.almostEquals(bounds0, Shape2D.ACCURACY));\r\n\r\n\t\t// left\r\n\t\tarc1 \t= new CircleArc2D(xc, yc, r, t0, dt);\r\n\t\tbox1 \t= new Box2D(xc-r, xc+r2, -r, r);\r\n\t\tbounds1 = arc1.boundingBox();\r\n\t\tassertTrue(box1.almostEquals(bounds1, Shape2D.ACCURACY));\r\n\r\n\t\t// bottom\r\n\t\tarc2 \t= new CircleArc2D(xc, yc, r, t1, dt);\r\n\t\tbox2 \t= new Box2D(xc-r, xc+r, -r, r2);\r\n\t\tbounds2 = arc2.boundingBox();\r\n\t\tassertTrue(box2.almostEquals(bounds2, Shape2D.ACCURACY));\r\n\r\n\t\t// right\r\n\t\tarc3 \t= new CircleArc2D(xc, yc, r, t2, dt);\r\n\t\tbox3 \t= new Box2D(-r2, r, -r, r);\r\n\t\tbounds3 = arc3.boundingBox();\r\n\t\tassertTrue(box3.almostEquals(bounds3, Shape2D.ACCURACY));\r\n\t\r\n\t}", "private static double divideAndConquer(ArrayList<Point> X, ArrayList<Point> Y) {\n\n\t\t//Assigns size of array\n\t\tint size = X.size();\n\n\t\t//If less than 3 points, efficiency is better by brute force\n\t\tif (size <= 3) {\n\t\t\treturn BruteForceClosestPairs(X);\n\t\t}\n\t\t\n\t\t//Ceiling of array size / 2\n\t\tint ceil = (int) Math.ceil(size / 2);\n\t\t//Floor of array size / 2\n\t\tint floor = (int) Math.floor(size / 2);\n\t\t\n\t\t//Array list for x & y values left of midpoint\n\t\tArrayList<Point> xL = new ArrayList<Point>();\t\n\t\tArrayList<Point> yL = new ArrayList<Point>();\n\t\t\n\t\t//for [0 ... ceiling of array / 2]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = 0; i < ceil; i++) {\n\t\t\t\n\t\t\txL.add(X.get(i));\n\t\t\tyL.add(Y.get(i));\n\t\t}\n\t\t\n\t\t// Array list for x & y values right of midpoint\n\t\tArrayList<Point> xR = new ArrayList<Point>();\n\t\tArrayList<Point> yR = new ArrayList<Point>();\n\t\t\n\t\t//for [floor of array / 2 ... size of array]\n\t\t//add the points onto the new arrays\n\t\tfor (int i = floor; i < size - 1; i++) {\n\n\t\t xR.add(X.get(i));\n\t\t\tyR.add(Y.get(i));\n\t\t}\n\t\t\n\t\t//Recursively find the shortest distance\n\t\tdouble distanceL = divideAndConquer(xL, yL);\n\t\tdouble distanceR = divideAndConquer(xR, xL);\n\t\t//Smaller of both distances\n\t\tdouble distance = Math.min(distanceL, distanceR);\n\t\t//Mid-line\n\t\tdouble mid = X.get(ceil - 1).getX();\n\n\t\tArrayList<Point> S = new ArrayList<Point>();\n\n\t\t//copy all the points of Y for which |x - m| < d into S[0..num - 1]\n\t\tfor (int i = 0; i < Y.size() - 1; i++) {\n\n\t\t\tif (Math.abs(X.get(i).getX() - mid) < distance) {\n\t\t\t\tS.add(Y.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Square minimum distance\n\t\tdouble dminsq = distance * distance;\n\t\t//Counter\n\t\tint k = 0;\n\t\tint num = S.size();\n\n\t\tfor (int i = 0; i < num - 2; i++) {\n\t\t\t\n\t\t\tk = i + 1;\n\t\t\t\n\t\t\twhile (k <= num - 1 && (Math.pow((S.get(k).getY() - S.get(i).getY()), 2) < dminsq)) {\n\n\t\t\t\t//Find distance between points and find the minimum compared to dminsq\n\t\t\t\tdminsq = Math.min(Math.pow(S.get(k).getX() - S.get(i).getX(), 2) \n\t\t\t\t\t\t\t\t+ Math.pow(S.get(k).getY() - S.get(i).getY(), 2), dminsq);\n\n\t\t\t\tk = k + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn Math.sqrt(dminsq);\n\t}", "static double bSearchSqrt(double t){\n\t\tdouble l = 0.0, r = t, res = -1.0;\n\t\twhile(Math.abs(r - l) > 1e-7){ //guaranteed 6 \"good\" digits\n\t\t\tdouble m = l + (r - l) / 2.0;\n\t\t\tif(m * m <= t){\n\t\t\t\tl = m;\n\t\t\t\tres = m;\n\t\t\t}else{\n\t\t\t\tr = m;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "private int findMaxPt(ArrayList<Point> s, Point p1, Point p2) {\n double maxPt = 0;\n int maxIndex = 0;\n for(int i = 1; i < s.size()-2; i++){\n if(p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y > maxPt) {\n maxPt = p1.x*p2.y + s.get(i).x*p1.y + p2.x*s.get(i).y - s.get(i).x*p2.y - p2.x*p1.y - p1.x*s.get(i).y;\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "static long[] middleRecursionWrapper(int maxDistanceLeft, ThreadVariables t, int cutoff) {\n if (cutoff < 3){\n throw new IllegalArgumentException();\n }\n long [] vals;\n long[] a = Q2Test.q2AllNew(maxDistanceLeft, t);\n for (int c = 3; c < cutoff; c++) {\n long[] b = lowerRecursion(maxDistanceLeft, c, t, cutoff);\n for (int j = 0; j <= maxDistanceLeft; j++) {\n a[j] = a[j] + b[j];\n }\n }\n vals = a;\n return vals;\n }", "public void update() {\n double newAngle = angle - 90;\n Coordinate nextCenterPointCoordinate = new Coordinate(\n this.centerPointCoordinate.getXCoordinate() - (Constants.BULLET_SPEED * Math.cos(Math.toRadians(newAngle))),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(newAngle)))\n );\n\n\n ArrayList<Wall> walls = new ArrayList<>();\n walls.addAll(TankTroubleMap.getDestructibleWalls());\n walls.addAll(TankTroubleMap.getIndestructibleWalls());\n ArrayList<Coordinate> nextCoordinatesArrayList = makeCoordinatesFromCenterCoordinate(nextCenterPointCoordinate);\n Wall wallToCheck = null;\n for (Wall wall : walls) {\n if (TankTroubleMap.checkOverLap(wall.getPointsArray(), nextCoordinatesArrayList)) {\n wallToCheck = wall;\n }\n }\n\n if (wallToCheck != null) {\n if (horizontalCrash(wallToCheck)) { //if the bullet would only go over horizontal side of any walL\n nextCenterPointCoordinate = flipH();\n } else if (verticalCrash(wallToCheck)) { // if the bullet would only go over vertical side any wall\n nextCenterPointCoordinate = flipV();\n } else {// if the bullet would only go over corner of any wall\n int cornerCrashState = cornerCrash(wallToCheck);\n nextCenterPointCoordinate = flipCorner(cornerCrashState);\n }\n\n if (wallToCheck.isDestroyable()) {//crashing destructible\n //System.out.println(\"bullet damage:\"+ damage);\n //System.out.println(\"wall health:\"+ ((DestructibleWall) wallToCheck).getHealth());\n ((DestructibleWall) wallToCheck).receiveDamage(damage);\n if (((DestructibleWall) wallToCheck).getHealth() <= 0) {\n TankTroubleMap.getDestructibleWalls().remove(wallToCheck);\n }\n bulletsBlasted = true;\n tankTroubleMap.getBullets().remove(this);\n }\n }\n this.centerPointCoordinate = nextCenterPointCoordinate;\n updateArrayListCoordinates();\n\n // Tanks / users\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getUsers().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getUsers().get(i).getUserTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getUsers().get(i).getUserTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getUsers().get(i).getUserTank().getHealth());\n if (tankTroubleMap.getUsers().get(i).getUserTank().getHealth() <= 0) {\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().get(finalI).getUserTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getUsers().remove(finalI);\n gameOverCheck();\n if (isUserTank) {\n tankTroubleMap.getUsers().get(tankIndex).getUserTank().setNumberOfDestroyedTank(tankTroubleMap.getUsers().get(tankIndex).getUserTank().getNumberOfDestroyedTank() + 1);\n }\n tankTroubleMap.getAudience().add(tankTroubleMap.getUsers().get(finalI));\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n\n // Tanks / bots\n if (!bulletsBlasted) {\n for (int i = 0; i < tankTroubleMap.getBots().size(); i++) {\n if (TankTroubleMap.checkOverLap(coordinates, tankTroubleMap.getBots().get(i).getAiTank().getTankCoordinates())) {\n bulletsBlasted = true;\n for (Bullet bullet : tankTroubleMap.getBullets()) {\n if (bullet.bulletsBlasted) tankTroubleMap.getBullets().remove(bullet);\n break;\n }\n tankTroubleMap.getBots().get(i).getAiTank().receiveDamage(damage);\n //System.out.println(\"health: \" + tankTroubleMap.getBots().get(i).getAiTank().getHealth());\n if (tankTroubleMap.getBots().get(i).getAiTank().getHealth() <= 0) {\n // System.out.println(\"Blasted Tank.......\");\n int finalI = i;\n Thread thread = new Thread(() -> {\n try {\n SoundsOfGame soundsOfGame = new SoundsOfGame(\"explosion\", false);\n soundsOfGame.playSound();\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_A.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_B.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_C.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_D.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_E.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_F.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_G.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().get(finalI).getAiTank().setTankImage(ImageIO.read(new File(\"kit/explosion/Explosion_H.png\")));\n Thread.sleep(150);\n tankTroubleMap.getBots().remove(finalI);\n gameOverCheck();\n } catch (InterruptedException | IOException e) {\n e.printStackTrace();\n }\n });\n thread.start();\n }\n break;\n }\n }\n }\n }", "private static Coord findCoordinate(Coord p0, Coord p1, Coord p2, double r0, double r1, double r2){\r\n\r\n\tdouble x0, y0, x1, y1, x2, y2;\r\n\tx0 = p0.getX(); y0 = p0.getY();\r\n\tx1 = p1.getX(); y1 = p1.getY();\r\n\tx2 = p2.getX(); y2 = p2.getY();\r\n\t//core.Debug.p(\"x0:\" + x0 + \",y0:\" + y0 + \",r0:\" + r0);\r\n\t//core.Debug.p(\"x1:\" + x1 + \",y1:\" + y1 + \",r1:\" + r1);\r\n\t//core.Debug.p(\"x2:\" + x2 + \",y2:\" + y2 + \",r2:\" + r2);\r\n\tdouble a, dx, dy, d, h, rx, ry;\r\n\tdouble point2_x, point2_y;\r\n\r\n\t/* dx and dy are the vertical and horizontal distances between\r\n\t * the circle centers.\r\n\t */\t\r\n\tdx = x1 - x0;\r\n\tdy = y1 - y0;\r\n\r\n\t/* Determine the straight-line distance between the centers. */\r\n\td = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t/* Check for solvability. */\r\n\tif (d > (r0 + r1)){\r\n\t\t/* no solution. circles do not intersect. */\r\n\t\t//core.Debug.p(\"no solution1\");\r\n\t\treturn null;\r\n\t}\r\n\tif (d < Math.abs(r0 - r1)){\r\n\t\t/* no solution. one circle is contained in the other */\r\n\t\t//core.Debug.p(\"no solution2\");\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/* 'point 2' is the point where the line through the circle\r\n\t * intersection points crosses the line between the circle\r\n\t * centers.\r\n\t */\r\n\r\n\t/* Determine the distance from point 0 to point 2. */\r\n\ta = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ;\r\n\r\n\t/* Determine the coordinates of point 2. */\r\n\tpoint2_x = x0 + (dx * a/d);\r\n\tpoint2_y = y0 + (dy * a/d);\r\n\r\n\t/* Determine the distance from point 2 to either of the\r\n\t * intersection points.\r\n\t */\t\r\n\th = Math.sqrt((r0*r0) - (a*a));\r\n\r\n\t/* Now determine the offsets of the intersection points from\r\n\t * point 2.\r\n\t */\r\n\trx = -dy * (h/d);\r\n\try = dx * (h/d);\r\n\r\n\t/* Determine the absolute intersection points. */\r\n\tdouble intersectionPoint1_x = point2_x + rx;\r\n\tdouble intersectionPoint2_x = point2_x - rx;\r\n\tdouble intersectionPoint1_y = point2_y + ry;\r\n\tdouble intersectionPoint2_y = point2_y - ry;\r\n\r\n\t/* Lets determine if circle 3 intersects at either of the above intersection points. */\r\n\tdx = intersectionPoint1_x - x2;\r\n\tdy = intersectionPoint1_y - y2;\r\n\tdouble d1 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\tdx = intersectionPoint2_x - x2;\r\n\tdy = intersectionPoint2_y - y2;\r\n\tdouble d2 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t//core.Debug.p(\"d1: \" + d1 + \", d2: \" + d2 + \", r2: \" + r2);\r\n\t//core.Debug.p(\"diff1: \" + Math.abs(d1-r2));\r\n\t//core.Debug.p(\"point1: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t//core.Debug.p(\"diff2: \" + Math.abs(d2-r2));\r\n\t//core.Debug.p(\"point2: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\r\n\r\n\tif(Math.abs(d1 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t\treturn new Coord(intersectionPoint1_x, intersectionPoint1_y);\r\n\t}\r\n\telse if(Math.abs(d2 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\t\treturn new Coord(intersectionPoint2_x, intersectionPoint2_y);}\r\n\telse {\r\n\t\t//core.Debug.p(\"no intersection\");\r\n\t\treturn null;\r\n\t}\r\n}", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public static Vector<int []> aStar(int[] startNode,int[] endNode, mapNode[][] nodes, String method){\n\t\t\t\tfor(int i = 0; i < nodes.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(int j = 0; j < nodes[i].length;j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnodes[i][j].setTotCost(999999999);//set the initial distance to INF\r\n\t\t\t\t\t\tnodes[i][j].gridPosition[0] = i;//save current node x position\r\n\t\t\t\t\t\tnodes[i][j].gridPosition[1] = j;//save current node y position\r\n\t\t\t\t\t\tnodes[i][j].setNodeVistied(false);//set all nodes are not visited yet\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\r\n\t\tVector<int []> shortestPath;\r\n\t\tVector<mapNode> closeSet;//the set of nodes already evaluated\r\n\t\tcloseSet = new Vector<mapNode>();\r\n\t\tVector<mapNode> openSet;//the set of nodes to be evaluated\r\n\t\topenSet = new Vector<mapNode>();\r\n\t\tfloat bestCost;\r\n\t\t//Add the start node into open set\r\n\t\tmapNode start = new mapNode();\r\n\t\tnodes[startNode[0]][startNode[1]].setHeuristics(0);\r\n\t\tnodes[startNode[0]][startNode[1]].setTotCost(0);\r\n\t\tstart = nodes[startNode[0]][startNode[1]];\r\n\t\topenSet.add(start);\r\n\t\t\r\n\t\twhile(openSet.size() != 0)\r\n\t\t{\r\n\t\t\t//sort openSet from lowest cost to highest\r\n\t\t\tint j;\r\n\t\t\tfor(int i = 1; i < openSet.size(); i++){\r\n\t\t\t\tj = i;\r\n\t\t\t\twhile(j > 0 && openSet.get(j-1).getTotCost() > openSet.get(j).getTotCost()){\r\n\t\t\t\t\tCollections.swap(openSet, j, j-1);\r\n\t\t\t\t\tj = j-1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//the node in openset having the lowest cost\r\n\t\t\tmapNode tempNode = new mapNode();\r\n\t\t\ttempNode = openSet.get(0);\r\n\t\t\t\r\n\t\t\t//End case if the condition have approached\r\n\t\t\tif(tempNode.gridPosition[0] == endNode[0] && tempNode.gridPosition[1] == endNode[1]){\r\n\t\t\t\tshortestPath = nodes[endNode[0]][endNode[1]].getTotPath();\r\n\t\t\t\tif(shortestPath.size() == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tshortestPath.add(endNode);\r\n\t\t\t\t// No result was found -- only the end node\r\n\t\t\t\treturn shortestPath;\r\n\t\t\t}\r\n\t\t\t\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\r\n\t\t\t//remove current from open set\r\n\t\t\topenSet.remove(0);\r\n\t\t\t//add current to close set\r\n\t\t\tcloseSet.add(tempNode);\r\n\t\t\t\r\n\t\t\t//update Top node information from original nodes matrix\r\n\t\t\tif(tempNode.topNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempTopNode = nodes[tempNode.topNode.gridPosition[0]][tempNode.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(tempNode.bottomNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempBottomNode = nodes[tempNode.bottomNode.gridPosition[0]][tempNode.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(tempNode.leftNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempLeftNode = nodes[tempNode.leftNode.gridPosition[0]][tempNode.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(tempNode.rightNode != null)\r\n\t\t\t{\r\n\t\t\t\ttempRightNode = nodes[tempNode.rightNode.gridPosition[0]][tempNode.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\r\n\t\t\t//Manhattan, Euclidean method\r\n\t\t\tif(method.equals(\"manhattan\")){\r\n\t\t\t\t//update neighbor nodes\r\n\t\t\t\t//update top Node\r\n\t\t\t\tif(tempTopNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempTopNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempTopNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempTopNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && tempTopNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempTopNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempTopNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempTopNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.topNode.gridPosition[0]][tempNode.topNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && checkOpenSet(openSet, tempTopNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempTopNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update bottom node\r\n\t\t\t\tif(tempBottomNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempBottomNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempBottomNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempBottomNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && tempBottomNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempBottomNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempBottomNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempBottomNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.bottomNode.gridPosition[0]][tempNode.bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && checkOpenSet(openSet, tempBottomNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempBottomNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Left node\r\n\t\t\t\tif(tempLeftNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost =hValue+manhattan(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempLeftNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempLeftNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempLeftNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && tempLeftNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempLeftNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempLeftNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempLeftNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.leftNode.gridPosition[0]][tempNode.leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && checkOpenSet(openSet, tempLeftNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempLeftNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Right node\r\n\t\t\t\tif(tempRightNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+manhattan(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempRightNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempRightNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempRightNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+manhattan(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && tempRightNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempRightNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempRightNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempRightNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.rightNode.gridPosition[0]][tempNode.rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && checkOpenSet(openSet, tempRightNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempRightNode);\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//Manhattan, Euclidean method\r\n\t\t\telse if(method.equals(\"euclidean\")){\r\n\t\t\t\t//update neighbor nodes\r\n\t\t\t\t//update top Node\r\n\t\t\t\tif(tempTopNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempTopNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempTopNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempTopNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempTopNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && tempTopNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempTopNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempTopNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempTopNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempTopNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.topNode.gridPosition[0]][tempNode.topNode.gridPosition[1]] = tempTopNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempTopNode) == false && checkOpenSet(openSet, tempTopNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempTopNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update bottom node\r\n\t\t\t\tif(tempBottomNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempBottomNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempBottomNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempBottomNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempBottomNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && tempBottomNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempBottomNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempBottomNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempBottomNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempBottomNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.bottomNode.gridPosition[0]][tempNode.bottomNode.gridPosition[1]] = tempBottomNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempBottomNode) == false && checkOpenSet(openSet, tempBottomNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempBottomNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Left node\r\n\t\t\t\tif(tempLeftNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost =hValue+Euclidean(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempLeftNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempLeftNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempLeftNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempLeftNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && tempLeftNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempLeftNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempLeftNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempLeftNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempLeftNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.leftNode.gridPosition[0]][tempNode.leftNode.gridPosition[1]] = tempLeftNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempLeftNode) == false && checkOpenSet(openSet, tempLeftNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempLeftNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//update Right node\r\n\t\t\t\tif(tempRightNode != null){\r\n\t\t\t\t\tfloat hValue = tempNode.getHeuristics()+1;\r\n\t\t\t\t\tfloat nextCost = hValue+Euclidean(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\tif(tempNode.getOwnElevation() < tempRightNode.getOwnElevation()){\r\n\t\t\t\t\t\tif(tempRightNode.getOwnElevation() == 999999999){\r\n\t\t\t\t\t\t\tnextCost = 999999999;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\thValue = tempNode.getHeuristics()+1+(tempRightNode.getOwnElevation()-tempNode.getOwnElevation());\r\n\t\t\t\t\t\t\tnextCost = hValue+Euclidean(tempRightNode.gridPosition, endNode, nodes);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && tempRightNode.getTotCost() > nextCost){\r\n\t\t\t\t\t\t//This node is not in closeSet or openSet\r\n\t\t\t\t\t\t//it is the first time that program has arrived this node\r\n\t\t\t\t\t\t//update cost\r\n\t\t\t\t\t\ttempRightNode.setHeuristics(hValue);\r\n\t\t\t\t\t\ttempRightNode.setTotCost(nextCost);\r\n\t\t\t\t\t\tVector<int[]> tempPath = new Vector<int[]>();\r\n\t\t\t\t\t\t//record the path\r\n\t\t\t\t\t\tfor(int m = 0; m < tempNode.getTotPath().size(); m++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY = new int[2];\r\n\t\t\t\t\t\t\ttempXY = tempNode.getTotPath().get(m);\r\n\t\t\t\t\t\t\ttempPath.add(tempXY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//check new node to see if it exists in path\r\n\t\t\t\t\t\tif(checkPositionInPath(tempPath, tempNode.gridPosition[0], tempNode.gridPosition[1]) == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint[] tempXY2 = new int[2];\r\n\t\t\t\t\t\t\ttempXY2 = tempNode.gridPosition;\r\n\t\t\t\t\t\t\ttempPath.add(tempXY2);\r\n\t\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\t\t//assign new path to the node\r\n\t\t\t\t\t\ttempRightNode.setTotPath(tempPath);\r\n\t\t\t\t\t\ttempRightNode.setStatus(Status.EXPLORED);\r\n\t\t\t\t\t\t//update data back to original matrix\r\n\t\t\t\t\t\tnodes[tempNode.rightNode.gridPosition[0]][tempNode.rightNode.gridPosition[1]] = tempRightNode;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(checkCloseSet(closeSet,tempRightNode) == false && checkOpenSet(openSet, tempRightNode) == false){\r\n\t\t\t\t\t\topenSet.add(tempRightNode);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\t\tshortestPath = nodes[endNode[0]][endNode[1]].getTotPath();\r\n\t\tif(shortestPath.size() == 1)\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tshortestPath.add(endNode);\r\n\t\t// No result was found -- only the end node\r\n\t\treturn shortestPath;\t\r\n\t}", "protected void addGreatCircle(final GeoPoint startPoint, final GeoPoint endPoint, final int numberOfPoints) {\n\t\tfinal double lat1 = startPoint.getLatitude() * MathConstants.DEG2RAD;\n\t\tfinal double lon1 = startPoint.getLongitude() * MathConstants.DEG2RAD;\n\t\tfinal double lat2 = endPoint.getLatitude() * MathConstants.DEG2RAD;\n\t\tfinal double lon2 = endPoint.getLongitude() * MathConstants.DEG2RAD;\n\n\t\tfinal double d = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin((lat1 - lat2) / 2), 2) + Math.cos(lat1) * Math.cos(lat2)\n\t\t\t\t* Math.pow(Math.sin((lon1 - lon2) / 2), 2)));\n\t\tdouble bearing = Math.atan2(Math.sin(lon1 - lon2) * Math.cos(lat2),\n\t\t\t\tMath.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon1 - lon2))\n\t\t\t\t/ -MathConstants.DEG2RAD;\n\t\tbearing = bearing < 0 ? 360 + bearing : bearing;\n\t\t\n\t\tfor (int i = 1; i <= numberOfPoints; i++) {\n\t\t\tfinal double f = 1.0 * i / (numberOfPoints+1);\n\t\t\tfinal double A = Math.sin((1 - f) * d) / Math.sin(d);\n\t\t\tfinal double B = Math.sin(f * d) / Math.sin(d);\n\t\t\tfinal double x = A * Math.cos(lat1) * Math.cos(lon1) + B * Math.cos(lat2) * Math.cos(lon2);\n\t\t\tfinal double y = A * Math.cos(lat1) * Math.sin(lon1) + B * Math.cos(lat2) * Math.sin(lon2);\n\t\t\tfinal double z = A * Math.sin(lat1) + B * Math.sin(lat2);\n\n\t\t\tfinal double latN = Math.atan2(z, Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n\t\t\tfinal double lonN = Math.atan2(y, x);\n\t\t\taddPoint((int) (latN * MathConstants.RAD2DEG * 1E6), (int) (lonN * MathConstants.RAD2DEG * 1E6));\n\t\t}\n\t}", "int getBallRadius();", "@Override\n public List<GeoPoint> findGeoIntersections(Ray ray , double maxDistance) {\n Point3D P0 = ray.getP0();\n Vector v = ray.getDir();\n\n if (P0.equals(_center)) {\n return List.of(new GeoPoint(this,_center.add(v.scale(_radius))));\n }\n\n Vector U = _center.subtract(P0);\n\n double tm = alignZero(v.dotProduct(U));\n double d = alignZero(Math.sqrt(U.lengthSquared() - tm * tm));\n\n // no intersections : the ray direction is above the sphere\n if (d >= _radius) {\n return null;\n }\n\n double th = alignZero(Math.sqrt(_radius * _radius - d * d));\n double t1 = alignZero(tm - th);\n double t2 = alignZero(tm + th);\n boolean validT1=alignZero(t1 - maxDistance ) <=0;\n boolean validT2=alignZero( t2 - maxDistance )<=0;\n if (t1>0 && t2>0 && validT1 && validT2) {\n Point3D P1 =ray.getPoint(t1);\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P1),new GeoPoint(this, P2));\n }\n if (t1>0 && validT1){\n Point3D P1 =ray.getPoint(t1);\n return List.of(new GeoPoint(this,P1));\n }\n if (t2>0 && validT2) {\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P2));\n }\n return null;\n }" ]
[ "0.5683163", "0.5569585", "0.5388732", "0.5366602", "0.53209573", "0.52741563", "0.52635634", "0.5208666", "0.5202877", "0.51995975", "0.5193646", "0.51902974", "0.5158004", "0.5135764", "0.51142454", "0.5099598", "0.5091952", "0.5085746", "0.5065581", "0.5046452", "0.50320774", "0.49895722", "0.49705282", "0.49641594", "0.4959386", "0.49587634", "0.49549666", "0.493414", "0.49331993", "0.49268064", "0.4919932", "0.49183428", "0.4905637", "0.49054968", "0.49027", "0.49018988", "0.48885778", "0.48860705", "0.48790336", "0.48643398", "0.4862619", "0.48625952", "0.48624277", "0.4854858", "0.48537582", "0.48312324", "0.48311597", "0.48258087", "0.48212606", "0.48206288", "0.48158354", "0.48151723", "0.48141053", "0.48132047", "0.48111686", "0.48095688", "0.480251", "0.4794143", "0.47915903", "0.4781594", "0.47799924", "0.47766387", "0.47746873", "0.4770049", "0.4759941", "0.47572508", "0.4754723", "0.4753895", "0.47532922", "0.4743541", "0.47353566", "0.47338605", "0.4727267", "0.47251078", "0.47229484", "0.47221568", "0.4714367", "0.47140265", "0.47085524", "0.46993938", "0.46992642", "0.469757", "0.46961263", "0.46918494", "0.46887252", "0.46856672", "0.46816614", "0.4678559", "0.46774015", "0.4676307", "0.4673053", "0.46706933", "0.46581045", "0.46548378", "0.46425423", "0.46424857", "0.4640684", "0.46367761", "0.4632175", "0.46311745", "0.46308324" ]
0.0
-1
Calculates the locus of the centers of the axisparallel squares (L_infty balls) of radius r that cover T. We have: center(T,r) = center(extreme(T),r) center(T,r) can be empty, a point, an axisparallel segment, or a rectangle center(T,r) is empty iff r delta(T).
private PointList center(PointList T, double radius){ PointList centers = new PointList(Color.PINK); Point[] extrema = new Point[4]; Point currentCenter; double xLength; double yLength; double xStart; double xEnd; double yStart; double yEnd; extrema = T.getExtremePoints(); if (extrema[0] == null) return centers; // centers is empty if (radius < T.delta()) return centers; // centers is empty // find X coordinates currentCenter = new Point(extrema[0].posX + radius, extrema[0].posY); if (currentCenter.posX + radius == extrema[1].posX) { // current x position is only possible x position xStart = currentCenter.posX; xEnd = xStart; } else { // we can move in x direction xLength = Math.abs(currentCenter.posX + radius - extrema[1].posX); xStart = currentCenter.posX - xLength; xEnd = currentCenter.posX; } // find Y coordinates currentCenter = new Point(extrema[2].posX, extrema[2].posY + radius); if (currentCenter.posY + radius == extrema[3].posY) { // current y position is only possible y position yStart = currentCenter.posY; yEnd = yStart; } else { // we can move in y direction yLength = Math.abs(currentCenter.posY + radius - extrema[3].posY); yStart = currentCenter.posY - yLength; yEnd = currentCenter.posY; } centers.addPoint(new Point(xStart, yStart)); if (!centers.contains(new Point(xStart, yEnd))){ centers.addPoint(new Point(xStart, yEnd)); } if (!centers.contains(new Point(xEnd, yStart))){ centers.addPoint(new Point(xEnd, yStart)); } if (!centers.contains(new Point(xEnd, yEnd))){ centers.addPoint(new Point(xEnd, yEnd)); } return centers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double[] circleCentre()\n\t{\n\t\tdouble toOriginLength = Math.sqrt(originX*originX + originY*originY);\n\t\tdouble toCentreLength = toOriginLength + radius;\n\t\t\n\t\tdouble[] centrePoint = new double[2];\n\t\t\n\t\tcentrePoint[0] = (toCentreLength * originX)/toOriginLength;\n\t\tcentrePoint[1] = (toCentreLength * originY)/toOriginLength;\n\t\t\n\t\treturn centrePoint;\n\t}", "public abstract Vector computeCenter();", "public FPointType calculateCenter() {\n fRectBound = getBounds2D();\n FPointType fptCenter = new FPointType();\n fptCenter.x = fRectBound.x + fRectBound.width / 2.0f;\n fptCenter.y = fRectBound.y + fRectBound.height / 2.0f;\n calculate(fptCenter);\n \n rotateRadian = 0.0f;\n \n return fptCenter;\n }", "static PT ComputeCircleCenter(PT a, PT b, PT c) {\r\n\t\tb = (a.add(b)).divide(2);\r\n\t\tc = (a.add(c)).divide(2);\r\n\t\treturn ComputeLineIntersection(b, b.add(RotateCW90(a.subtract(b))), c, c.add(RotateCW90(a.subtract(c))));\r\n\t}", "private Point getCentreCoordinate(Point t)\n {\n \treturn new Point (t.x + Constants.cell_length /2f, t.y, t.z+Constants.cell_length/2f );\n }", "public Vec2 getCenter()\n {\n int numTriangles = numPoints - 2;\n\n // Calculate the average midpoint of each composite triangle\n Vec2 averageMidpoint = new Vec2(0, 0);\n float area = 0;\n for (int i=0; i<numTriangles; i++)\n {\n Triangle t = new Triangle(points[0], points[i+1], points[i+2]);\n Vec2 triangleMidpoint = t.getCenter();\n float triangleArea = t.getArea();\n\n averageMidpoint.addX(triangleMidpoint.getX() * triangleArea);\n averageMidpoint.addY(triangleMidpoint.getY() * triangleArea);\n\n area += triangleArea;\n\n// Color color;\n// if (i==0) color = Color.GREEN;\n// else color = Color.ORANGE;\n// SumoGame.ADD_DEBUG_DOT(points[0].getX(), points[0].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+1].getX(), points[i+1].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(points[i+2].getX(), points[i+2].getY(), 5, color);\n// SumoGame.ADD_DEBUG_DOT(triangleMidpoint.getX(), triangleMidpoint.getY(), triangleArea/2000, color);\n }\n\n averageMidpoint.div(area);\n\n// SumoGame.ADD_DEBUG_DOT(averageMidpoint.getX(), averageMidpoint.getY(), 20, Color.RED);\n\n return averageMidpoint;\n }", "private void calculateCentre() {\n \t\t// The size of the centre is presently one 5th of the maze size\n \t\tcentreSize = size / 5;\n \t\t// System.out.println(\"centreSize is: \" + centreSize);\n \n \t\t// Min and max are the start points of the centre\n \t\tint min = (int) Math.ceil((centreSize * 2.0));\n \t\tint max = min + centreSize;\n \t\tmin++; // this adjusts for the border\n \t\tmax++;\n \t\t// System.out.println(\"min is: \" + min);\n \t\t// System.out.println(\"max is: \" + max);\n \n \t\t// centre is the centre point of the maze\n \t\tdouble centre = (centreSize / 2.0) + min;\n \t\t// System.out.println(\"centre is: \" + centre);\n \t\tcentrePoint = new Point2D.Double(centre, centre);\n \t\t\n \t\t//set the min and max points for the centre\n \t\tcentreMin = min;\n \t\tcentreMax = max;\n \t}", "static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }", "private Point findCenter(Point[] positions) {\n\t\t// Prepare new center point.\n\t\tPoint center = new Point(0, 0);\n\t\t\n\t\t// Loop through the positions.\n\t\tfor(int i = 0; i < positions.length; i++) {\n\t\t\t// Add new position.\n\t\t\tcenter.set(new double[] {\n\t\t\t\t(center.x + positions[i].x),\n\t\t\t\t(center.y + positions[i].y) \t\t\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t\t// Calculate mean of positions.\n\t\tcenter.set(new double[] {\n\t\t\t(center.x / positions.length),\n\t\t\t(center.y / positions.length) \n\t\t});\n\t\t\n\t\t// Return the center point.\n\t\treturn center;\n\t}", "public Coords getCenter()\r\n {\r\n return new Coords(Math.round(x + width / 2), Math.round(y + height / 2));\r\n }", "public final int centerX() {\n return (left + right) >> 1;\n }", "Point getCenter();", "Point getCenter();", "private math_vector3d TwoPointGetCenterArcPoint(math_vector3d start, math_vector3d end)\n {\n\n\n ObjectPoint center2d = new ObjectPoint((start.X() + end.X()) / 2.0,(start.Y() + end.Y()) / 2.0);\n ObjectPoint orgin2d = new ObjectPoint(this.theOrigin.X(),this.theOrigin.Y());\n\n\n MathVector2D orginTocenter = new MathVector2D(orgin2d, center2d);\n\n orginTocenter = orginTocenter.GetUnit();\n orginTocenter = orginTocenter.multiply(this.theRadius);\n orgin2d.AddVector(orginTocenter);\n\n math_vector3d center = new math_vector3d(orgin2d.x,orgin2d.y,0);\n return center;\n }", "private GPoint findCenterCorner(double r, double x, double y) {\n\t\tdouble cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\tdouble cornerY = lastClick.getY() - r;\n\t\tGPoint point = new GPoint(cornerX,cornerY);\n\t\treturn point;\n\t}", "protected Point getCenter(ArrayList<Unit> units) {\n\t\tint x = 0, y = 0;\n\t\t\n\t\tif(units.size() >= 1) {\n\t\t\tfor(Unit unit: units) {\n\t\t\t\tx += unit.getX();\n\t\t\t\ty += unit.getY();\n\t\t\t}\n\t\t\tx = x / units.size();\n\t\t\ty = y / units.size();\n\t\t}\n\t\treturn new Point(x,y);\n\t}", "public double getCenter() {\n return 0.5 * (lo + hi);\n }", "private void splitIntoRoots() {\n\t\tArrayList<ArrayList<Coord>> circ = findCircles();\n\t\tcombinePastRoots(circ);\n\t}", "private double findCenterRadius(double x, double y) {\n\t\tdouble dX = Math.abs(lastClick.getX() - x);\n\t\tdouble dY = Math.abs(lastClick.getY() - y);\n\t\tdouble dSquared = Math.pow(dX, 2) + Math.pow(dY, 2);\n\t\tdouble r = Math.sqrt(dSquared) / 2.0;\n\t\treturn r;\n\t}", "public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}", "public Point centeroid ()\r\n {\r\n return new Point ((v1.getX()+v2.getX()+v3.getX())/3,(v1.getY()+v2.getY()+v3.getY())/3);\r\n }", "public GJPoint2D center();", "protected void calculateMinMaxCenterPoint() {\n\t\tfinal ImagePlus imp = c.getImage();\n\t\tfinal int w = imp.getWidth(), h = imp.getHeight();\n\t\tfinal int d = imp.getStackSize();\n\t\tfinal Calibration cal = imp.getCalibration();\n\t\tmin = new Point3d();\n\t\tmax = new Point3d();\n\t\tcenter = new Point3d();\n\t\tmin.x = w * (float) cal.pixelHeight;\n\t\tmin.y = h * (float) cal.pixelHeight;\n\t\tmin.z = d * (float) cal.pixelDepth;\n\t\tmax.x = 0;\n\t\tmax.y = 0;\n\t\tmax.z = 0;\n\n\t\tfloat vol = 0;\n\t\tfor (int zi = 0; zi < d; zi++) {\n\t\t\tfinal float z = zi * (float) cal.pixelDepth;\n\t\t\tfinal ImageProcessor ip = imp.getStack().getProcessor(zi + 1);\n\n\t\t\tfinal int wh = w * h;\n\t\t\tfor (int i = 0; i < wh; i++) {\n\t\t\t\tfinal float v = ip.getf(i);\n\t\t\t\tif (v == 0) continue;\n\t\t\t\tvol += v;\n\t\t\t\tfinal float x = (i % w) * (float) cal.pixelWidth;\n\t\t\t\tfinal float y = (i / w) * (float) cal.pixelHeight;\n\t\t\t\tif (x < min.x) min.x = x;\n\t\t\t\tif (y < min.y) min.y = y;\n\t\t\t\tif (z < min.z) min.z = z;\n\t\t\t\tif (x > max.x) max.x = x;\n\t\t\t\tif (y > max.y) max.y = y;\n\t\t\t\tif (z > max.z) max.z = z;\n\t\t\t\tcenter.x += v * x;\n\t\t\t\tcenter.y += v * y;\n\t\t\t\tcenter.z += v * z;\n\t\t\t}\n\t\t}\n\t\tcenter.x /= vol;\n\t\tcenter.y /= vol;\n\t\tcenter.z /= vol;\n\n\t\tvolume = (float) (vol * cal.pixelWidth * cal.pixelHeight * cal.pixelDepth);\n\n\t}", "public Vector2D getArithmeticCenter()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tVector2D center = Vector2D.ZERO;\n\n\t\tfor (Unit unit : this)\n\t\t{\n\t\t\tcenter = center.add(Vector2DMath.toVector(unit.getPosition()));\n\t\t}\n\t\tcenter = center.scale(1.0f / size());\n\n\t\treturn center;\n\t}", "public Point getCenter() {\n \treturn new Point(x+width/2,y+height/2);\n }", "public final float exactCenterX() {\n return (left + right) * 0.5f;\n }", "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 void calculateCentroids(float x, float y) {\n\t\t\tpCX = pCY = qCX = qCY = 0;\n\t\t\tfloat total = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tfloat w = w(x, y, pX[i], pY[i]);\n\t\t\t\ttotal += w;\n\t\t\t\tpCX += w * pX[i];\n\t\t\t\tpCY += w * pY[i];\n\t\t\t\tqCX += w * qX[i];\n\t\t\t\tqCY += w * qY[i];\n\t\t\t}\n\t\t\tpCX /= total;\n\t\t\tpCY /= total;\n\t\t\tqCX /= total;\n\t\t\tqCY /= total;\n\t\t}", "public Coordinate getCircle();", "private void generateCircleCoords() {\n circleCoords = new float[(CIRCLE_PRECISION + 2) * COORDS_PER_VERTEX];\n\n circleCoords[0] = 0.0f; // origin x;\n circleCoords[1] = 0.0f; // origin y;\n circleCoords[2] = 0.0f; // origin z;\n\n float radRange = mMaxRads - mMinRads;\n float radsPerTriangle = (radRange / (float)CIRCLE_PRECISION);\n\n for (int x = 0; x < CIRCLE_PRECISION; x++) {\n // Shift up by 1 coordinate position since the 0 position is the origin\n circleCoords[(x + 1) * COORDS_PER_VERTEX] = radius * (float)Math.cos(mMinRads + (radsPerTriangle * (float)x)); // point x-coord\n circleCoords[((x + 1) * COORDS_PER_VERTEX) + 1] = radius * (float)Math.sin(mMinRads + (radsPerTriangle * (float) x)); // point y-coord\n circleCoords[((x + 1) * COORDS_PER_VERTEX) + 2] = 0.0f; // point z-coord\n }\n\n // the last set of coords should match the maxrads exactly\n // Shifted up by 1 since 0,1,2 is the origin\n circleCoords[(CIRCLE_PRECISION + 1) * COORDS_PER_VERTEX] = radius * (float)Math.cos(mMaxRads); // point x-coord\n circleCoords[((CIRCLE_PRECISION + 1) * COORDS_PER_VERTEX) + 1] = radius * (float)Math.sin(mMaxRads); // point y-coord\n circleCoords[((CIRCLE_PRECISION + 1) * COORDS_PER_VERTEX) + 2] = 0.0f; // point z-coord\n }", "public Circle(double r, Point center) {\n this.r = r;\n this.center = center;\n }", "private double centerX() {\n return (piece.boundingBox().getWidth() % 2) / 2.0;\n }", "static boolean betterCenter(double r,double g, double b, float center[],float best_center[]){\n\n float distance = (float) ((r-center[0])*(r-center[0]) + (g-center[1])*(g-center[1]) + (b-center[2])*(b-center[2]));\n\n float distance_best = (float) ((r-best_center[0])*(r-best_center[0]) + (g-best_center[1])*(g-best_center[1]) + (b-best_center[2])*(b-best_center[2]));\n\n\n if(distance < distance_best)\n return true;\n else\n return false;\n\n\n }", "public Coordinate getCenter() {\n return center;\n }", "public final Vector getCenter() {\n\t\treturn (center == null) ? computeCenter() : center;\n\t}", "public Point2D centerOfMass() \n {\n double cx = 0, cy = 0;\n double area = areaUnsigned();\n double factor = 0;\n for (Line2D line : lines) \n {\n factor = line.getP1().getX() * line.getP2().getY() - line.getP2().getX() * line.getP1().getY();\n cx += (line.getP1().getX() + line.getP2().getX()) * factor;\n cy += (line.getP1().getY() + line.getP2().getY()) * factor;\n }\n area *= 6.0d;\n factor = 1 / area;\n cx *= factor;\n cy *= factor;\n return new Point2D.Double(cx, cy);\n }", "private static Coord findCoordinate(Coord p0, Coord p1, Coord p2, double r0, double r1, double r2){\r\n\r\n\tdouble x0, y0, x1, y1, x2, y2;\r\n\tx0 = p0.getX(); y0 = p0.getY();\r\n\tx1 = p1.getX(); y1 = p1.getY();\r\n\tx2 = p2.getX(); y2 = p2.getY();\r\n\t//core.Debug.p(\"x0:\" + x0 + \",y0:\" + y0 + \",r0:\" + r0);\r\n\t//core.Debug.p(\"x1:\" + x1 + \",y1:\" + y1 + \",r1:\" + r1);\r\n\t//core.Debug.p(\"x2:\" + x2 + \",y2:\" + y2 + \",r2:\" + r2);\r\n\tdouble a, dx, dy, d, h, rx, ry;\r\n\tdouble point2_x, point2_y;\r\n\r\n\t/* dx and dy are the vertical and horizontal distances between\r\n\t * the circle centers.\r\n\t */\t\r\n\tdx = x1 - x0;\r\n\tdy = y1 - y0;\r\n\r\n\t/* Determine the straight-line distance between the centers. */\r\n\td = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t/* Check for solvability. */\r\n\tif (d > (r0 + r1)){\r\n\t\t/* no solution. circles do not intersect. */\r\n\t\t//core.Debug.p(\"no solution1\");\r\n\t\treturn null;\r\n\t}\r\n\tif (d < Math.abs(r0 - r1)){\r\n\t\t/* no solution. one circle is contained in the other */\r\n\t\t//core.Debug.p(\"no solution2\");\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/* 'point 2' is the point where the line through the circle\r\n\t * intersection points crosses the line between the circle\r\n\t * centers.\r\n\t */\r\n\r\n\t/* Determine the distance from point 0 to point 2. */\r\n\ta = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ;\r\n\r\n\t/* Determine the coordinates of point 2. */\r\n\tpoint2_x = x0 + (dx * a/d);\r\n\tpoint2_y = y0 + (dy * a/d);\r\n\r\n\t/* Determine the distance from point 2 to either of the\r\n\t * intersection points.\r\n\t */\t\r\n\th = Math.sqrt((r0*r0) - (a*a));\r\n\r\n\t/* Now determine the offsets of the intersection points from\r\n\t * point 2.\r\n\t */\r\n\trx = -dy * (h/d);\r\n\try = dx * (h/d);\r\n\r\n\t/* Determine the absolute intersection points. */\r\n\tdouble intersectionPoint1_x = point2_x + rx;\r\n\tdouble intersectionPoint2_x = point2_x - rx;\r\n\tdouble intersectionPoint1_y = point2_y + ry;\r\n\tdouble intersectionPoint2_y = point2_y - ry;\r\n\r\n\t/* Lets determine if circle 3 intersects at either of the above intersection points. */\r\n\tdx = intersectionPoint1_x - x2;\r\n\tdy = intersectionPoint1_y - y2;\r\n\tdouble d1 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\tdx = intersectionPoint2_x - x2;\r\n\tdy = intersectionPoint2_y - y2;\r\n\tdouble d2 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t//core.Debug.p(\"d1: \" + d1 + \", d2: \" + d2 + \", r2: \" + r2);\r\n\t//core.Debug.p(\"diff1: \" + Math.abs(d1-r2));\r\n\t//core.Debug.p(\"point1: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t//core.Debug.p(\"diff2: \" + Math.abs(d2-r2));\r\n\t//core.Debug.p(\"point2: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\r\n\r\n\tif(Math.abs(d1 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t\treturn new Coord(intersectionPoint1_x, intersectionPoint1_y);\r\n\t}\r\n\telse if(Math.abs(d2 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\t\treturn new Coord(intersectionPoint2_x, intersectionPoint2_y);}\r\n\telse {\r\n\t\t//core.Debug.p(\"no intersection\");\r\n\t\treturn null;\r\n\t}\r\n}", "private void drawCenter(double x, double y) {\n\t\tdouble r = findCenterRadius(x, y);\n\t\tGPoint corner = findCenterCorner(r, x ,y);\n\t\tcenterCircle = new GOval(2*r,2*r);\n\t\tadd(centerCircle, corner);\n\t\t//GPoint center = new GPoint(corner.getX() - r, corner.getY() - r );\n\t}", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "public static boolean containsCenter(Circle x, Circle y){\n\n if(Math.sqrt(Math.pow(y.getCenter()[0]-x.getCenter()[0], 2)+Math.pow(y.getCenter()[1]-x.getCenter()[1], 2))<=x.getRadius()){\n return true;\n }\n else{\n return false;\n }\n }", "public LatLng getCentrePos() {\n double lat = 0;\n double lon = 0;\n for (int i=0; i<newHazards.size(); i++) {\n lat += frags.get(i).getHazard().getLatitude();\n lon += frags.get(i).getHazard().getLongitude();\n }\n return new LatLng(lat / newHazards.size(), lon / newHazards.size());\n }", "public Point getCentrePoint()\n\t\t{\n\t\t\tif(shape.equals(\"circle\") || shape.equals(\"ellipse\"))\n\t\t\t\treturn new Point((int)((Ellipse2D)obj).getCenterX(),(int)((Ellipse2D)obj).getCenterY());\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tint xtot = 0;\n\t\t\t\tint ytot = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i % 2) == 0)\n\t\t\t\t\t\txtot += coords[i];\n\t\t\t\t\telse\n\t\t\t\t\t\tytot += coords[i];\n\t\t\t\t}\n\t\t\t\treturn new Point((xtot*2)/coords.length,(ytot*2)/coords.length);\n\t\t\t}else\n\t\t\t{\n\t\t\t\treturn new Point((int)((Rectangle)obj).getCenterX(),(int)((Rectangle)obj).getCenterY());\n\t\t\t}\n\t\t}", "public Vector2f getCenter(Transform t) {\n\t\treturn new Vector2f(center.x * t.scale.x, center.y * t.scale.y).add(t.position);\n\t}", "@Override\r\n\tpublic List<GeoPoint> findIntersections(Ray ray) {\r\n\t\tList<GeoPoint> list = new ArrayList<GeoPoint>();\r\n\t\tVector rayDirection = ray.getDirection();\r\n\t\tPoint3D rayPoint = ray.getPOO();\r\n\r\n\t\t// case centerPoint same as the RayPoint\r\n\t\tif (centerPoint.equals(rayPoint)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(radius))));\r\n\t\t\treturn list;\r\n\t\t}\r\n\r\n\t\t// u = centerPoint - rayPoint\r\n\t\tVector u = centerPoint.subtract(rayPoint);\r\n\t\t// tm = u * rayDirection\r\n\t\tdouble tm = rayDirection.dotProduct(u);\r\n\t\t// distance = sqrt(|u|^2 - tm^2)\r\n\t\tdouble d = Math.sqrt(u.dotProduct(u) - tm * tm);\r\n\t\t// case the distance is bigger than radius no intersections\r\n\t\tif (d > radius)\r\n\t\t\treturn list;\r\n\r\n\t\t// th = sqrt(R^2 - d^2)\r\n\t\tdouble th = Math.sqrt(radius * radius - d * d);\r\n\r\n\t\tdouble t1 = tm - th;\r\n\t\tdouble t2 = tm + th;\r\n\r\n\t\tif (Util.isZero(t1) || Util.isZero(t2)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint));\r\n\t\t}\r\n\t\tif (Util.isZero(th)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(tm))));\r\n\t\t} else {\r\n\t\t\tif (t1 > 0 && !Util.isZero(t1))// one\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t1))));\r\n\t\t\tif (t2 > 0 && !Util.isZero(t2)) {// two\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t2))));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}", "Cell Center(){\n double sum_x = 0;\r\n double sum_y = 0;\r\n \r\n for(int i = 0; i < this.edgeCells.size(); i++){\r\n sum_x = this.edgeCells.get(i).x;\r\n sum_y = this.edgeCells.get(i).y;\r\n }\r\n \r\n for(int i = 0; i < this.seedCells.size(); i++){\r\n sum_x = this.seedCells.get(i).x;\r\n sum_y = this.seedCells.get(i).y;\r\n }\r\n \r\n sum_x = sum_x/(this.edgeCells.size() + this.seedCells.size()); //center of weight\r\n sum_y = sum_y/(this.edgeCells.size() + this.seedCells.size()); //\r\n \r\n center = new Cell((int)sum_x, (int)sum_y, this.edgeCells.get(0).z, this.edgeCells.get(0).id);\r\n \r\n \r\n return center;\r\n }", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "public Point2D getBombTileCenterPosition(GameObject node) {\n double x;\n double y;\n\n List<Rectangle> intersectingTiles = new ArrayList<>();\n for (Rectangle2D r : gameMatrix) {\n Rectangle currentMatrixTile = new Rectangle(r.getMinX(), r.getMinY(), r.getWidth(), r.getHeight());\n\n // check if rectangle of game matrix intersects with player bounds and harvest these in new array\n if (currentMatrixTile.getBoundsInParent().intersects(node.getBoundsInParent())) {\n intersectingTiles.add(currentMatrixTile);\n }\n }\n // if player bounds are completely in one tile\n if (intersectingTiles.size() == 1) {\n Rectangle r = intersectingTiles.get(0);\n x = r.getX() + (r.getWidth() / 2);\n y = r.getY() + (r.getHeight() / 2);\n return new Point2D(x, y);\n }\n // if player bounds are in more than one tile\n else {\n for (int i = 0; i < intersectingTiles.size(); i++) {\n Point2D playerCenterPosition = new Point2D(node.getX() + (node.getFitWidth() / 2), node.getY() + (node.getFitHeight() / 2));\n Rectangle currentTile = intersectingTiles.get(i);\n\n // the center position of the player should only exist in one tile at a time ...\n if (currentTile.contains(playerCenterPosition)) {\n return new Point2D(currentTile.getX() + (currentTile.getWidth() / 2), currentTile.getY() + (currentTile.getHeight() / 2));\n }\n }\n // a mystery\n return null;\n }\n }", "private static Point areaCentre() {\r\n\t\tvar centreLon = (lonLB + lonUB)/2;\r\n\t\tvar centreLat = (latLB + latUB)/2;\r\n\t\treturn Point.fromLngLat(centreLon, centreLat);\r\n\t}", "void setCenter() {\n\t\tLine line02 = new Line(myParent, new PVector(), new PVector());\n\t\tLine line13 = new Line(myParent, new PVector(), new PVector());\n\t\tline02.set(point[0].position, point[2].position);\n\t\tline13.set(point[1].position, point[3].position);\n\t\tif (line02.intersects_at(line13) != null) // if two points are on each\n\t\t\t\t\t\t\t\t\t\t\t\t\t// other\n\t\t\tcenter.set(line02.intersects_at(line13));\n\t}", "public void addExcludeCircle(MapLocation center, float radius) {\n if (first == null) {\n return;\n }\n\n\n\n // If the first point is excluded, rotate until first point is not excluded\n Boundary current = first;\n Boundary prev = null;\n boolean firstIter = true;\n while (current != null) {\n // On first iter, test first point is valid\n if (firstIter) {\n if (current.begin.distanceTo(center) <= radius + bodyRadius) {\n // first point is excluded\n // TODO\n }\n }\n // Now, first point is valid\n\n switch (current.type) {\n case ARC: {\n ArcBoundary currentArc = (ArcBoundary)current;\n // get intersection points\n MapLocation[] intersections = getCircleIntersections(currentArc.begin, strideRadius,\n center, bodyRadius + radius);\n // Select intersection points on the current arc, in order\n MapLocation[] selectedIntersections = selectArcIntersections(currentArc, intersections);\n // Test each segment\n MapLocation segmentBegin = currentArc.begin;\n for (MapLocation segmentEnd : selectedIntersections) {\n MapLocation segmentMiddle = getArcSegmentMiddle(currentArc, segmentBegin, segmentEnd);\n if (segmentMiddle.distanceTo(center) <= radius + bodyRadius) {\n // this segment intersects\n }\n\n segmentBegin = segmentEnd;\n }\n\n }\n break;\n case LINE: {\n\n }\n break;\n }\n\n prev = current;\n current = current.next;\n firstIter = false;\n }\n }", "private void solveIntersectionPoints() {\n\t\tRadialGauge gauge = getMetricsPath().getBody().getGauge();\n\n\t\t// define first circle which is gauge outline circle\n\t\tx0 = gauge.getCenterDevice().getX();\n\t\ty0 = gauge.getCenterDevice().getY();\n\t\tr0 = gauge.getRadius();\n\t\tarc0 = new Arc2D.Double(x0 - r0, y0 - r0, 2 * r0, 2 * r0, 0, 360, Arc2D.OPEN);\n\n\t\t// define the second circle with given parameters\n\t\tx1 = x0 + polarRadius * Math.cos(Math.toRadians(polarDegree));\n\t\ty1 = y0 - polarRadius * Math.sin(Math.toRadians(polarDegree));\n\t\tr1 = radius;\n\n\t\tarc1 = new Arc2D.Double(x1 - r1, y1 - r1, 2 * r1, 2 * r1, 0, 360, Arc2D.OPEN);\n\n\t\tif (polarDegree != 0 && polarDegree != 180) {\n\t\t\t// Ax²+Bx+B = 0\n\t\t\tdouble N = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\n\t\t\tdouble A = Math.pow((x0 - x1) / (y0 - y1), 2) + 1;\n\t\t\tdouble B = 2 * y0 * (x0 - x1) / (y0 - y1) - 2 * N * (x0 - x1) / (y0 - y1) - 2 * x0;\n\t\t\tdouble C = x0 * x0 + y0 * y0 + N * N - r0 * r0 - 2 * y0 * N;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = (-B - delta) / (2 * A);\n\t\t\t\tdouble p1y = N - p1x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = (-B + delta) / (2 * A);\n\t\t\t\tdouble p2y = N - p2x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t} else if (polarDegree == 0 || polarDegree == 180) {\n\t\t\t// polar degree = 0|180 -> y0=y1\n\t\t\t// Ay²+By + C = 0;\n\t\t\tdouble x = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0) / (2 * (x0 - x1));\n\t\t\tdouble A = 1;\n\t\t\tdouble B = -2 * y1;\n\t\t\tdouble C = x1 * x1 + x * x - 2 * x1 * x + y1 * y1 - r1 * r1;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = x;\n\t\t\t\tdouble p1y = (-B - delta) / 2 * A;\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = x;\n\t\t\t\tdouble p2y = (-B + delta) / 2 * A;\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t}\n\t}", "boolean _insideCirc(PVector[] inPts, PVector center, float r) {\n \n for(int i = 0; i < inPts.length; i++){\n // direction of angular relationship to any side must match\n // direction of relationship to opposite side\n if(PVector.dist(inPts[i],center) > r) return false;\n }\n return true;\n }", "private double[] getMeanCenter(){\n double[] meanXY = new double[2];\n float[] trans = getTranslationVector(center.getX(),center.getY(),BITMAP_SIZE,BITMAP_SIZE,CONSTANT);\n // Plot points\n for (MeasurementService.DataPoint p: list) {\n meanXY[0] += (p.getX()*CONSTANT)+trans[0];\n meanXY[1] += (p.getY()*CONSTANT)+trans[1];\n }\n\n meanXY[0] = meanXY[0] / list.size();\n meanXY[1] = meanXY[1] / list.size();\n return meanXY;\n }", "public Point getCenter() {\n return center;\n }", "public Vector getCenters(){\n\treturn synchroCenters;\n }", "@Override\n public List<GeoPoint> findGeoIntersections(Ray ray , double maxDistance) {\n Point3D P0 = ray.getP0();\n Vector v = ray.getDir();\n\n if (P0.equals(_center)) {\n return List.of(new GeoPoint(this,_center.add(v.scale(_radius))));\n }\n\n Vector U = _center.subtract(P0);\n\n double tm = alignZero(v.dotProduct(U));\n double d = alignZero(Math.sqrt(U.lengthSquared() - tm * tm));\n\n // no intersections : the ray direction is above the sphere\n if (d >= _radius) {\n return null;\n }\n\n double th = alignZero(Math.sqrt(_radius * _radius - d * d));\n double t1 = alignZero(tm - th);\n double t2 = alignZero(tm + th);\n boolean validT1=alignZero(t1 - maxDistance ) <=0;\n boolean validT2=alignZero( t2 - maxDistance )<=0;\n if (t1>0 && t2>0 && validT1 && validT2) {\n Point3D P1 =ray.getPoint(t1);\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P1),new GeoPoint(this, P2));\n }\n if (t1>0 && validT1){\n Point3D P1 =ray.getPoint(t1);\n return List.of(new GeoPoint(this,P1));\n }\n if (t2>0 && validT2) {\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P2));\n }\n return null;\n }", "public Point getCenterPx(){\n\t\tint centerX = images[0].getWidth()/2;\n\t\tint centerY = images[0].getHeight()/2;\n\t\tPoint centerPx = new Point(centerX,centerY);\n\t\treturn centerPx;\n\t}", "public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}", "PVector _getCenter() {\n PVector cen = new PVector(_hitboxCenter.x, _hitboxCenter.y);\n cen.rotate(_rotVector.heading() - _front);\n cen.x += _x;\n cen.y += _y;\n return cen;\n }", "boolean _circSeg(PVector center, float r, PVector a, PVector b) {\n PVector ab = PVector.sub(b,a);\n PVector abPerp = (new PVector(-ab.y, ab.x)).normalize().mult(r);\n \n PVector[] limits = new PVector[]{\n PVector.add(a,abPerp), // move perpendicular to the segment by\n PVector.sub(a,abPerp), // distance r from each of the endpoints,\n PVector.sub(b,abPerp), // forming a bounding rectangle\n PVector.add(b,abPerp)\n };\n \n return _ptPoly(center, limits);\n }", "public abstract double getBoundingCircleRadius();", "public Coord3d getCenter() {\n return new Coord3d((xmin + xmax) / 2, (ymin + ymax) / 2, (zmin + zmax) / 2);\n }", "public Point getCenter() {\r\n\t\treturn center;\r\n\t}", "public EastNorth getCenter() {\n\t\treturn null;\n\t}", "public Point getCenter() {\r\n return this.center;\r\n }", "public double[] getCenter() {\n return this.center;\n }", "private ArrayList<Point> calculateMidPoints() {\n ArrayList<Point> midPoints = new ArrayList<>();\n boolean isFirst = true; // Holds weather or not both points have been found yet.\n\n // Iterate over every point in the left and right lanes.\n for (int idx = 0; idx < leftLine.getLanePoints().size(); idx++) {\n Point leftPoint = leftLine.getLanePoints().get(idx); // The left point at the element idx.\n Point rightPoint = rightLine.getLanePoints().get(idx); // The right point at the element idx.\n int yValue = getCameraHeight() - (START_SEARCH + idx); // The y value of the left and right points.\n\n // If neither line is found, add a point at cameraWidth / 2, yValue\n if (leftPoint.isEmpty() && rightPoint.isEmpty()) {\n if (USE_NO_LANE_DETECTION) {\n midPoints.add(new Point(getCameraWidth() / 2, yValue));\n }\n // If Ony the right Point is found, add a point at the x rightPoint - road width / 2.\n } else if (leftPoint.isEmpty()) {\n midPoints.add(new Point(rightPoint.getX() - (calculateRoadWidth(yValue) / 2), yValue));\n // If Only the left Point is found, add a point at the x leftPoint + road width / 2.\n } else if (rightPoint.isEmpty()) {\n midPoints.add(new Point(leftPoint.getX() + (calculateRoadWidth(yValue) / 2), yValue));\n // If both lines are found, average the two lines.\n } else {\n midPoints.add(new Point((int) Math.round((leftPoint.getX() + rightPoint.getX()) / 2.0), yValue));\n // Set x1 and y1 to be the first Points to have lines on both sides.\n if (isFirst) {\n calcSlopePoint1.setX(Math.abs(leftPoint.getX() - rightPoint.getX()));\n calcSlopePoint1.setY(yValue);\n isFirst = false;\n // set x2 and y2 to be the last points to have lines on both sides.\n } else {\n calcSlopePoint2.setX(Math.abs(leftPoint.getX() - rightPoint.getX()));\n calcSlopePoint2.setY(yValue);\n }\n }\n }\n\n if (isReliable(calcSlopePoint1, calcSlopePoint2)) {\n slope = calculateRoadSlope(calcSlopePoint1, calcSlopePoint2);\n }\n return midPoints;\n }", "private static void calculateRadiusforCircle()\r\n\t{\r\n\t\tsensorRadius = Math.sqrt((double) averageDensity / (double) numberOfSensors);\r\n\t\tsensorRadius = sensorRadius * unitSizeForCircle;\r\n\t\tnoOfCellRowsCoulmns = (int) (unitSizeForSquare / sensorRadius);\r\n\t\tcell = new Cell[noOfCellRowsCoulmns + 2][noOfCellRowsCoulmns + 3];\r\n\t\tinitializeCell(noOfCellRowsCoulmns + 2, noOfCellRowsCoulmns + 3);\r\n\t}", "public void setCentroids(int n, double lower, double upper);", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "private GPoint findOuterCorner(double r) {\n\t\trIsNegative = false;\n\t\tif (r < 0) rIsNegative = true;\n\t\t//double cornerX = (lastClick.getX() + x)/2.0 - r;\n\t\t//double cornerY = lastClick.getY() - r;\n\t\t//GPoint point = new GPoint(cornerX,cornerY);\n\t\t//return point;\n\t\t//double cornerX = \n\t\tdouble centerX = (centerCircle.getWidth() / 2.0) + centerCircle.getX();\n\t\tdouble centerY = (centerCircle.getHeight() / 2.0) + centerCircle.getY();\n\t\tdouble x;\n\t\tif (!rIsNegative) {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0);\n\t\t} else {\n\t\t\tx = centerX + (centerCircle.getWidth() / 2.0) + r*2.0;\n\t\t}\n\t\tdouble y = centerY - Math.abs(r);\n\t\tGPoint point = new GPoint(x,y);\n\t\treturn point;\n\t}", "public Vector2 getCenter() {\n\t\treturn new Vector2(position.x + size / 4f, position.y + size / 4f);\n\t}", "public Ball(Point center, int r) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n }", "public ImageWorkSpacePt findCurrentCenterPoint() {\n WebPlot plot= getPrimaryPlot();\n\n\n int screenW= plot.getScreenWidth();\n int screenH= plot.getScreenHeight();\n int sw= getScrollWidth();\n int sh= getScrollHeight();\n int cX;\n int cY;\n if (screenW<sw) {\n cX= screenW/2;\n }\n else {\n int scrollX = getScrollX();\n cX= scrollX+sw/2- wcsMarginX;\n }\n\n if (screenH<sh) {\n cY= screenH/2;\n }\n else {\n int scrollY = getScrollY();\n cY= scrollY+sh/2- wcsMarginY;\n }\n\n ScreenPt pt= new ScreenPt(cX,cY);\n\n return plot.getImageWorkSpaceCoords(pt);\n }", "public double getCenterX() { return centerX.get(); \t}", "private void positionCircles_()\n\t{\n\t\tIterator<PVCircle> it = circles.iterator();\n\t\tint indx = 0;\n\t\tRandom rng = new Random();\n\t\twhile (it.hasNext())\n\t\t{\t\n\t\t\tPVCircle currCircle = it.next();\n\t\t\t//currCircle.setRadius(MAX_RADIUS * (double) currCircle.getWeight() / totalWeight);\n\t\t\tboolean collision = true;\n\t\t\tint loopCount = 0;\n\t\t\twhile(collision && loopCount < 100)\n\t\t\t{\n\t\t\t\tcurrCircle.setPosition(res_x * rng.nextDouble(), res_y * rng.nextDouble());\n\t\t\t\tcollision = checkCollision(currCircle, indx, indx);\n\t\t\t\tloopCount++;\n\t\t\t}\n\t\t\tif(loopCount == 100)\n\t\t\t{\n\t\t\t\t//Log.d(\"position\", \"Circle too big to fit\");\n\t\t\t\tit.remove();\n\t\t\t}\n\t\t\telse indx++;\n\t\t}\n\t}", "static boolean pointInCircumcircle2(PointDouble a, PointDouble b, PointDouble c, PointDouble p) {\n return ((a.x - p.x) * (b.y - p.y) * ((c.x - p.x) * (c.x - p.x) + (c.y - p.y) * (c.y - p.y)) +\n (a.y - p.y) * ((b.x - p.x) * (b.x - p.x) + (b.y - p.y) * (b.y - p.y)) * (c.x - p.x) +\n ((a.x - p.x) * (a.x - p.x) + (a.y - p.y) * (a.y - p.y)) * (b.x - p.x) * (c.y - p.y) -\n ((a.x - p.x) * (a.x - p.x) + (a.y - p.y) * (a.y - p.y)) * (b.y - p.y) * (c.x - p.x) -\n (a.y - p.y) * (b.x - p.x) * ((c.x - p.x) * (c.x - p.x) + (c.y - p.y) * (c.y - p.y)) -\n (a.x - p.x) * ((b.x - p.x) * (b.x - p.x) + (b.y - p.y) * (b.y - p.y)) * (c.y - p.y)) > 0.0;\n }", "public Point getCenter() {\n return new Point((int) getCenterX(), (int) getCenterY());\n }", "public AlignmentPattern find() throws NotFoundException {\n AlignmentPattern handlePossibleCenter;\n AlignmentPattern handlePossibleCenter2;\n int i = this.startX;\n int i2 = this.height;\n int i3 = this.width + i;\n int i4 = this.startY + (i2 / 2);\n int[] iArr = new int[3];\n for (int i5 = 0; i5 < i2; i5++) {\n int i6 = ((i5 & 1) == 0 ? (i5 + 1) / 2 : -((i5 + 1) / 2)) + i4;\n iArr[0] = 0;\n iArr[1] = 0;\n iArr[2] = 0;\n int i7 = i;\n while (i7 < i3 && !this.image.get(i7, i6)) {\n i7++;\n }\n int i8 = 0;\n while (i7 < i3) {\n if (!this.image.get(i7, i6)) {\n if (i8 == 1) {\n i8++;\n }\n iArr[i8] = iArr[i8] + 1;\n } else if (i8 == 1) {\n iArr[1] = iArr[1] + 1;\n } else if (i8 != 2) {\n i8++;\n iArr[i8] = iArr[i8] + 1;\n } else if (foundPatternCross(iArr) && (handlePossibleCenter2 = handlePossibleCenter(iArr, i6, i7)) != null) {\n return handlePossibleCenter2;\n } else {\n iArr[0] = iArr[2];\n iArr[1] = 1;\n iArr[2] = 0;\n i8 = 1;\n }\n i7++;\n }\n if (foundPatternCross(iArr) && (handlePossibleCenter = handlePossibleCenter(iArr, i6, i3)) != null) {\n return handlePossibleCenter;\n }\n }\n if (!this.possibleCenters.isEmpty()) {\n return this.possibleCenters.get(0);\n }\n throw NotFoundException.getNotFoundInstance();\n }", "static List<PT> CircleCircleIntersection(PT a, PT b, double r, double R) {\r\n\t\tList<PT> ret = new ArrayList<PT>();\r\n\t\tdouble d = Math.sqrt(dist2(a, b));\r\n\t\tif (d > r + R || d + Math.min(r, R) < Math.max(r, R))\r\n\t\t\treturn ret;\r\n\t\tdouble x = (d * d - R * R + r * r) / (2 * d);\r\n\t\tdouble y = Math.sqrt(r * r - x * x);\r\n\t\tPT v = (b.subtract(a)).divide(d);\r\n\t\tret.add(a.add(v.multiply(x).add(RotateCCW90(v).multiply(y))));\r\n\t\tif (y > 0)\r\n\t\t\tret.add(a.add(v.multiply(x).subtract(RotateCCW90(v).multiply(y))));\r\n\t\treturn ret;\r\n\t}", "@Override\n public int octree_function(Object... obj) //public static int\n //o_sphere(\t\t\t/* compute intersection with sphere */\n //\tOBJECT.OBJREC so,\n //\tRAY r\n //)\n {\n OBJECT.OBJREC so = (OBJECT.OBJREC) obj[0];\n RAY r = (RAY) obj[1];\n double a, b, c;\t/* coefficients for quadratic equation */\n double[] root = new double[2];\t/* quadratic roots */\n int nroots;\n double t = 0;\n double[] ap;\n int i;\n\n if (so.oargs.nfargs != 4) {\n//\t\tobjerror(so, USER, \"bad # arguments\");\n }\n ap = so.oargs.farg;\n if (ap[3] < -FVECT.FTINY) {\n//\t\tobjerror(so, WARNING, \"negative radius\");\n so.otype = (short) (so.otype == OTYPES.OBJ_SPHERE\n ? OTYPES.OBJ_BUBBLE : OTYPES.OBJ_SPHERE);\n ap[3] = -ap[3];\n } else if (ap[3] <= FVECT.FTINY) {\n//\t\tobjerror(so, USER, \"zero radius\");\n }\n /*\n *\tWe compute the intersection by substituting into\n * the surface equation for the sphere. The resulting\n * quadratic equation in t is then solved for the\n * smallest positive root, which is our point of\n * intersection.\n *\tSince the ray is normalized, a should always be\n * one. We compute it here to prevent instability in the\n * intersection calculation.\n */\n /* compute quadratic coefficients */\n a = b = c = 0.0;\n for (i = 0; i < 3; i++) {\n a += r.rdir.data[i] * r.rdir.data[i];\n t = r.rorg.data[i] - ap[i];\n b += 2.0 * r.rdir.data[i] * t;\n c += t * t;\n }\n c -= ap[3] * ap[3];\n\n nroots = ZEROES.quadratic(root, a, b, c);\t/* solve quadratic */\n\n for (i = 0; i < nroots; i++) /* get smallest positive */ {\n if ((t = root[i]) > FVECT.FTINY) {\n break;\n }\n }\n if (i >= nroots) {\n return (0);\t\t\t/* no positive root */\n }\n\n if (t >= r.rot) {\n return (0);\t\t\t/* other is closer */\n }\n\n r.ro = so;\n r.rot = t;\n /* compute normal */\n a = ap[3];\n if (so.otype == OTYPES.OBJ_BUBBLE) {\n a = -a;\t\t\t/* reverse */\n }\n for (i = 0; i < 3; i++) {\n r.rop.data[i] = r.rorg.data[i] + r.rdir.data[i] * t;\n r.ron.data[i] = (r.rop.data[i] - ap[i]) / a;\n }\n r.rod = -FVECT.DOT(r.rdir, r.ron);\n r.rox = null;\n r.pert.data[0] = r.pert.data[1] = r.pert.data[2] = 0.0;\n r.uv[0] = r.uv[1] = 0.0;\n\n return (1);\t\t\t/* hit */\n }", "private boolean inCircle(int x, int y) {\n return Math.pow(x - xs, 2) + Math.pow(y - ys, 2) <= Math.pow(r, 2);\n }", "public Matrix_4_HSH getRelativeCoordinates(AddressIF currentNode,Collection<AddressIF > allNodes,\n\t\t\tCollection<AddressIF > landmarks, double[] lat) {\n\t\treturn null;\n\t}", "public Vector2 getCenter() {\n return center;\n }", "private Point middleLeft() {\n return this.topLeft.add(0, this.height / 2).asPoint();\n }", "private double calculateSpiralDistanceFromCentre(double phi)\n\t{\n\t\treturn a*Math.exp(b*phi);\n\t}", "private int getNearestCenterIndex(DataObject obj,\n\t\t\tArrayList<DataObject> centers) {\n\t\tint centerIndex = 0;\n\t\tdouble minDistance = Double.MAX_VALUE;\n\t\tdouble distance = 0.0;\n\t\tfor (int i = 0; i < centers.size(); i++) {\n\t\t\tDataObject dataObject = centers.get(i);\n\t\t\tdistance = getDistance(obj, dataObject);\n\t\t\tif (distance < minDistance) {\n\t\t\t\tminDistance = distance;\n\t\t\t\tcenterIndex = i;\n\t\t\t}\n\t\t}\n\t\treturn centerIndex;\n\t}", "public Point centroid() {\n\t\t\tdouble xSum = 0.0;\n\t\t\tdouble ySum = 0.0;\n\t\t\tfor(Point point : clusterPointsList){\n\t\t\t\txSum += point.x;\n\t\t\t\tySum += point.y;\n\t\t\t}\n\t\t\tPoint centroid = new Point();\n\t\t\tcentroid.x = xSum / size();\n\t\t\tcentroid.y = ySum / size();\n\t\t\t\n\t\t\treturn centroid;\n\t\t}", "public String toString()\r\n {\r\n return \"Center = \" + \"[\" + x + \", \" + y + \"]\" +\r\n \"; Radius = \" + radius;\r\n }", "public Circle(double radius, Point center) {\r\n this.radius = radius;\r\n this.center = center;\r\n }", "protected void checkForCircleEvent(Context context, Arc arc) {\n\t\tif (arc.left == null || arc.right == null)\n\t\t\treturn;\n\n\t\tfinal Point s1 = arc.left.left.site;\n\t\tfinal Point s2 = arc.site;\n\t\tfinal Point s3 = arc.right.right.site;\n\n\t\t// points must be counterclockwise\n\t\tif ((s2.x - s1.x) * (s3.y - s1.y) - (s2.y - s1.y) * (s3.x - s1.x) <= 0)\n\t\t\treturn;\n\n\t\t// calculate center of the sites' circumcircle\n\t\t// x and y are solved using Cramer's Rule\n\t\tfinal double x1 = s1.x, x2 = s2.x, x3 = s3.x;\n\t\tfinal double y1 = s1.y, y2 = s2.y, y3 = s3.y;\n\t\tfinal double\n\t\t\t\ta = x2 - x1,\n\t\t\t\tb = y2 - y1,\n\t\t\t\tc = x3 - x2,\n\t\t\t\td = y3 - y2,\n\t\t\t\tsqY2 = square(y2),\n\t\t\t\tsqX2 = square(x2),\n\t\t\t\te = (sqY2 - y1 * y1 + sqX2 - x1 * x1) / 2,\n\t\t\t\tf = (y3 * y3 - sqY2 + x3 * x3 - sqX2) / 2;\n\t\tfinal double matD = a * d - c * b;\n\t\tif (Math.abs(matD) < eps) // equation has no solution\n\t\t\treturn;\n\t\t// ( x, y ) is the circle's center\n\t\tfinal double x = (e * d - f * b) / matD;\n\t\tfinal double y = (a * f - c * e) / matD;\n\n\t\t// position of the circle event\n\t\tfinal double radius = Math.sqrt(square(x - x2) + square(y - y2));\n\t\tPoint eventPoint = new Point(x, y + radius);\n\n\t\t// add circle event to the queue\n\t\tCircleEvent event = new CircleEvent(arc, eventPoint);\n\t\tcontext.eventQueue.offer(event);\n\t\tarc.setCircleEvent(event);\n\t}", "public CirclePoint(int pnts, int x, int y, int r, double rotate, double rotatex, double rotatey, double scale) {\n this.pnts = pnts;\n int x_;\n int y_;\n pts = new Vector2D[pnts];\n for (int i = 0; i < pnts; i++) {\n // what is happening is the MU.rotate(), MU.rotatex(), MU.rotatey() and MU.zoom() each return a vector2D which are all multiplied together\n //to give a single point on a circle.\n //see MU.rotate(), MU.rotatex(), MU.rotatey() and MU.zoom() for details on the functions.\n //the x_ and y_ value will be a coordinate on the screen\n x_ = (int) (x + r * MU.rotate(i, pnts, rotate).getX() * MU.rotatex(rotatex).getX() * MU.rotatey(rotatey).getX() * MU.zoom(scale).getX());\n y_ = (int) (y + r * MU.rotate(i, pnts, rotate).getY() * MU.rotatex(rotatex).getY() * MU.rotatey(rotatey).getY() * MU.zoom(scale).getY());\n pts[i] = new Vector2D(x_, y_);\n }\n }", "final public Vector2 getCenter()\n\t{\n\t\treturn center;\n\t}", "public abstract Vector2 getCentreOfMass();", "public Coordinates midPoint(Coordinates a, Coordinates b);", "public int[] computeXY() \n\t\t//POST: FCTVAL == coordinates of the node in form [x, y]\n\t\t{\n\t\t\tint myPosition = getPositionInList(this);\t//get the position of the node\n\n\t\t\t//calculate angle in the circle based on position\n\t\t\tdouble angle = (((double) myPosition) * ((2*Math.PI) / (double) length)); \n\n\t\t\t//convert from polar to cartesian coordinates with radius 0.7; x = rcos(theta)\n\t\t\tdouble x = Math.cos(angle) * 0.7;\t\t//x = rcos(theta)\n\t\t\tdouble y = Math.sin(angle) * 0.7;\t\t//y = rsin(theta)\n\t\t\t\n\t\t\treturn ScaledPoint.getRealCoordinance(x, y);\n\t\t}", "public T findStartOfCircle() {\n \tNode<T> current = head;\n \tList<T> seen = new ArrayList<>();\n \twhile (true) {\n \t\tseen.add(current.val);\n \t\tif (seen.contains(current.next.val)) return current.next.val;\n \t\telse current = current.next;\n\t\t}\n }", "public float[] is_In_Ranges(int r, int g, int b){\n float cur_smallest_center_diff = -1;\n float cur_center_diff;\n float[] cur_centers = {-1.0f,-1.0f,-1.0f}; // 0 = red, 1 = green, 2 = blue\n for(Range cur_range: this.range_vector){\n if(cur_range.is_in_range(r, g, b)){\n cur_center_diff = ((r - cur_range.r_center)*(r - cur_range.r_center) + (g - cur_range.g_center)*(g - cur_range.g_center) + (b - cur_range.b_center)*(b - cur_range.b_center));\n if(cur_smallest_center_diff == -1) {\n cur_smallest_center_diff = cur_center_diff;\n cur_centers[0] = cur_range.r_center;\n cur_centers[1] = cur_range.g_center;\n cur_centers[2] = cur_range.b_center;\n }\n else if (cur_center_diff <= cur_smallest_center_diff) {\n cur_smallest_center_diff = cur_center_diff;\n cur_centers[0] = cur_range.r_center;\n cur_centers[1] = cur_range.g_center;\n cur_centers[2] = cur_range.b_center;\n }\n }\n }\n return cur_centers;\n }", "private void center(Complex[] f, int width, int height) {\r\n\r\n\t\tfor (int i = 0; i < f.length; i++) {\r\n\t\t\tint x = i % width;\r\n\t\t\tint y = i / width;\r\n\t\t\tf[i].setReal(f[i].getReal() * Math.pow(-1, (x + y)));\r\n\t\t}\r\n\r\n\t}", "public LatLng getCenter() {\n return center;\n }" ]
[ "0.6191341", "0.60311794", "0.581869", "0.58081573", "0.57914776", "0.5782435", "0.574351", "0.5672152", "0.5670244", "0.56288344", "0.5623766", "0.55980736", "0.55980736", "0.55276537", "0.55145556", "0.54829216", "0.5441213", "0.54297656", "0.53863466", "0.5373322", "0.5354726", "0.5347688", "0.5344803", "0.53217745", "0.5303583", "0.5297651", "0.5260681", "0.525398", "0.5251954", "0.5227476", "0.52084744", "0.5197828", "0.51952106", "0.5193556", "0.51934963", "0.51921505", "0.5187636", "0.51655304", "0.51430666", "0.5138426", "0.5127535", "0.51247704", "0.50957036", "0.50930256", "0.5082516", "0.50768816", "0.5073582", "0.5059637", "0.50284845", "0.50261086", "0.5020542", "0.500252", "0.49775857", "0.4974532", "0.49669656", "0.4951988", "0.49491644", "0.49482712", "0.4947384", "0.49394488", "0.49388024", "0.49267563", "0.49235147", "0.4918342", "0.49041185", "0.4882071", "0.48762828", "0.48586813", "0.4858106", "0.48560032", "0.4851873", "0.48510185", "0.48505062", "0.4844832", "0.4844016", "0.4835285", "0.4831044", "0.48295045", "0.4829126", "0.48257473", "0.48231205", "0.48191607", "0.4813225", "0.4809109", "0.48058668", "0.4798402", "0.47983015", "0.47944003", "0.47941422", "0.4790548", "0.47790548", "0.47777912", "0.4773107", "0.47719672", "0.47669286", "0.4765588", "0.4759579", "0.47568884", "0.47373447", "0.472846" ]
0.741321
0
Splits the customer set S into sets W and H, such that they are either divided by an axisaligned line or rectangle.
private void getPartition(PointList customers){ splitByQuadrant(customers); splitByLine(customers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<TessSeg> splitAtIsect(TessSeg s1)\r\n {\r\n if (!isLineHit(s1))\r\n {\r\n return null;\r\n }\r\n \r\n //Check for point-line hits\r\n double t00 = -1, t01 = -1, t10 = -1, t11 = -1;\r\n boolean pointMidlineHit = false;\r\n \r\n if (isPointOnLine(s1.c0))\r\n {\r\n double t = pointOnLineT(s1.c0);\r\n if (t > 0 && t < 1)\r\n {\r\n t00 = t;\r\n pointMidlineHit = true;\r\n }\r\n }\r\n \r\n if (isPointOnLine(s1.c1))\r\n {\r\n double t = pointOnLineT(s1.c1);\r\n if (t > 0 && t < 1)\r\n {\r\n t01 = t;\r\n pointMidlineHit = true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c0))\r\n {\r\n double t = s1.pointOnLineT(c0);\r\n if (t > 0 && t < 1)\r\n {\r\n t10 = t;\r\n pointMidlineHit = true;\r\n }\r\n }\r\n \r\n if (s1.isPointOnLine(c1))\r\n {\r\n double t = s1.pointOnLineT(c1);\r\n if (t > 0 && t < 1)\r\n {\r\n t11 = t;\r\n pointMidlineHit = true;\r\n }\r\n }\r\n\r\n if (pointMidlineHit)\r\n {\r\n ArrayList<TessSeg> list = new ArrayList<TessSeg>();\r\n if (t00 > 0 && t01 > 0)\r\n {\r\n if (t00 < t01)\r\n {\r\n list.add(new TessSeg(c0, s1.c0));\r\n list.add(new TessSeg(s1.c0, s1.c1));\r\n list.add(new TessSeg(s1.c1, c1));\r\n }\r\n else\r\n {\r\n list.add(new TessSeg(c0, s1.c1));\r\n list.add(new TessSeg(s1.c1, s1.c0));\r\n list.add(new TessSeg(s1.c0, c1));\r\n }\r\n }\r\n else if (t00 > 0)\r\n {\r\n list.add(new TessSeg(c0, s1.c0));\r\n list.add(new TessSeg(s1.c0, c1));\r\n }\r\n else if (t01 > 0)\r\n {\r\n list.add(new TessSeg(c0, s1.c1));\r\n list.add(new TessSeg(s1.c1, c1));\r\n }\r\n else\r\n {\r\n list.add(this);\r\n }\r\n \r\n if (t10 > 0 && t11 > 0)\r\n {\r\n if (t10 < t11)\r\n {\r\n list.add(new TessSeg(s1.c0, c0));\r\n list.add(new TessSeg(c0, c1));\r\n list.add(new TessSeg(c1, s1.c1));\r\n }\r\n else\r\n {\r\n list.add(new TessSeg(s1.c0, c1));\r\n list.add(new TessSeg(c1, c0));\r\n list.add(new TessSeg(c0, s1.c1));\r\n }\r\n }\r\n else if (t10 > 0)\r\n {\r\n list.add(new TessSeg(s1.c0, c0));\r\n list.add(new TessSeg(c0, s1.c1));\r\n }\r\n else if (t11 > 0)\r\n {\r\n list.add(new TessSeg(s1.c0, c1));\r\n list.add(new TessSeg(c1, s1.c1));\r\n }\r\n else\r\n {\r\n list.add(s1);\r\n }\r\n \r\n return list;\r\n }\r\n \r\n if (c0.equals(s1.c0) \r\n || c0.equals(s1.c1)\r\n || c1.equals(s1.c0)\r\n || c1.equals(s1.c1))\r\n {\r\n //No point-midline hits. If we only meet at verts,\r\n // do not split.\r\n return null;\r\n }\r\n \r\n// if (!isParallelTo(s1))\r\n {\r\n //Midpoint crossing for both segments.\r\n // Solve system of linear eqns\r\n double s0x0 = c0.x;\r\n double s0y0 = c0.y;\r\n double s0x1 = c1.x;\r\n double s0y1 = c1.y;\r\n double s1x0 = s1.c0.x;\r\n double s1y0 = s1.c0.y;\r\n double s1x1 = s1.c1.x;\r\n double s1y1 = s1.c1.y;\r\n\r\n double[] t = Math2DUtil.lineIsectFractions(\r\n s0x0, s0y0, s0x1 - s0x0, s0y1 - s0y0,\r\n s1x0, s1y0, s1x1 - s1x0, s1y1 - s1y0,\r\n null);\r\n\r\n if (t == null || t[0] < 0 || t[0] > 1 || t[1] < 0 || t[1] > 1)\r\n {\r\n Logger.getLogger(TessSeg.class.getName()).log(Level.WARNING, \r\n \"Line segments do not overlap\");\r\n }\r\n// assert (t[0] > 0 && t[0] < 1 && t[1] > 0 && t[1] < 1)\r\n// : \"Line segments do not overlap\";\r\n \r\n {\r\n ArrayList<TessSeg> list = new ArrayList<TessSeg>();\r\n \r\n Coord c = new Coord(\r\n (int)Math2DUtil.lerp(s1x0, s1x1, t[1]),\r\n (int)Math2DUtil.lerp(s1y0, s1y1, t[1]));\r\n\r\n list.add(new TessSeg(c0, c));\r\n list.add(new TessSeg(c, c1));\r\n list.add(new TessSeg(s1.c0, c));\r\n list.add(new TessSeg(c, s1.c1));\r\n \r\n return list;\r\n }\r\n }\r\n \r\n// return null;\r\n }", "private void generateSquarePartners() {\r\n\t\t// 2 copies of each end point,\r\n\t\t// which will be \"shifted\" to simulate the 2 adjacent squares\r\n\t\tint[] point1Shift1 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point1Shift2 = Arrays.copyOf(point1, 2);\r\n\t\tint[] point2Shift1 = Arrays.copyOf(point2, 2);\r\n\t\tint[] point2Shift2 = Arrays.copyOf(point2, 2);\r\n\t\t\r\n\t\t// used to indicate the orientation of the Line and which axis needs to be shifted\r\n\t\t// 0 == vertical, 1 == horizontal\r\n\t\tint index;\r\n\t\t\r\n\t\tif (point1[0] == point2[0]) {\r\n\t\t\tindex = 0;\r\n\t\t} else {\r\n\t\t\tindex = 1;\r\n\t\t}\r\n\t\t\r\n\t\tif (point1[index] - 1 > 0) {\r\n\t\t\t// square1Partners form the square to the left or above *this* Line\r\n\t\t\t// so shifted points get decremented\r\n\t\t\tpoint1Shift1[index] = point1[index] - 1;\r\n\t\t\tpoint2Shift1[index] = point2[index] - 1;\r\n\t\t\t\r\n\t\t\tsquare1Partners.add(new Line(point1, point1Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point1Shift1, point2Shift1));\r\n\t\t\tsquare1Partners.add(new Line(point2Shift1, point2));\r\n\t\t}\r\n\t\tif (point1[index] + 1 < boardSize) {\r\n\t\t\t// square2Partners form the square to the right or below *this* Line\r\n\t\t\t// so shifted points get incremented\r\n\t\t\tpoint1Shift2[index] = point1[index] + 1;\r\n\t\t\tpoint2Shift2[index] = point2[index] + 1;\r\n\t\t\t\r\n\t\t\tsquare2Partners.add(new Line(point1, point1Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point1Shift2, point2Shift2));\r\n\t\t\tsquare2Partners.add(new Line(point2Shift2, point2));\r\n\t\t}\r\n\t}", "private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}", "public Chunks chunkDivide(List<Integer> S, int c) {\n\t\tdouble chunks = Math.ceil(c/2.0);\n\t\tList<Integer> S1 = new ArrayList<Integer>();\n\t\tList<Integer> S2 = new ArrayList<Integer>();\n\t\tint j = 0;\n\t\twhile(j < chunks) {\t\n\t\t\twhile(comps(S.get(0), S.get(1)) && S.size() > 1 && (S.get(0) < S.get(1))){\t\t//comparisons\n\t\t\t\tS1.add(S.remove(0));\n\t\t\t}\n\t\t\tS1.add(S.remove(0));\n\t\t\tj++;\n\t\t} \n\t\twhile(S.size() != 0) {\n\t\t\tS2.add(S.remove(0));\n\t\t}\t\n\t\tChunks p = new Chunks(S1, S2);\n\t\treturn p;\n\t}", "public Collection<Space> split(ItemPlacement placement)\n {\n List<Space> spaces = new ArrayList<>();\n Dimension size = placement.getPlacement().getDimensions();\n Point position = placement.getPlacement().getPosition();\n spaces.add(new Space(\n new Dimension(\n this.dimensions.getWidth() - size.getWidth(),\n this.dimensions.getHeight(),\n this.dimensions.getLength()\n ),\n new Point(\n this.position.getX() + position.getX(),\n this.position.getY(),\n this.position.getZ()\n )\n ));\n spaces.add(new Space(\n new Dimension(\n this.dimensions.getWidth(),\n this.dimensions.getHeight() - size.getHeight(),\n this.dimensions.getLength()\n ),\n new Point(\n this.position.getX(),\n this.position.getY() + position.getY(),\n this.position.getZ()\n )\n ));\n spaces.add(new Space(\n new Dimension(\n this.dimensions.getWidth(),\n this.dimensions.getHeight(),\n this.dimensions.getLength() - size.getLength()\n ),\n new Point(\n this.position.getX(),\n this.position.getY(),\n this.position.getZ() + position.getZ()\n )\n ));\n spaces.add(new Space(\n new Dimension(\n this.dimensions.getWidth() + size.getWidth(),\n this.dimensions.getHeight(),\n this.dimensions.getLength() - size.getLength()\n ),\n new Point(\n this.position.getX() + position.getX(),\n this.position.getY(),\n this.position.getZ() + position.getZ()\n )\n ));\n\n spaces.removeIf(Space::isEmpty);\n return spaces;\n }", "public int[] findHorizontalSeam() {\n isHorizontalCall = true;\n checkTransposed();\n int[] seam = findVerticalSeam();\n isHorizontalCall = false;\n return seam;\n }", "public void createHSMapping(\n\t\t\tSpatialEntitySet sourceSESet) {\n\t\tthis.shMapping.forEach((se,hrHash)->{\n\t\t\tif (!hrHash.isEmpty()\n\t\t\t\t\t&&sourceSESet.seHash.containsKey(\n\t\t\t\t\t\t\tse.getLeft())) {\n\t\t\t\tfor (int hrIndex: hrHash) {\n\t\t\t\t\tif (!this.hsMapping.containsKey(hrIndex)) {\n\t\t\t\t\t\tthis.hsMapping.put(hrIndex, \n\t\t\t\t\t\t\t\tnew SpatialEntitySet());\n\t\t\t\t\t}\n\t\t\t\t\tthis.hsMapping.get(hrIndex).addSE(\n\t\t\t\t\t\t\tse.getLeft(), se.getRight());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t//process target se next\n\t\tthis.shMapping.forEach((se,hrHash)->{\n\t\t\tif (!hrHash.isEmpty()\n\t\t\t\t\t&&!sourceSESet.seHash.containsKey(\n\t\t\t\t\t\t\tse.getLeft())) {\n\t\t\t\tfor (int hrIndex: hrHash) {\n\t\t\t\t\tif (this.hsMapping.containsKey(hrIndex)) {\n\t\t\t\t\t\tthis.hsMapping.get(hrIndex).addSE(\n\t\t\t\t\t\t\t\tse.getLeft(), se.getRight());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public Set<Shape> entityShapesInternal(Set<String> superset) {\n Set<String> filtered = filterEntities(superset); Set<Shape> shapes = new HashSet<Shape>();\n\tIterator<String> it = filtered.iterator();\n\twhile (it.hasNext()) {\n\t String node_coord = entity_to_sxy.get(it.next());\n\t if (node_coord != null) {\n\t Shape shape = node_to_geom.get(node_coord);\n\t if (shape != null) shapes.add(shape);\n\t }\n\t}\n return shapes;\n }", "private void split(Map<Integer, SortedSet> invariants, Partition partition) {\n int nonEmptyInvariants = invariants.keySet().size();\n if (nonEmptyInvariants > 1) {\n List<Integer> invariantKeys = new ArrayList<Integer>();\n invariantKeys.addAll(invariants.keySet());\n partition.removeCell(currentBlockIndex);\n int k = currentBlockIndex;\n if (splitOrder == SplitOrder.REVERSE) {\n Collections.sort(invariantKeys);\n } else {\n Collections.sort(invariantKeys, Collections.reverseOrder());\n }\n for (int h : invariantKeys) {\n SortedSet setH = invariants.get(h);\n// System.out.println(\"adding block \" + setH + \" at \" + k + \" h=\" + h);\n partition.insertCell(k, setH);\n blocksToRefine.add(setH);\n k++;\n \n }\n // skip over the newly added blocks\n currentBlockIndex += nonEmptyInvariants - 1;\n }\n }", "private void calculateAreas() {\n\n\t\t/*\n\t\t * Each section is a trapezoid, so that the area is given by:\n\t\t * \n\t\t * (thicknessAtMainSpar + thicknessAtSecondarySpar)*distanceBetweenSpars*0.5\n\t\t * \n\t\t */\n\t\tint nSections = this._thicknessAtMainSpar.size();\n\t\tfor(int i=0; i<nSections; i++)\n\t\t\tthis._prismoidsSectionsAreas.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\t(this._thicknessAtMainSpar.get(i).plus(this._thicknessAtSecondarySpar.get(i)))\n\t\t\t\t\t\t\t.times(this._distanceBetweenSpars.get(i)).times(0.5).getEstimatedValue(),\n\t\t\t\t\t\t\tSI.SQUARE_METRE\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t}", "private void createPartitions() {\n \tfor (int attrOrd : splitAttrs) {\n \t\tFeatureField featFld = schema.findFieldByOrdinal(attrOrd);\n \t\tif (featFld.isInteger()) {\n \t\t\t//numerical\n \t\t\tList<Integer[]> splitList = new ArrayList<Integer[]>();\n \t\t\tInteger[] splits = null;\n \t\t\tcreateNumPartitions(splits, featFld, splitList);\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (Integer[] thisSplit : splitList) {\n \t\t\t\tsplitHandler.addIntSplits(attrOrd, thisSplit);\n \t\t\t}\n \t\t} else if (featFld.isCategorical()) {\n \t\t\t//categorical\n \t\t\tint numGroups = featFld.getMaxSplit();\n \t\t\tif (numGroups > maxCatAttrSplitGroups) {\n \t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\"more than \" + maxCatAttrSplitGroups + \" split groups not allwed for categorical attr\");\n \t\t\t}\n \t\t\t\n \t\t\t//try all group count from 2 to max\n \t\t\tList<List<List<String>>> finalSplitList = new ArrayList<List<List<String>>>();\n \t\t\tfor (int gr = 2; gr <= numGroups; ++gr) {\n \t\t\t\tLOG.debug(\"num of split sets:\" + gr);\n \t\t\t\tList<List<List<String>>> splitList = new ArrayList<List<List<String>>>();\n \t\t\t\tcreateCatPartitions(splitList, featFld.getCardinality(), 0, gr);\n \t\t\t\tfinalSplitList.addAll(splitList);\n \t\t\t}\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (List<List<String>> splitSets : finalSplitList) {\n \t\t\t\tsplitHandler.addCategoricalSplits(attrOrd, splitSets);\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }", "Set<S> getSegments();", "public void createSHMapping(\n\t\t\tGeometry MBB, \n\t\t\tGranularityFactors granularityFactors,\n\t\t\tSpatialEntitySet seSet) {\n\t\tdouble widthUnit =\n\t\t\t\t1/granularityFactors.graFacLongitude;\n\t\tdouble heightUnit = \n\t\t\t\t1/granularityFactors.graFacLatitude;\n\t\tdouble minLong, maxLong, minLat, maxLat;\n\t\t\n\t\tCoordinate[] coordinates = MBB.getCoordinates();\n\t\tminLong = coordinates[0].x;\n\t\tmaxLong = coordinates[2].x;\n\t\tminLat = coordinates[0].y;\n\t\tmaxLat = coordinates[1].y;\n\t\t\n\t\tnumWidthHR = (int)((maxLong-minLong)/widthUnit);\n\t\tif ((maxLong-minLong)%widthUnit!=0) {\n\t\t\tnumWidthHR += 1;\n\t\t}\n\n\t\tnumHeightHR = (int)((maxLat-minLat)/heightUnit);\n\t\tif ((maxLat-minLat)%heightUnit!=0) {\n\t\t\tnumHeightHR += 1;\n\t\t}\n\t\t\n\t\tfor (int i=0; i<numWidthHR*numHeightHR; i++) {\n\t\t\tdouble leftDownLong = \n\t\t\t\t\tminLong + widthUnit*(i%numWidthHR);\n\t\t\tdouble leftDownLat = \n\t\t\t\t\tminLat + heightUnit*(i/numWidthHR);\n\t\t\tthis.hyperrectangles.put(i, \n\t\t\t\t\tnew Coordinate(leftDownLong, leftDownLat));\n\t\t}\n\t\t\n\t\t//create SHMapping\n\t\tfor (Map.Entry<String, MultiPolygon> se:\n\t\t\t\tseSet.seHash.entrySet()) {\n\t\t\tGeometry tempMBB = se.getValue().getEnvelope();\n\t\t\tCoordinate[] tempCoordinates = \n\t\t\t\t\ttempMBB.getCoordinates();\n\t\t\tdouble leftDownLong = tempCoordinates[0].x;\n\t\t\tdouble rightDownLong = tempCoordinates[3].x;\n\t\t\tdouble leftDownLat = tempCoordinates[0].y;\n\t\t\tdouble leftUpLat = tempCoordinates[1].y;\n\t\t\t\n\t\t\tint minIndexLong =\n\t\t\t\t(int)((leftDownLong - minLong)/widthUnit);\n\t\t\tint maxIndexLong =\n\t\t\t\t(int)((rightDownLong - minLong)/widthUnit);\n\t\t\tint minIndexLat =\n\t\t\t\t(int)((leftDownLat - minLat)/heightUnit);\n\t\t\tint maxIndexLat =\n\t\t\t\t(int)((leftUpLat - minLat)/heightUnit);\n\t\t\t\n\t\t\tSet<Integer> hrHash =\n\t\t\t\t\tnew HashSet<Integer>();\n\t\t\t\n\t\t\tfor (int j=minIndexLat; j<=maxIndexLat; j++) {\n\t\t\t\tfor (int i=minIndexLong; i<=maxIndexLong; i++) {\n\t\t\t\t\thrHash.add(i+j*numWidthHR);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPair<String, MultiPolygon> spatialEntity =\n\t\t\t\t\tnew ImmutablePair<String, MultiPolygon>(\n\t\t\t\t\t\t\tse.getKey(), se.getValue());\n\t\t\tthis.shMapping.put(spatialEntity, hrHash);\n\t\t}\n\t}", "public void drawCut(SpriteBatch batch, float x, float y, float W, float w, float scaleX, float scaleY, float rotation) {\n final float H = mid.getRegionHeight();\n float xx = x - W * anchorX;\n float yy = y - H * anchorY;\n int w1 = left.getRegionWidth();\n int w3 = right.getRegionWidth();\n if (w<=0) return;\n float L2 = W - w3;\n if (w<=w1) {\n TextureRegion region = getLeft((int)w);\n batch.draw(region, xx, yy, x-xx, y-yy, w, H, scaleX, scaleY, rotation);\n }else if (w<=L2) {\n batch.draw(left, xx, yy, x-xx, y-yy, w1, H, scaleX, scaleY, rotation);\n xx += w1;\n batch.draw(mid, xx, yy, x-xx, y-yy, w-w1, H, scaleX, scaleY, rotation);\n }else {\n batch.draw(left, xx, yy, x-xx, y-yy, w1, H, scaleX, scaleY, rotation);\n xx += w1;\n batch.draw(mid, xx, yy, x-xx, y-yy, L2-w1, H, scaleX, scaleY, rotation);\n\n float r3 = w - L2;\n TextureRegion region = getRight((int)r3);\n xx += L2-w1;\n batch.draw(region, xx, yy, x-xx, y-yy, r3, H, scaleX, scaleY, rotation);\n }\n }", "public Collection<Rectangle> split(int width, int height) {\n ArrayList<Rectangle> split = new ArrayList<Rectangle>();\n int xCount = (int) Math.ceil((double) width() / (double) width);\n int yCount = (int) Math.ceil((double) height() / (double) height);\n for (int x = 0; x < xCount; x++) {\n for (int y = 0; y < yCount; y++) {\n split.add(new Rectangle(getStart().getX() + x * width, getStart().getY() + y * height, width, height));\n }\n }\n return split;\n }", "private ArrayList<Point> getShiftedPoints(ArrayList<Point> pts, int sx,\n int sy) {\n Dimension dim = layoutPanel.getLayoutSize();\n int width = dim.width;\n int height = dim.height;\n\n ArrayList<Point> sftPts = new ArrayList<Point>();\n Iterator<Point> iter = pts.iterator();\n while (iter.hasNext()) {\n Point pt = iter.next();\n int x = (width + (pt.x + sx)) % width;\n int y = (height + (pt.y + sy)) % height;\n sftPts.add(new Point(x, y));\n }\n\n return sftPts;\n }", "public int[] findHorizontalSeam() {\n return null;\n }", "@Override\n public ArrayList<int[]> Split()\n {\n double hypervolume_best = -Double.MAX_VALUE;\n int hypervolume_best_i = 0;\n int hypervolume_best_j = 0;\n double hypervolume = 0d;\n\n for( int i = 0; i < Capacity_max + 1; i++)\n {\n for( int j = i + 1; j < Capacity_max + 1; j++)\n {\n hypervolume = 0d;\n double[] point1 = PointMatrix[ Items.get(i)[0] ][ Items.get(i)[1] ];\n double[] point2 = PointMatrix[ Items.get(j)[0] ][ Items.get(j)[1] ];\n\n for(int a = 0; a < Dimensions; a++)\n {\n if( point1[a] > point2[a] )\n hypervolume += Math.log10(point1[a] - point2[a]);\n if( point1[a] < point2[a] )\n hypervolume += Math.log10(point2[a] - point1[a]);\n }\n\n if( hypervolume_best < hypervolume)\n {\n hypervolume_best_i = i;\n hypervolume_best_j = j;\n hypervolume_best = hypervolume;\n }\n }\n }\n\n // Ready the split\n ArrayList<int[]> items_split = new ArrayList<>();\n items_split.addAll(Items);\n\n int point1_x = items_split.get(hypervolume_best_i)[0];\n int point1_y = items_split.get(hypervolume_best_i)[1];\n int point2_x = items_split.get(hypervolume_best_j)[0];\n int point2_y = items_split.get(hypervolume_best_j)[1];\n double[] point1 = PointMatrix[ point1_x ][ point1_y ];\n double[] point2 = PointMatrix[ point2_x ][ point2_y ];\n\n if(hypervolume_best_i > hypervolume_best_j)\n {\n items_split.remove(hypervolume_best_i);\n items_split.remove(hypervolume_best_j);\n }\n else\n {\n items_split.remove(hypervolume_best_j);\n items_split.remove(hypervolume_best_i);\n }\n\n // Create new box with point1\n BoundingBoxLeaf box1 = new BoundingBoxLeaf( PointMatrix, ParentBox, Tree, Depth, point1_x, point1_y );\n\n box1.SetBoxToFit(point1);\n box1.SetCoordsToFit( point1_x, point1_y);\n \n // Reset this box, and add point2\n BoundingBoxLeaf box2 = this;\n \n box2.SetBoxToFit(point2);\n box2.SetCoordsToFit( point2_x, point2_y);\n\n box2.Items.clear();\n box2.Items.add( new int[]{ point2_x, point2_y } );\n\n // Notify parent of split\n ParentBox.InsertBox_internal(box1);\n \n // Add items to the new boxes, up to min capacity\n int[] item_best;\n \n // box1\n while( box1.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n \n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box1.Items.add( new int[]{ item_best[0], item_best[1] } );\n box1.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box1.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // box2\n while( box2.IsBelowMinCapacity() && !items_split.isEmpty() )\n {\n hypervolume_best = Double.MAX_VALUE;\n item_best = null;\n int index_best = -1;\n \n for(int i = 0; i < items_split.size(); i++ )\n {\n int[] item = items_split.get(i);\n double[] point = PointMatrix[ item[0] ][ item[1] ];\n hypervolume = box1.GetHyperVolume( point );\n \n if(hypervolume_best > hypervolume)\n {\n hypervolume_best = hypervolume;\n item_best = item; \n index_best = i;\n }\n \n }\n \n if(item_best != null)\n {\n box2.Items.add( new int[]{ item_best[0], item_best[1] } );\n box2.ExpandBoxToFit( PointMatrix[ item_best[0] ][ item_best[1] ] );\n box2.ExpandCoordsToFit( item_best[0], item_best[1]);\n \n items_split.remove(index_best);\n }\n }\n \n // return remaining to be reinserted into the tree\n return items_split; \n }", "Set<CACell> automateNGetOuterLayerSet(CACrystal crystal, final Set<CACell> set);", "private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }", "public int[] findHorizontalSeam() {\n transpose();\n int[] horizontalSeam = findVerticalSeam();\n transpose();\n return horizontalSeam;\n }", "public static void AddStripToGrid(ArrayList<ArrayList<Points>> G, ArrayList<Points> strip_temp, double cell_width)\n {\n Collections.sort(strip_temp, new MyComparatorY());\n \n ArrayList<Points> Box = new ArrayList<>(); \n \n for(int i = 0; i < strip_temp.size(); i++)\n {\n ArrayList<Points> q = new ArrayList<>();\n \n q.add(new Points(strip_temp.get(i).x_cor, strip_temp.get(i).y_cor, strip_temp.get(i).p_id, \"no tag\"));\n \n Box.add(new Points(q.get(0).x_cor, q.get(0).y_cor, q.get(0).p_id, q.get(0).tag));\n \n \n int break_flag = 0;\n \n bnm:\n for(int j = i+1; j < strip_temp.size(); j++)\n {\n ArrayList<Points> r = new ArrayList<>();\n \n r.add(new Points(strip_temp.get(j).x_cor, strip_temp.get(j).y_cor, strip_temp.get(j).p_id, \"no tag\"));\n \n double box_dist = (q.get(0).y_cor + cell_Width);\n \n if(r.get(0).y_cor > (q.get(0).y_cor + cell_Width))\n {\n ArrayList<Points> box_temp = new ArrayList<>();\n \n box_temp.addAll(Box);\n \n G.add(box_temp);\n \n break_flag = 1;\n Box.clear();\n \n break bnm;\n }\n \n Box.add(new Points(r.get(0).x_cor, r.get(0).y_cor, r.get(0).p_id, r.get(0).tag));\n \n i=j;\n }\n \n if(break_flag == 0)\n {\n \n ArrayList<Points> box_temp = new ArrayList<>();\n box_temp.addAll(Box);\n\n Box.clear();\n G.add(box_temp);\n } \n }\n }", "public int[] findHorizontalSeam() {\n\n int[] seam = findVerticalSeam();\n transpose();\n return seam;\n }", "@Test\n\tpublic void testMakeMeterSectionOnsets() {\n\t\tScorePiece sp = new ScorePiece(MIDIImport.importMidiFile(midiTestGetMeterKeyInfo));\n\t\tScoreMetricalTimeLine smtl = new ScoreMetricalTimeLine(sp.getMetricalTimeLine());\n\n\t\tList<Rational> expected = Arrays.asList(new Rational[]{\n\t\t\tnew Rational(0, 4),\n\t\t\tnew Rational(3, 4),\n\t\t\tnew Rational(19, 4),\n\t\t\tnew Rational(43, 4),\n\t\t\tnew Rational(51, 4),\n\t\t\tnew Rational(209, 16)\n\t\t});\n\t\t\n\t\tList<Rational> actual = smtl.makeMeterSectionOnsets();\n\n\t\tassertEquals(expected.size(), actual.size());\n\t\tfor (int i = 0; i < expected.size(); i++) {\n\t\t\tassertEquals(expected.get(i), actual.get(i));\t\t\n\t\t}\n\t\tassertEquals(expected, actual);\n\t}", "public StructExprRecog preRestructHDivSer4MatrixMExprs(StructExprRecog ser) {\n switch(ser.mnExprRecogType) {\n case StructExprRecog.EXPRRECOGTYPE_HBLANKCUT: {\n LinkedList<StructExprRecog> listNewSers = new LinkedList<StructExprRecog>();\n for (int idx = 0; idx < ser.mlistChildren.size(); idx ++) {\n StructExprRecog serNewChild = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.get(idx));\n if (serNewChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) {\n listNewSers.addAll(serNewChild.mlistChildren);\n } else {\n listNewSers.add(serNewChild);\n }\n }\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewSers, StructExprRecog.EXPRRECOGTYPE_HBLANKCUT); // listNewSers size should be > 1\n return serReturn;\n } case StructExprRecog.EXPRRECOGTYPE_HLINECUT: {\n StructExprRecog serNewNumerator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getFirst());\n StructExprRecog serNewDenominator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getLast());\n if (serNewNumerator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && serNewDenominator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) {\n return ser;\n }\n LinkedList<StructExprRecog> listSersAbove = new LinkedList<StructExprRecog>();\n if (serNewNumerator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n listSersAbove.addAll(serNewNumerator.mlistChildren);\n serNewNumerator = listSersAbove.removeLast();\n }\n LinkedList<StructExprRecog> listSersBelow = new LinkedList<StructExprRecog>();\n if (serNewDenominator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n listSersBelow.addAll(serNewDenominator.mlistChildren);\n serNewDenominator = listSersBelow.removeFirst();\n }\n StructExprRecog serNewHLnCut = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewHLnCut = new LinkedList<StructExprRecog>();\n listNewHLnCut.add(serNewNumerator);\n listNewHLnCut.add(ser.mlistChildren.get(1));\n listNewHLnCut.add(serNewDenominator);\n serNewHLnCut.setStructExprRecog(listNewHLnCut, EXPRRECOGTYPE_HLINECUT);\n LinkedList<StructExprRecog> listNewChildren = listSersAbove;\n listNewChildren.add(serNewHLnCut);\n listNewChildren.addAll(listSersBelow);\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HBLANKCUT);\n return serReturn;\n } case StructExprRecog.EXPRRECOGTYPE_HCUTCAP:\n case StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER:\n case StructExprRecog.EXPRRECOGTYPE_HCUTUNDER: {\n StructExprRecog serNewPrinciple = preRestructHDivSer4MatrixMExprs(ser.getPrincipleSER(1));\n if (serNewPrinciple.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) {\n return ser;\n }\n LinkedList<StructExprRecog> listNewBlankCuts = new LinkedList<StructExprRecog>();\n listNewBlankCuts.addAll(serNewPrinciple.mlistChildren); // have to add all instead of using = because otherwise we change serNewPrinciple.\n if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER) {\n StructExprRecog serTop = ser.mlistChildren.getFirst();\n StructExprRecog serMajor = listNewBlankCuts.removeFirst();\n StructExprRecog serNew1st = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>();\n listNewChildren.add(serTop);\n listNewChildren.add(serMajor);\n serNew1st.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTCAP);\n listNewBlankCuts.addFirst(serNew1st);\n }\n if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTCAP) {\n StructExprRecog serMajor = listNewBlankCuts.removeLast();\n StructExprRecog serBottom = ser.mlistChildren.getLast();\n StructExprRecog serNewLast = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>();\n listNewChildren.add(serMajor);\n listNewChildren.add(serBottom);\n serNewLast.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTUNDER);\n listNewBlankCuts.addLast(serNewLast);\n }\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewBlankCuts, EXPRRECOGTYPE_HBLANKCUT);\n return serReturn;\n } default:\n return ser;\n }\n }", "public int[] findHorizontalSeam() {\n return findSeam(true);\n }", "public SectionSets (Collection<Collection<Section>> sets)\r\n {\r\n this.sets = sets;\r\n }", "public static List<Line> regroupShapesByLine(final List<ShapeModel> shapes) {\n // we try to see if it fits any of the line existing (i.e. center between line.minx and line.minx + lineHeight\n // if not we create a new line and assign it\n List<Line> lines = new ArrayList<>();\n Line match;\n for (ShapeModel shape : shapes) {\n match = getLineFromShape(shape, lines);\n if (match != null) {\n shape.setLine(match);\n } else {\n match = new Line(shape.getMinx(), ShapeComparator.averageSize);\n lines.add(match);\n }\n match.addLetter(shape);\n }\n return lines;\n }", "public static SectionSets createFromGlyphs (Collection<Glyph> glyphs)\r\n {\r\n SectionSets sectionSets = new SectionSets();\r\n sectionSets.sets = new ArrayList<>();\r\n\r\n for (Glyph glyph : glyphs) {\r\n sectionSets.sets.add(new ArrayList<>(glyph.getMembers()));\r\n }\r\n\r\n return sectionSets;\r\n }", "public Split(ManagedElementList<VirtualMachine> vmset1, ManagedElementList<VirtualMachine> vmset2) {\r\n this.set1 = vmset1;\r\n this.set2 = vmset2;\r\n }", "public BSTSet intersection(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] interArray = justDuplicates(thisArray, sArray);\n\n sortArray(interArray);\n\n return new BSTSet(interArray);\n }", "@Test\r\n\tpublic void testGetListOfShapesEnclosingGivenPoint() {\r\n\t\t\r\n\t\t// Create a first shape square\r\n\t\tPoint origin = new Point(25, 100); \r\n\t\tList<Double> list = new ArrayList<Double>(); \t\t\r\n double side = 5.0; \t\t\r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t\t\r\n\t\tShape square = ShapeFactory.createShape(0, origin, list); \t\t // 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(square);\t\t\t\t\t\t \t\t\r\n\t\t\r\n\t\t// Create a second shape square\r\n\t\tPoint secondOrigin = new Point(500,500); \r\n\t\tList<Double> secondList = new ArrayList<Double>(); \r\n double secondSide = 5.0; \r\n secondList.add(secondSide); \t\t\t\t\t\t\t\t \r\n\t\tShape secondSquare = ShapeFactory.createShape(0, secondOrigin, secondList); \r\n\t\tscreen.shapesOnScreen.add(secondSquare);\t\t\t\t\t\r\n\t\t\r\n\t\t// Create a third shape circle\r\n\t\tPoint thirdOrigin = new Point(25,100); \r\n\t\tList<Double> thirdList = new ArrayList<Double>(); \r\n double radius = 14.0; \r\n thirdList.add(radius); \t\t\t\t\t\t\t\t\t\t \r\n\t\tShape circle = ShapeFactory.createShape(3, thirdOrigin, thirdList); // 3 for creation of circle\r\n\t\tscreen.shapesOnScreen.add(circle);\t\t\r\n\t\t\r\n\t\t// Point to check for shapes enclosing it\r\n\t\tPoint point = new Point(26, 101);\r\n\t\tList<Shape> shapesEnclosingPoint = screen.getListOfShapesEnclosingGivenPoint(point);\r\n\t\t\r\n\t\t// Expected shapes in the list\r\n\t\tList<Shape> expectedList = new ArrayList<Shape>();\r\n\t\texpectedList.add(square);\r\n\t\texpectedList.add(circle);\r\n\t\t\r\n\t\tassertEquals( expectedList, shapesEnclosingPoint );\t\r\n\t}", "private int getShapesMeasures(Collection<ModelElementInstance> shapes){\n\t\tint toReturn = 0;\n\t\tfor (ModelElementInstance s: shapes){\n\t\t\tBpmnShape firstShape = (BpmnShape) s;\t\n\t\t\tfor (ModelElementInstance t: shapes){\n\t\t\t\tBpmnShape secondShape = (BpmnShape) t;\n\t\t\t\tif (!firstShape.equals(secondShape)) {\n\t\t\t\t\tif(this.isOverlapped(firstShape, secondShape))\n\t\t\t\t\t\ttoReturn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn toReturn/2;\n\t}", "public int[] findHorizontalSeam() {\n Picture transposed = new Picture(this.height(), this.width());\n for (int i = 0; i < this.height(); i++) {\n for (int j = 0; j < this.width(); j++) {\n transposed.set(i, j, picture.get(j, i));\n }\n }\n SeamCarver s = new SeamCarver(transposed);\n return s.findVerticalSeam();\n }", "public static Double[][] operationAvgPooling(Double[][] matrix, int w, int h, int s) {\n if (s < 1) s = 1;\n int fSizeY = matrix.length;\n int kSizeY = h;\n int fSizeX = matrix[0].length;\n int kSizeX = w;\n int p = 0;\n int i, j;\n Double[][] output = new Double[i = ((matrix.length - h) / s) + 1][j = ((matrix[0].length - w) / s) + 1];\n for (int y = 0; y < i; y = y + 1) {\n for (int x = 0; x < j; x = x + 1) {\n double avg = 0;\n for (int yy = 0; yy < h; yy++) {\n for (int xx = 0; xx < w; xx++) {\n double l = matrix[y + yy][x + xx];\n avg += l;\n }\n }\n output[y][x] = avg / (h * w);\n }\n }\n return output;\n }", "void calcHorizSeamInfo() {\n SeamInfo tl = null;\n SeamInfo dl = null;\n SeamInfo l = null;\n if (this.topLeft() != null) {\n tl = topLeft().seamInfo;\n }\n if (this.downLeft() != null) {\n dl = downLeft().seamInfo;\n }\n if (this.left != null) {\n l = left.seamInfo;\n }\n\n double min = Double.MAX_VALUE;\n SeamInfo cameFrom = null;\n\n if (tl != null && min > tl.totalWeight) {\n min = tl.totalWeight;\n cameFrom = tl;\n }\n if (dl != null && min > dl.totalWeight) {\n min = dl.totalWeight;\n cameFrom = dl;\n }\n if (l != null && min > l.totalWeight) {\n min = l.totalWeight;\n cameFrom = l;\n }\n\n // for top border cases\n if (cameFrom == null) {\n min = 0;\n }\n\n this.seamInfo = new SeamInfo(this, min + this.energy(), cameFrom, false);\n }", "@Test\n public void testSplitOnCreatedSegment() throws Exception {\n InternalKnowledgeBase kbase1 = buildKnowledgeBase(\"r1\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;) E(1;) E(2;)\\n\");\n kbase1.addPackages( buildKnowledgePackage(\"r2\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;) E(1;) E(2;)\\n\") );\n kbase1.addPackages( buildKnowledgePackage(\"r3\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(2;)\\n\") );\n kbase1.addPackages( buildKnowledgePackage(\"r4\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) \\n\") );\n\n InternalWorkingMemory wm = ((InternalWorkingMemory)kbase1.newKieSession());\n List list = new ArrayList();\n wm.setGlobal(\"list\", list);\n\n wm.insert(new X(1));\n wm.insert(new X(2));\n wm.insert(new X(3));\n wm.flushPropagations();\n\n RuleTerminalNode rtn1 = getRtn( \"org.kie.r1\", kbase1 );\n\n PathMemory pm1 = wm.getNodeMemory(rtn1);\n assertThat(pm1.getLinkedSegmentMask()).isEqualTo(2);\n SegmentMemory[] smems = pm1.getSegmentMemories();\n assertThat(smems.length).isEqualTo(4);\n assertThat(smems[0]).isNull();\n assertThat(smems[2]).isNull();\n assertThat(smems[3]).isNull();\n SegmentMemory sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n\n kbase1.addPackages( buildKnowledgePackage(\"r5\", \" A(1;) A(2;) B(1;) B(2;) C(1;) C(2;) X(1;) X(3;)\\n\") );\n wm.fireAllRules();\n\n assertThat(pm1.getLinkedSegmentMask()).isEqualTo(6);\n smems = pm1.getSegmentMemories();\n assertThat(smems.length).isEqualTo(5);\n assertThat(smems[0]).isNull();\n assertThat(smems[3]).isNull();\n assertThat(smems[4]).isNull();\n sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n sm = smems[2];\n assertThat(sm.getPos()).isEqualTo(2);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(4);\n\n RuleTerminalNode rtn5 = getRtn( \"org.kie.r5\", kbase1 );\n PathMemory pm5 = wm.getNodeMemory(rtn5);\n assertThat(pm5.getLinkedSegmentMask()).isEqualTo(6);\n\n smems = pm5.getSegmentMemories();\n assertThat(smems.length).isEqualTo(3);\n assertThat(smems[0]).isNull();\n sm = smems[1];\n assertThat(sm.getPos()).isEqualTo(1);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(2);\n\n sm = smems[2];\n assertThat(sm.getPos()).isEqualTo(2);\n assertThat(sm.getSegmentPosMaskBit()).isEqualTo(4);\n }", "private void generateHalfCylinder() {\n\t\tint segments = 32;\n\t\tverts = new Vector[segments * 2];\n\t\tfaces = new int[4 * segments - 4][3];\n\t\tdouble heading = 0;\n\t\tdouble headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices\n\t\tfor (int s = 0; s < segments; s++) {\n\t\t\tdouble x = Math.cos(heading); // x co-ordinate of points on the segment\n\t\t\tdouble z = Math.sin(heading); // z co-ordinate of points on the segment\n\t\t\tverts[s] = new Vector(3);\n\t\t\tverts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle\n\t\t\tverts[s + segments] = new Vector(3);\n\t\t\tverts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle\n\t\t\theading += headingIncrement;\n\t\t}\n\t\tfor (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface\n\t\t\tfaces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across\n\t\t\tfaces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle\n\t\t}\n\t\tfor (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom\n\t\t\tfaces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex\n\t\t\tfaces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle\n\t\t}\n\t\t// Faces representing the vertical square cross-section\n\t\tfaces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first\n\t\tfaces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top)\n\t}", "private void drawPacksFromSets()\n {\n // Database of cards and their appropriate images... This is all built-in and pre-created in the assets folder.\n // Retrieve information from database and create the card pool to draw cards from.\n CardDatabase cardDb = new CardDatabase(this);\n // Store card pool here.\n ArrayList<Card> cardPool;\n\n if (setsForDraft.size() == ONE_DRAFT_SET)\n {\n cardPool = cardDb.getCardPool(setsForDraft.get(0));\n // Make a card pack generator. This will use the cardPool passed in to make the packs that will be opened.\n CardPackGenerator packGenerator = new CardPackGenerator(cardPool);\n\n // Since this is a Sealed simulator, open 6 (SEALED_PACKS) packs.\n openedCardPool = packGenerator.generatePacks(SEALED_PACKS);\n }\n else if(setsForDraft.size() == TWO_DRAFT_SETS)\n {\n // Two sets are being drafted. First set is major one, second is minor one.\n cardPool = cardDb.getCardPool(setsForDraft.get(0));\n // Make a card pack generator. This will use the cardPool passed in to make the packs that will be opened.\n CardPackGenerator packGenerator = new CardPackGenerator(cardPool);\n // Major set opening.\n openedCardPool = packGenerator.generatePacks(MAJOR_SEALED);\n\n // Fetch minor set's cards.\n cardPool = cardDb.getCardPool(setsForDraft.get(1));\n // Make appropriate card pack generator.\n packGenerator = new CardPackGenerator(cardPool);\n // Minor set opening. Add to opened pool.\n openedCardPool.addAll(packGenerator.generatePacks(MINOR_SEALED));\n }\n else\n {\n // ERROR!\n }\n }", "public static void partitioningByTest2(){\r\n\t\tStream<String> ohMy = Stream.of(\"lions\", \"tigers\", \"bears\");\r\n\t\tMap<Boolean, Set<String>> map = ohMy.collect(\r\n\t\tCollectors.partitioningBy(s -> s.length() <= 7, Collectors.toSet()));\r\n\t\tSystem.out.println(map);// {false=[], true=[lions, tigers, bears]}\r\n\t}", "protected static List<List<Card>> expandCardSets(List<Set<Card>> cardSets, int minRunSize) {\n // Expand the card sets\n List<List<Card>> runs = new ArrayList<>();\n runs.add(new ArrayList<>());\n for (Set<Card> cardSet : cardSets) {\n runs = multiply(runs, cardSet);\n }\n\n // Pick out appropriate runs.\n List<List<Card>> runsWithMinSize = new ArrayList<>();\n for (List<Card> run : runs) {\n for (int i = run.size(); i >= minRunSize; i--) {\n runsWithMinSize.add(run.subList(0, i));\n }\n }\n return runsWithMinSize;\n }", "public void makeWindows()\r\n {\r\n int spacingX = random.nextInt( 3 ) + 3;\r\n int spacingY = random.nextInt( 5 ) + 3;\r\n int windowsX = random.nextInt( 3 ) + 4;\r\n int windowsY = random.nextInt( 3 ) + 5;\r\n int sizeX = ( building.getWidth() - spacingX * ( windowsX + 1 ) ) / windowsX;\r\n int sizeY = ( building.getHeight() - spacingY * ( windowsY + 1 ) ) / windowsY;\r\n \r\n \r\n for( int i = 1; i <= windowsX; i++ )\r\n {\r\n for( int k = 1; k <= windowsY; k++ )\r\n {\r\n \r\n Rectangle r = new Rectangle( building.getXLocation() + ( spacingX / 2 + spacingX * i ) + sizeX * ( i - 1 ), \r\n building.getYLocation() + ( spacingY / 2 + spacingY * k ) + sizeY * ( k - 1 ) );\r\n r.setSize( sizeX, sizeY );\r\n r.setColor( new Color( 254, 254, 34 ) );\r\n add( r );\r\n }\r\n }\r\n }", "private void drawSquares(Graphics2D g2d, int startY, int wid, int hei) {\n int size = hei / 16;\n int startX = wid / 2 - size * 3;\n for (int i = 0; i < 6; i++) {\n drawSquare(g2d, startX + size * i, startY, size);\n drawSquare(g2d, startX + size * i, startY + size, size);\n drawSquare(g2d, startX + size * i, startY + size * 2, size);\n drawSquare(g2d, startX + size * i, startY + size * 3, size);\n }\n }", "private void calculateSpanWidthBorders(int totalSpace){\r\n if(spanWidthBorders == null || spanWidthBorders.length != mSpanCount + 1\r\n || spanWidthBorders[spanWidthBorders.length - 1] != totalSpace){\r\n spanWidthBorders = new int[mSpanCount + 1];\r\n }\r\n spanWidthBorders[0] = 0;\r\n sizePerSpan = totalSpace / mSpanCount;\r\n int sizePerSpanRemainder = totalSpace % mSpanCount;\r\n int consumedPixels = 0;\r\n int additionalSize = 0;\r\n for (int i = 1; i <= mSpanCount; i++) {\r\n int itemSize = sizePerSpan;\r\n additionalSize += sizePerSpanRemainder;\r\n if (additionalSize > 0 && (mSpanCount - additionalSize) < sizePerSpanRemainder) {\r\n itemSize += 1;\r\n additionalSize -= mSpanCount;\r\n }\r\n consumedPixels += itemSize;\r\n spanWidthBorders[i] = consumedPixels;\r\n }\r\n }", "public Bounds[] subdivide() {\n return new Bounds[] {\n getSubdivision(0, 0, 0), getSubdivision(1, 0, 0), getSubdivision(0, 0, 1), getSubdivision(1, 0, 1),\n getSubdivision(0, 1, 0), getSubdivision(1, 1, 0), getSubdivision(0, 1, 1), getSubdivision(1, 1, 1)\n };\n }", "private void setDimenstions(String line) throws Exception {\n\t\tScanner dimensions = new Scanner(line);\n\n\t\tsetWidth((short) (2 + Short.parseShort(dimensions.next())));\n\t\tsetHeight((short) (2 + Short.parseShort(dimensions.next())));\n\n\t\tdimensions.close();\n\t}", "private void buildHashSet(int capacity, ClosedHashCell[] hashSet){\r\n for (int i=0; i < capacity; i++){\r\n hashSet[i] = new ClosedHashCell();\r\n }\r\n }", "public void getSourcePoints(Set<Point> source) {\n \tfor (int i = 1; i < width; i++) {\n\t\t\tsource.add(new Point(i, 0));\n\t\t\tsource.add(new Point(i, height));\n \t}\n\t\tfor (int j = 1; j < height; j++) {\n\t\t\tsource.add(new Point(0, j));\n\t\t\tsource.add(new Point(width, j));\n\t\t}\n }", "private static char[][] decimateHorizontally(String[] lines) {\n\t\tfinal int width = (lines[0].length() + 1) / 2;\n\t\tchar[][] c = new char[lines.length][width];\n\t\tfor (int i = 0; i < lines.length; i++)\n\t\t\tfor (int j = 0; j < width; j++)\n\t\t\t\tc[i][j] = lines[i].charAt(j * 2);\n\t\treturn c;\n\t}", "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 }", "public void setSplitHorizon(boolean sh) {\n\t\tsplithorizon = sh;\n\t}", "private void drawHorizontalLines(){\r\n\r\n\t\tdouble x1 = START_X;\r\n\t\tdouble x2 = getWidth();\r\n\t\tdouble y1 = GRAPH_MARGIN_SIZE;\r\n\t\tdouble y2 = y1;\r\n\r\n\t\tdrawLine(x1,y1,x2,y2);\r\n\r\n\t\tdouble newY1 = getHeight() - y1;\r\n\t\tdouble newY2 = newY1;\r\n\r\n\t\tdrawLine(x1,newY1,x2,newY2);\r\n\t}", "@Test\n\tpublic void westSWC()\n\t{\n\t\t\n\t\tData d = new Data();\n\t\td.set(19, 35);\n\t\td.set(21, 46);\n\t\td.set(23, 89);\n\t\td.set(27, 68);\n\t\td.set(29, 79);\n\t\td.set(1, 34);\n\t\td.set(2, 45);\n\t\td.set(3, 56);\n\t\td.set(4, 67);\n\t\td.set(5, 78);\n\t\td.set(31, 23);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(23);\n\t\tassertTrue(0==test_arr.get(0).getX() && 3==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 4==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 5==test_arr.get(2).getY()\n\t\t\t&& 0==test_arr.get(3).getX() && 6==test_arr.get(3).getY()\n\t\t\t&& 0==test_arr.get(4).getX() && 7==test_arr.get(4).getY());\n\t}", "public int[] findHorizontalSeam() {\n picture = flip(picture);\n int[] horizontalSeam = findVerticalSeam();\n picture = flip(picture);\n return horizontalSeam;\n }", "private String generateHorizontalDivider(Table inputTable) {\n StringBuilder horDivBuilder = new StringBuilder();\n for (int i = 0; i < inputTable.getColumnSize(); i++) {\n horDivBuilder.append(X_DIV);\n for (int j = 0; j < getColWidth(i) + XPADD; j++) {\n horDivBuilder.append(H_DIV);\n }\n }\n horDivBuilder.append(X_DIV + NEWLN);\n return horDivBuilder.toString();\n }", "public int[] findHorizontalSeam() {\n int[][] edgeTo = new int[height][width];\n double[][] distTo = new double[height][width];\n reset(distTo);\n for (int rows = 0; rows < height; rows++) {\n distTo[rows][0] = 1000;\n }\n // this is for relaxation.\n for (int columns = 0; columns < width - 1; columns++) {\n for (int rows = 0; rows < height; rows++) {\n relaxHorizontal(rows, columns, edgeTo, distTo);\n }\n }\n double minDist = Double.MAX_VALUE;\n int minRow = 0;\n for (int rows = 0; rows < height; rows++) {\n if (minDist > distTo[rows][width - 1]) {\n minDist = distTo[rows][width - 1];\n minRow = rows;\n }\n }\n int[] indices = new int[width];\n //to find the horizontal seam.\n for (int columns = width - 1, rows = minRow; columns >= 0; columns--) {\n indices[columns] = rows;\n rows -= edgeTo[rows][columns];\n }\n return indices;\n }", "public static String squares (double x, double y, double halfLength, int order, Draw page) {\r\n\t\t\r\n\t\t//Base Case\r\n\t\tif(order == 1) {\r\n\t\t\t\r\n\t\t\t//Draws squares\r\n\t\t\tpage.square(x, y, halfLength);\r\n\r\n\t\t\t//Returns coordinates of the smallest squares cut to one decimal point \r\n\t\t\treturn \"[\" + Math.round(x * 10.0) / 10.0 + \", \" + Math.round(y * 10.0) / 10.0 + \"]\";\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t//Draws squares\r\n\t\t\tpage.square(x, y, halfLength);\r\n\t\t\t\r\n\t\t\t//Will consist of coordinates after recursive calls\r\n\t\t\tString smallestSquareCoords = \"\";\r\n\t\t\t\r\n\t\t\t//Recursive call on upper right squares\r\n\t\t\tsmallestSquareCoords += squares(x + halfLength, y + halfLength, halfLength / 2, order - 1, page);\r\n\t\t\t\r\n\t\t\t//Recursive call on bottom right squares\r\n\t\t\tsmallestSquareCoords += squares(x + halfLength, y - halfLength, halfLength / 2, order - 1, page);\r\n\t\t\t\r\n\t\t\t//Recursive call on upper left squares\r\n\t\t\tsmallestSquareCoords += squares(x - halfLength, y + halfLength, halfLength / 2, order - 1, page);\r\n\r\n\t\t\t//Recursive call on bottom left squares\r\n\t\t\tsmallestSquareCoords += squares(x - halfLength, y - halfLength, halfLength / 2, order - 1, page);\r\n\t\t\t\r\n\t\t\t//Returns coordinates of the smallest squares\r\n\t\t\treturn smallestSquareCoords;\r\n\t\t}\r\n\t}", "static int m36189a(Rect rect, Set<Rect> set) {\n int i = 0;\n if (set.isEmpty()) {\n return 0;\n }\n ArrayList<Rect> arrayList = new ArrayList<>();\n arrayList.addAll(set);\n Collections.sort(arrayList, new Comparator<Rect>() {\n /* renamed from: a */\n public final int compare(Rect rect, Rect rect2) {\n return Integer.valueOf(rect.top).compareTo(Integer.valueOf(rect2.top));\n }\n });\n ArrayList arrayList2 = new ArrayList();\n for (Rect rect2 : arrayList) {\n arrayList2.add(Integer.valueOf(rect2.left));\n arrayList2.add(Integer.valueOf(rect2.right));\n }\n Collections.sort(arrayList2);\n int i2 = 0;\n while (i < arrayList2.size() - 1) {\n int i3 = i + 1;\n if (!((Integer) arrayList2.get(i)).equals(arrayList2.get(i3))) {\n Rect rect3 = new Rect(((Integer) arrayList2.get(i)).intValue(), rect.top, ((Integer) arrayList2.get(i3)).intValue(), rect.bottom);\n int i4 = rect.top;\n for (Rect rect4 : arrayList) {\n if (Rect.intersects(rect4, rect3)) {\n if (rect4.bottom > i4) {\n i2 += rect3.width() * (rect4.bottom - Math.max(i4, rect4.top));\n i4 = rect4.bottom;\n }\n if (rect4.bottom == rect3.bottom) {\n break;\n }\n }\n }\n }\n i = i3;\n }\n return i2;\n }", "private void makeStrings(char middleLineChar, String[] lines){\n\n\t\tint n = lines.length;\n\t\tint currentCharIndex = (int) (middleLineChar - 'A');\n\t\tchar currentChar;\n\t\tint middleIndex = n/2;\n\t\tint marginFromLeft, marginFromMiddle;\t\n\t\tfor (int currentLineIndex = middleIndex; currentLineIndex >=0; currentLineIndex--){\n\t\t\tmarginFromLeft = middleIndex - currentLineIndex;\n\t\t\tmarginFromMiddle = currentLineIndex;\n\t\t\tcurrentChar = charValueOf(currentCharIndex);\n\t\t\tString line = makeStringLine(currentChar, marginFromLeft, marginFromMiddle);\n\t\t\tlines[currentLineIndex] = line;\n\t\t\tlines[2*middleIndex - currentLineIndex] = line;\t\t\t\n\t\t\tcurrentCharIndex--;\n\t\t}\t\n\t}", "public abstract List<List<Integer>> subsets(int[] S);", "private void splitIntoRoots() {\n\t\tArrayList<ArrayList<Coord>> circ = findCircles();\n\t\tcombinePastRoots(circ);\n\t}", "public Set(int blocksPerSet){\n\t\tthis.blocksPerSet = blocksPerSet;\n\t\tblocks = new Block[blocksPerSet];\n\t\tfor(i = 0; i < blocksPerSet; i++)\n\t\t\tblocks[i] = new Block();\n\t}", "private void compactHorizontally (List<List<NodeRealizer>> cellColumns)\n {\n int centerIndex = (cellColumns.size () - 1) / 2;\n List<NodeRealizer> minXList = cellColumns.get (centerIndex);\n List<NodeRealizer> maxXList = cellColumns.get (centerIndex);\n for (int i = 1; i <= centerIndex; i++)\n {\n List<NodeRealizer> leftList = cellColumns.get (centerIndex - i);\n moveToRight (leftList, minXList);\n minXList = leftList;\n List<NodeRealizer> rightList = cellColumns.get (centerIndex + i);\n moveToLeft (rightList, maxXList);\n maxXList = rightList;\n }\n if (cellColumns.size () % 2 == 0)\n {\n List<NodeRealizer> rightList = cellColumns.get (cellColumns.size () - 1);\n moveToLeft (rightList, maxXList);\n }\n }", "private LineDataSet createSet(){\n LineDataSet set = new LineDataSet(null, \"SPL Db\");\n set.setDrawCubic(true);\n set.setCubicIntensity(0.2f);\n set.setAxisDependency(YAxis.AxisDependency.LEFT);\n set.setColor(ColorTemplate.getHoloBlue());\n set.setLineWidth(2f);\n set.setCircleSize(4f);\n set.setFillAlpha(65);\n set.setFillColor(ColorTemplate.getHoloBlue());\n set.setHighLightColor(Color.rgb(244,117,177));\n set.setValueTextColor(Color.WHITE);\n set.setValueTextSize(10f);\n\n return set;\n }", "public static HashMap<Warehouse, HashSet<Warehouse>> mapWarehouses(Set<Warehouse> warehouses) {\n HashMap<ItemType, ArrayList<Warehouse>> g = new HashMap<ItemType, ArrayList<Warehouse>>();\n //this maps the item types to a list of warehouses that hold this type\n for (Warehouse warehouse:warehouses) {\n for (ItemType type:warehouse.getValidTypes()) {\n if (g.containsKey(type)) {\n g.get(type).add(warehouse);\n } else {\n g.put(type, new ArrayList<Warehouse>());\n g.get(type).add(warehouse);\n }\n }\n }\n HashMap<Warehouse, HashSet<Warehouse>> connectedGraph = new HashMap<Warehouse, HashSet<Warehouse>>();\n for (ItemType type :g.keySet()) {\n for (Warehouse warehouse: g.get(type)) {\n if (connectedGraph.containsKey(warehouse)) {\n connectedGraph.get(warehouse).addAll(g.get(type));\n connectedGraph.get(warehouse).remove(warehouse);\n } else {\n //create a new set of warehouses\n connectedGraph.put(warehouse, new HashSet<Warehouse>((g.get(type))));\n connectedGraph.get(warehouse).remove(warehouse);\n }\n }\n }\n return connectedGraph;\n }", "@Override\n public Set<Shape> entityShapes(Set<SubText> subtexts) {\n Set<String> straights = new HashSet<String>();\n\t// Go through the subtexts -- separate them into CIDRs and straights\n Iterator<SubText> it_sub = subtexts.iterator();\n\twhile (it_sub.hasNext()) {\n\t SubText subtext = it_sub.next();\n\t // Only match entity subtexts\n\t if (subtext instanceof Entity) {\n\t Entity entity = (Entity) subtext;\n straights.add(subtext.toString());\n\t }\n\t}\n\treturn entityShapesInternal(straights);\n }", "@Test\n public void testSplittingSoillayer7() throws IOException, Exception {\n HashMap<String, Object> data = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(data, \"sllb\", \"30\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(data, \"sllb\", \"50\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.3\");\n \n HashMap<String, Object> expectedData = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"5\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"15\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"30\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"40\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.3\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"50\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.3\");\n ArrayList<HashMap<String, String>> expectedLayers = MapUtil.getBucket(expectedData, \"soil\").getDataList();\n\n ArrayList<HashMap<String, String>> result = SoilHelper.splittingSoillayer(data, false);\n \n assertEquals(\"getRootDistribution: soil top layer case 4 is incorrect \", expectedLayers, result);\n \n log.info(\"getRootDistribution() output: {}\", result.toString());\n }", "public Collection<Collection<Section>> getSets (Sheet sheet)\r\n {\r\n if (sets == null) {\r\n sets = new ArrayList<>();\r\n\r\n for (SectionDescSet idSet : descSets) {\r\n List<Section> sectionSet = new ArrayList<>();\r\n\r\n for (SectionDesc sectionId : idSet.sections) {\r\n Lag lag = (sectionId.orientation == Orientation.VERTICAL)\r\n ? sheet.getVerticalLag()\r\n : sheet.getHorizontalLag();\r\n Section section = lag.getVertexById(sectionId.id);\r\n\r\n if (section == null) {\r\n logger.warn(sheet.getLogPrefix()\r\n + \"Cannot find section for \" + sectionId,\r\n new Throwable());\r\n } else {\r\n sectionSet.add(section);\r\n }\r\n }\r\n\r\n sets.add(sectionSet);\r\n }\r\n }\r\n\r\n return sets;\r\n }", "public static SectionSets createFromSections (Collection<Section> sections)\r\n {\r\n SectionSets sectionSets = new SectionSets();\r\n sectionSets.sets = new ArrayList<>();\r\n sectionSets.sets.add(sections);\r\n\r\n return sectionSets;\r\n }", "private ArrayList<String> split(String string, int width, FontMetrics metrics){\n return splitHelper(new ArrayList<>(),string,width,metrics);\n }", "public void smallerRocks() {\n\t\t// make the asteroid smaller\n\t\t// by dividing the width by SIZE_INC\n\t\twidth = width / SIZE_INC;\n\n\t\t// set the end points with new location being the first line's start\n\t\tmakeEndPoints(width, outLine[0].getStart().getX(), outLine[0]\n\t\t\t\t.getStart().getY());\n\n\t\t// and make it a little faster\n\t\txSpeed = INC * xSpeed;\n\t\tySpeed = INC * ySpeed;\n\n\t}", "private int[] genKeys() {\n HashSet<Integer> set = new HashSet<Integer>();\n HashSet<int[]> next = new HashSet<int[]>();\n rowKeys = new HashMap<Integer, Integer>();\n int[] rowKeys2combo = new int[keySize];\n\n // 1st set starts with 0004, 0040, 0400, 4000\n int counter = 0;\n int key;\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n\n final int splitIdx = counter;\n\n // 2nd set starts with 0003, 0030, 0300, 3000\n for (int i = 0; i < rowSize; i++) {\n int[] temp = new int[rowSize];\n temp[i] = rowSize - 1;\n key = rowCombo2Key(temp);\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(temp);\n }\n\n while (next.size() > 0) {\n HashSet<int[]> expand = next;\n next = new HashSet<int[]>();\n for (int[] combo : expand) {\n for (int i = 0; i < rowSize; i++) {\n if (combo[i] > 0) {\n for (int j = 0; j < rowSize; j++) {\n if (i != j) {\n int[] shift = new int[rowSize];\n System.arraycopy(combo, 0, shift, 0, rowSize);\n shift[i] = combo[i] - 1;\n shift[j] = combo[j] + 1;\n key = rowCombo2Key(shift);\n if (!set.contains(key)) {\n rowKeys2combo[counter] = key;\n rowKeys.put(key, counter++);\n set.add(key);\n next.add(shift);\n }\n }\n }\n }\n }\n }\n }\n return genKeyLink(splitIdx, rowKeys2combo);\n }", "@Test\n public void testSplittingSoillayer6() throws IOException, Exception {\n HashMap<String, Object> data = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(data, \"sllb\", \"255\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.31\");\n \n HashMap<String, Object> expectedData = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"5\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"15\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"75\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"135\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"195\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"255\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.31\");\n ArrayList<HashMap<String, String>> expectedLayers = MapUtil.getBucket(expectedData, \"soil\").getDataList();\n\n ArrayList<HashMap<String, String>> result = SoilHelper.splittingSoillayer(data, false);\n \n assertEquals(\"getRootDistribution: soil one layer case is incorrect \", expectedLayers, result);\n \n log.info(\"getRootDistribution() output: {}\", result.toString());\n }", "public ArrayList<InstanceList> getSets(int i) {\n InstanceList learningSet = new InstanceList(classInstances, numInstances - TEST_SET_1 + 1);\n InstanceList validationSet = new InstanceList(classInstances, TEST_SET_1);\n for (int divideIndex = 0; divideIndex < numInstances; divideIndex++) {\n\n if (log.isInfoEnabled()) {\n log.info(\"index \" + divideIndex + \" fold_size\" + TEST_SET_1 + \" = from \" + TEST_SET_0 + \" to \" + TEST_SET_1 + \" num_instances \" + numInstances + \"\\n\");\n }\n if (divideIndex >= TEST_SET_0 && divideIndex <= TEST_SET_1) { // validation\n // validation [fold_size*i, fold_size*(i+1))\n if (log.isInfoEnabled()) {\n log.info(\"validation one \" + divideIndex + \"\\n\");\n }\n validationSet.addAsInstance(classInstances.getInstance(crossedSet[divideIndex]));\n } else { // learninf part \n learningSet.addAsInstance(classInstances.getInstance(crossedSet[divideIndex]));\n }\n }\n\n ArrayList<InstanceList> lists = new ArrayList<InstanceList>(2);\n lists.add(learningSet);\n lists.add(validationSet);\n return lists;\n }", "@Test\n\tpublic void lowerLeft2SWCSpecial()\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 112);\n\t\td.set(1, 113);\n\t\td.set(13, 101);\n\t\td.set(14, 102);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(114);\n\t\tassertTrue(2==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 1==test_arr.get(1).getX() && 10==test_arr.get(1).getY());\n\t}", "private GeometryCollection computeGeometrySplit( \n final Geometry featureGeometryOnMapCrs,\n final Geometry clippingGeometryOnMapCrs,\n final CoordinateReferenceSystem mapCrs ) \n throws SOProcessException {\n\n try {\n // does the difference \n Geometry geoDiff = featureGeometryOnMapCrs.difference(clippingGeometryOnMapCrs);\n assert geoDiff instanceof GeometryCollection;\n \n GeometryCollection geoCollection = (GeometryCollection) geoDiff;\n\n return geoCollection;\n \n } catch (Exception e) {\n final String msg = e.getMessage();\n LOGGER.severe(msg);\n throw new SOProcessException(msg);\n }\n }", "private void drawBooksAndTitles(int spaceBetweenShelves, int dimCanvasX, int thiknessEdges, int shelfWidth,\r\n\t\t\tboolean leaning, List<Shape> shelves, String bColor) {\r\n\t\tList<Shape> bookShapes = new ArrayList<>();\r\n\t\tint idealWidth = (int) (0.6 * (shelfWidth / library.getShelves().get(0).getBooks().size()));\r\n\t\tint idealHeight = (int) (0.8 * spaceBetweenShelves);\r\n\t\tint placeLeftInShelf = shelfWidth;\r\n\t\tint shelfNumber = 1;\r\n\t\tRandom randomGenerator = new Random();\r\n\t\tint counterBooks = library.getShelves().get(shelfNumber - 1).getBooks().size();\r\n\t\tfor (Book book : library.getListOfAllTheBooks()) {\r\n\t\t\tShape bookShape = null;\r\n\t\t\tint randomWidth = idealWidth + randomGenerator.nextInt(30);\r\n\t\t\tint randomHeightGap = randomGenerator.nextInt(50);\r\n\t\t\tint heightSup = idealHeight + randomHeightGap;\r\n\t\t\tif (heightSup > spaceBetweenShelves) {\r\n\t\t\t\theightSup = spaceBetweenShelves;\r\n\t\t\t}\r\n\t\t\tsetSizeBook(spaceBetweenShelves, shelfWidth, book, idealWidth, idealHeight, randomWidth, heightSup);\r\n\t\t\tint width = book.getWidth();\r\n\t\t\tint height = book.getHeight();\r\n\r\n\t\t\tif (placeLeftInShelf <= width) {\r\n\t\t\t\t// go to another shelf\r\n\t\t\t\tplaceLeftInShelf = shelfWidth;\r\n\t\t\t\tshelfNumber++;\r\n\t\t\t}\r\n\t\t\tint bookX = dimCanvasX - thiknessEdges - placeLeftInShelf;\r\n\t\t\tint bookY = shelfNumber * thiknessEdges + (shelfNumber - 1) * spaceBetweenShelves + spaceBetweenShelves\r\n\t\t\t\t\t- height;\r\n\t\t\tbookShape = new Rectangle(bookX, bookY, width, height);\r\n\t\t\tbookShapes.add(bookShape);\r\n\t\t\tcounterBooks--;\r\n\t\t\tif (counterBooks == 0) {\r\n\t\t\t\t// go to another shelf\r\n\t\t\t\tplaceLeftInShelf = shelfWidth;\r\n\t\t\t\tshelfNumber++;\r\n\t\t\t\tif (shelfNumber < library.getShelves().size()) {\r\n\t\t\t\t\tcounterBooks = library.getShelves().get(shelfNumber - 1).getBooks().size();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tplaceLeftInShelf -= width;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint indexShelf = 0;\r\n\t\tint indexBook = 0;\r\n\t\tplaceLeftInShelf = shelfWidth;\r\n\t\tfor (Shape bookShape : bookShapes) {\r\n\t\t\tdouble YOfTheShelf = shelves.get(indexShelf).getBounds().getY();\r\n\t\t\tboolean isLastBookOfTheShelf = (indexBook + 1)\r\n\t\t\t\t\t% library.getShelves().get(indexShelf).getBooks().size() == 0;\r\n\t\t\tint[] table = drawBook(randomGenerator, isLastBookOfTheShelf, bookShape,\r\n\t\t\t\t\tlibrary.getShelves().get(indexShelf).getBooks().get(indexBook), placeLeftInShelf, YOfTheShelf,\r\n\t\t\t\t\tleaning, bColor);\r\n\t\t\tlastColorIndex = table[2];\r\n\t\t\tint bookRotation = table[0];\r\n\t\t\tdouble bookX = bookShape.getBounds().getX();\r\n\t\t\tdouble bookY;\r\n\t\t\tif (isLastBookOfTheShelf) {\r\n\t\t\t\tbookY = table[1];\r\n\t\t\t} else {\r\n\t\t\t\tbookY = bookShape.getBounds().getY();\r\n\t\t\t}\r\n\t\t\tdouble bookHeight = bookShape.getBounds().getHeight();\r\n\t\t\tdouble bookWidth = bookShape.getBounds().getWidth();\r\n\t\t\tString bookTitle = library.getShelves().get(indexShelf).getBooks().get(indexBook).getTitle();\r\n\t\t\tString authorFirstName = library.getShelves().get(indexShelf).getBooks().get(indexBook).getAuthor()\r\n\t\t\t\t\t.getFirstName();\r\n\t\t\tString authorLastName = library.getShelves().get(indexShelf).getBooks().get(indexBook).getAuthor()\r\n\t\t\t\t\t.getLastName();\r\n\t\t\tint bookYear = library.getShelves().get(indexShelf).getBooks().get(indexBook).getYear();\r\n\t\t\tString bookString = bookTitle + \" - \" + authorFirstName + \" \" + authorLastName + \" - \" + bookYear;\r\n\t\t\tdrawTitle(bookRotation, bookString, bookShape, bookX, bookY, indexBook, bookHeight, bColor, bookWidth);\r\n\t\t\tif (isLastBookOfTheShelf) {\r\n\t\t\t\tindexShelf++;\r\n\t\t\t\tindexBook = 0;\r\n\t\t\t\tplaceLeftInShelf = shelfWidth;\r\n\t\t\t} else {\r\n\t\t\t\tindexBook++;\r\n\t\t\t\tplaceLeftInShelf -= bookShape.getBounds().getWidth();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Test\n public void testSplittingSoillayer5() throws IOException, Exception {\n HashMap<String, Object> data = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(data, \"sllb\", \"5\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(data, \"sllb\", \"15\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.26\");\n AcePathfinderUtil.insertValue(data, \"sllb\", \"50\");\n AcePathfinderUtil.insertValue(data, \"slbdm\", \"1.3\");\n \n HashMap<String, Object> expectedData = new HashMap<String, Object>();\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"5\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.16\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"15\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.26\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"27\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.3\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"39\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.3\");\n AcePathfinderUtil.insertValue(expectedData, \"sllb\", \"50\");\n AcePathfinderUtil.insertValue(expectedData, \"slbdm\", \"1.3\");\n ArrayList<HashMap<String, String>> expectedLayers = MapUtil.getBucket(expectedData, \"soil\").getDataList();\n\n ArrayList<HashMap<String, String>> result = SoilHelper.splittingSoillayer(data, false);\n \n assertEquals(\"getRootDistribution: soil top layer case 3 is incorrect \", expectedLayers, result);\n \n log.info(\"getRootDistribution() output: {}\", result.toString());\n }", "public List<Integer> partitionLabels(String S) {\n List<Integer> sizes = new ArrayList<>();\n\n int[] lastIndex = new int[26]; //cuz only lower case letters will be given to us\n\n //finding the lastIndexes of all the characters in the given string so that inside the loop start->end, we don't have to\n //do S.lastIndexOf('someCharacter') over & over cuz if we do that than the solution will be O(n^2) cuz string.lastIndexOf loops\n //through the string everytime it needs to find the last occurance & if the character happens to be at the end of the string\n //than it'll string.lastIndexOf would have to loop through the entire string over and over inside the start->end loop\n for(int i=0; i< S.length(); i++) {\n //subtracting the current character from a that's how we can map the lower case letters to an array of 26 Eg. 'a' -'a' = 0, 'b' -'a' = 1 so on and so forth. Otherwise we can also use an array of length 128 and loop from 97->122 but the array slots from 0->97 & 123->128 will be taking memory for nothing\n lastIndex[S.charAt(i) - 'a'] = i;\n }\n\n int start=0, end = 0, extendedEnd = 0;\n while(start < S.length()) {\n char startCharacter = S.charAt(start);\n end = lastIndex[startCharacter - 'a'];\n extendedEnd = end;\n\n for(int i=start; i<end; i++) {\n\n //checking if the current character that lies in the window start till end has last occurance index that's greater than current end, than we extend end.\n //NOTE: if we don't check the occurance like lastIndex[S.charAt(i)- 'a'] instead we check it like lastIndex[i], we won't be getting correct answer cuz lastIndex[] contains last occurances of characters from a-z\n //the characters in String S might not occur in the order a-z. They'll be jumbled across the string.\n //therefore in order to get the last occurance of current character, we do it like lastIndex[S.charAt(i)- 'a']\n if(lastIndex[S.charAt(i)- 'a'] > end) {\n extendedEnd = lastIndex[S.charAt(i)- 'a'];\n end = extendedEnd;\n }\n }\n\n sizes.add((extendedEnd - start + 1));\n start = extendedEnd + 1;\n }\n\n return sizes;\n }", "@Test\n\tpublic void upperLeft2SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 2);\n\t\td.set(1, 3);\n\t\td.set(2, 4);\n\t\td.set(13, 13);\n\t\td.set(15, 14);\n\t\td.set(16, 15);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(5);\n\t\tassertTrue(3==test_arr.get(0).getX() && 0==test_arr.get(0).getY()\n\t\t\t&& 2==test_arr.get(1).getX() && 0==test_arr.get(1).getY()\n\t\t\t&& 1==test_arr.get(2).getX() && 0==test_arr.get(2).getY());\n\t}", "@Test\n\tpublic void upperLeft1SWCSpecial()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(5, 12);\n\t\td.set(1, 23);\n\t\td.set(13, 13);\n\t\td.set(14, 24);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(34);\n\t\tassertTrue(0==test_arr.get(0).getX() && 2==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 1==test_arr.get(1).getY());\n\t}", "public void findBoundary(boolean useDestinations)\r\n\t{\n\tdouble maxSpacing = res/5.0;\r\n\tif(maxSpacing<1) maxSpacing = 1;\r\n\t\r\n\t//First make sure point sampling is dense enough:\t\r\n\tVector<Int2d> surfaceT = new Vector<Int2d>();\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tsurfaceT.add(p);\r\n\t\tInt2d p2 = surface.get((it+1)%sl);\r\n\t\tdouble pdist = p2.distance(p);\r\n\t\tif(pdist > maxSpacing)\r\n\t\t\t{\r\n\t\t\t// populate this line segment with points\r\n\t\t\tint extraPoints = (int)(pdist/maxSpacing); // - 2 cause we already have 2 points\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<extraPoints; i++)\r\n\t\t\t\t{\r\n\t\t\t\tInt2d pN = new Int2d(p);\r\n\t\t\t\tInt2d diff = new Int2d();\r\n\t\t\t\tdiff.sub(p2,p);\r\n\t\t\t\tpN.scaleAdd((double)(i+1.)/(extraPoints+1.),diff,pN);\r\n\t\t\t\tsurfaceT.add(pN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t//System.out.println(\"got here2.1\");\r\n\tsurface = surfaceT;\r\n\tcanvas1.surface = surface;\r\n\tsl = surfaceT.size();\r\n\t\t\r\n\t//System.out.println(sl);\r\n\t\r\n\t\t\t\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tint i = (int)(p.x/res);\r\n\t\tint j = (int)(p.y/res);\r\n\t\tboolean extraWide = false;\r\n\t\tboolean extraHigh = false;\t\t\r\n\t\t\r\n\t\tif((p.y % res) == 0)\r\n\t\t\t{\r\n\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\textraHigh = true;\r\n\t\t\t}\r\n\t\tif((p.x % res) == 0)\r\n\t\t\t{\r\n\t\t\textraWide = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\tint len = 4;\r\n\t\tif(extraWide && extraHigh) len = 9;\r\n\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\r\n\t\tInt2d[] pi = new Int2d[len];\r\n\t\tint[] ic = new int[len];\r\n\t\tint[] jc = new int[len];\r\n\t\t\r\n\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\r\n\t\tfor(int c=0; c<len; c++)\r\n\t\t\t{\r\n\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t{\r\n\t\t\t\tif(!useDestinations)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t//else phi[ic[c]][jc[c]] = -phiStart;\r\n\t\t\t\t// Way suggested in paper, but this looks bad with interpolation\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(\"got here2.2\");\r\n\t\t\r\n\tif(useDestinations) //Use destinations\r\n\t\t{\t\t\r\n\t\t// Sets destination point distances accordingly\r\n\t\t\r\n\t\tint dl = destinations.size();\r\n\t\tfor(int it=0; it<dl; it++)\r\n\t\t\t{\r\n\t\t\tInt2d p = destinations.get(it);\r\n\t\t\tint i = (int)(p.x/res);\r\n\t\t\tint j = (int)(p.y/res);\r\n\t\t\tboolean extraWide = false;\r\n\t\t\tboolean extraHigh = false;\t\t\r\n\t\t\t\r\n\t\t\tif((p.y % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\t\textraHigh = true;\r\n\t\t\t\t}\r\n\t\t\tif((p.x % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\textraWide = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tint len = 4;\r\n\t\t\tif(extraWide && extraHigh) len = 9;\r\n\t\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\t\r\n\t\t\tInt2d[] pi = new Int2d[len];\r\n\t\t\tint[] ic = new int[len];\r\n\t\t\tint[] jc = new int[len];\r\n\t\t\t\r\n\t\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\t\r\n\t\t\tfor(int c=0; c<len; c++)\r\n\t\t\t\t{\r\n\t\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\tint bl = boundary.size();\r\n\t/*\r\n\tfor(int k=0; k<bl; k++)\r\n\t\t{\r\n\t\tSystem.out.println(boundary.get(k).x + \", \" + boundary.get(k).y + \": element \" + k);\r\n\t\t}\r\n\t\t*/\r\n\t\t\t\r\n\tfor(int i=0; i<bl; i++)\r\n\t\t{\r\n\t\tInt2d pi = boundary.get(i);\r\n\t\tpi.phi = phi[pi.x][pi.y];\r\n\t\t}\r\n\t}", "@Test\n\tpublic void southSWC()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(32, 103);\n\t\td.set(33, 104);\n\t\td.set(34, 113);\n\t\td.set(35, 106);\n\t\td.set(36, 107);\n\t\td.set(1, 114);\n\t\td.set(2, 115);\n\t\td.set(3, 116);\n\t\td.set(4, 117);\n\t\td.set(5, 118);\n\t\td.set(19, 119);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(119);\n\t\tassertTrue(7==test_arr.get(0).getX() && 10==test_arr.get(0).getY()\n\t\t\t&& 6==test_arr.get(1).getX() && 10==test_arr.get(1).getY()\n\t\t\t&& 5==test_arr.get(2).getX() && 10==test_arr.get(2).getY()\n\t\t\t&& 4==test_arr.get(3).getX() && 10==test_arr.get(3).getY()\n\t\t\t&& 3==test_arr.get(4).getX() && 10==test_arr.get(4).getY());\n\t}", "public boolean isLineSplitBy(TessSeg s1)\r\n {\r\n if (!isLineHit(s1))\r\n {\r\n return false;\r\n }\r\n \r\n if (isPointOnLine(s1.c0)\r\n && !c0.equals(s1.c0) && !c1.equals(s1.c0))\r\n {\r\n return true;\r\n }\r\n \r\n if (isPointOnLine(s1.c1)\r\n && !c0.equals(s1.c1) && !c1.equals(s1.c1))\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "private double determineResampleSpacing(List<Point> pts) {\n\n\t\tdouble minX = Double.POSITIVE_INFINITY;\n\t\tdouble maxX = Double.NEGATIVE_INFINITY;\n\t\tdouble minY = Double.POSITIVE_INFINITY;\n\t\tdouble maxY = Double.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < pts.size() - 1; i++) {\n\t\t\tdouble x = pts.get(i).getX();\n\t\t\tdouble y = pts.get(i).getY();\n\n\t\t\tif (x < minX)\n\t\t\t\tminX = x;\n\t\t\tif (x > maxX)\n\t\t\t\tmaxX = x;\n\t\t\tif (y < minY)\n\t\t\t\tminY = y;\n\t\t\tif (y > maxY)\n\t\t\t\tmaxY = y;\n\t\t}\n\n\t\tdouble diagonal = Math.sqrt(Math.pow(maxX - minX, 2)\n\t\t\t\t+ Math.pow(maxY - minY, 2));\n\n\t\tdouble spacing = diagonal / IShortStrawThresholds.S_PTS_PER_DIAGONAL;\n\n\t\treturn spacing;\n\t}", "@Test\n\tpublic void kingSWC() \n\t{\n\t\tData d = new Data();\n\t\td.set(19, 35);\n\t\td.set(21, 46);\n\t\td.set(23, 89);\n\t\td.set(27, 68);\n\t\td.set(29, 79);\n\t\td.set(0, 34);\n\t\td.set(2, 45);\n\t\td.set(3, 56);\n\t\td.set(4, 67);\n\t\td.set(5, 78);\n\t\td.set(31, 23);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(23);\n\t\tassertTrue(0==test_arr.get(0).getX() && 4==test_arr.get(0).getY()\n\t\t\t&& 0==test_arr.get(1).getX() && 5==test_arr.get(1).getY()\n\t\t\t&& 0==test_arr.get(2).getX() && 6==test_arr.get(2).getY()\n\t\t\t&& 0==test_arr.get(3).getX() && 7==test_arr.get(3).getY());\n\t}", "Landscape(int scl_, int w_, int h_) {\n scl = scl_;\n w = w_;\n h = h_;\n cols = w/scl;\n rows = h/scl;\n z = new float[cols][rows];\n }", "int getSplitAxis();", "public static List<Partition> partition(PointSet points, int m) {\n\t\tPartition A = new Partition();\n\t\tint nFeatures = points.dimension();\n\t\tif(m > points.size())\n\t\t\tthrow new RuntimeException(\"Not enough points to make \" + m + \" partitions\");\n\t\tfor(Point p : points) {\n\t\t\tA.add(p);\n\t\t}\n\t\t\n\t\tList<Partition> S = new ArrayList<>();\n\t\tS.add(A);\n\t\tcalculateDissimilarity(A, nFeatures);\n\t\tint i = 1;\n\t\twhile(i < m) {\n\t\t\tint j = 0;\n\t\t\tfor(int k = 1; k < S.size(); k++)\n\t\t\t\tif(S.get(k).dissimilarity > S.get(j).dissimilarity)\n\t\t\t\t\tj = k;\n\t\t\tPartition Aj = S.get(j);\n\t\t\tPartition Aj1 = new Partition();\n\t\t\tPartition Aj2 = new Partition();\n\t\t\t//partition\n\t\t\tfor(Point p : Aj) {\n\t\t\t\tif(p.feature(Aj.pj) <= Aj.apj + Aj.dissimilarity/2)\n\t\t\t\t\tAj1.add(p);\n\t\t\t\telse\n\t\t\t\t\tAj2.add(p);\n\t\t\t}\n\t\t\tcalculateDissimilarity(Aj1, nFeatures);\n\t\t\tcalculateDissimilarity(Aj2, nFeatures);\n\t\t\tS.remove(Aj);\n\t\t\tS.add(Aj1);\n\t\t\tS.add(Aj2);\n\t\t\ti++;\n\t\t}\n\t\treturn S;\n\t}", "void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }", "private ArrayList<String> splitHelper(ArrayList<String> accumulator, String remainder, int width, FontMetrics metrics){\n if (metrics.stringWidth(remainder) + 100 < width){\n accumulator.add(remainder);\n return accumulator;\n }\n int i = 0;\n while (metrics.stringWidth(remainder.substring(0,i++)) + 100 < width){}\n while (remainder.charAt(i--) != ' '){}\n accumulator.add(remainder.substring(0,++i));\n return splitHelper(accumulator,remainder.substring(i),width,metrics);\n }", "public SplitLine(\n Relationship inConnector, Segment inSegment, double x, double y, Controller inController) {\n relationship = (Relationship) inConnector;\n controller = inController;\n splitSegment = inSegment;\n pivot = new Pivot(relationship, x, y);\n if (relationship instanceof Dependency) {\n newSegment = new Segment(splitSegment.getStart(), pivot, true);\n } else {\n newSegment = new Segment(splitSegment.getStart(), pivot);\n }\n doInitialAction();\n }", "private void subDivideNode() {\n setOriginNode();\n _subdivided = true;\n _northWest = new QuadTree<Point>(getView(), _transitionSize);\n _northEast = new QuadTree<Point>(getView(), _transitionSize);\n _southWest = new QuadTree<Point>(getView(), _transitionSize);\n _southEast = new QuadTree<Point>(getView(), _transitionSize);\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n QuadTree<Point> qt = quadrant(p);\n qt.add(p);\n }\n _elements = null;\n _elementsSize = 0;\n }", "@Test\r\n public void testGetEnclosingShapes() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n assertEquals(expectedOutput, screen.getEnclosingShapes(new Point(5, 5)));\r\n }", "Vector selectBestSegPtsSet(Vector IterWiseSegPts){\n\t\tVector Vect = new Vector();\t\t\t// to return final set of segment pts\n\t\tVector TempVect = new Vector(); // to store temporary iteration results\n\t\tint index = -1;\n\t\t// if it consists of only common pts\n\t\tif(IterWiseSegPts.size() == 1) {\n\t\t\tindex = 0;\n\t\t}\n\t\t\n\t\t//if it consists of only two segment pt sets \n\t\telse if(IterWiseSegPts.size() == 2){\n\t\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, 0);\n\t\t\tdouble PrevError = (Double)TempVect.get(TempVect.size()-1);\n\t\t\tTempVect = clearVector(TempVect);\n\t\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, 1);\n\t\t\tdouble NewError = (Double)TempVect.get(TempVect.size()-1);\n\t\t\tTempVect = clearVector(TempVect);\n\t\t\t\n\t\t\tif((PrevError - NewError) > 100.0){ //selecting the second set if error reduction is > 100.0\n\t\t\t\tindex = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t}\n\t\telse if(IterWiseSegPts.size() > 2){\n\t\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, 0);\n\t\t\tdouble PrevError = (Double)TempVect.get(TempVect.size()-1);\n\t\t\tTempVect = clearVector(TempVect);\n\t\t\t\n\t\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, 1);\n\t\t\tdouble NewError = (Double)TempVect.get(TempVect.size()-1);\n\t\t\tTempVect = clearVector(TempVect);\n\t\t\tdouble ChangeInPrevError = PrevError - NewError;\n\t\t\tdouble ChangeInNewError;\n\t\t\tPrevError = NewError;\n\t\t\tif(ChangeInPrevError < 15.0){ //selecting the first set if change in error is < 30.0\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint Iterator = 2;\n\t\t\t\tint Iterations = IterWiseSegPts.size();\n\t\t\t\twhile(Iterator < Iterations){\n\t\t\t\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, Iterator);\n\t\t\t\t\tNewError = (Double)TempVect.get(TempVect.size()-1);\n\t\t\t\t\tTempVect = clearVector(TempVect);\n\t\t\t\t\tChangeInNewError = PrevError - NewError;\n\t\t\t\t\t// if new iteration's error is less (or more) than prev itertion within 30.0 \n\t\t\t\t\t// or if previous change in segment pts Error > 3 times new change in segment pts error\n\t\t\t\t\tif( (ChangeInNewError < 30.0) && (NewError < 1000.0)){// (ChangeInPrevError > (3 * ChangeInNewError))\n\t\t\t\t\t\tindex = Iterator - 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tChangeInPrevError = ChangeInNewError;\n\t\t\t\t\tPrevError = NewError;\n\t\t\t\t\tIterator++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t//}\n\t\tTempVect = clearVector(TempVect);\n\t\tTempVect = copyVectorIndex(IterWiseSegPts, TempVect, index);\n\t\t//TempVect = copyVectorIndex(IterWiseSegPts, TempVect, IterWiseSegPts.size() -1);\n\t\tindex = 0;\n\t\twhile(index < (TempVect.size()-1)){\n\t\t\tVect.add((Integer)TempVect.get(index++));\n\t\t}\n\t\treturn Vect;\n\t}", "private int chunks(List<Integer> S){\n\t\tint c = 1;\n\t\tfor(int i = 0; i < S.size() -1; i++) {\n\t\t\tif(comps(S.get(i), S.get(i+1)) && S.get(i+1) < S.get(i)){\t\t\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}", "public LineSegment[] segments(){\n\t\tPoint[] ptArr = new Point[numpoints];\n\t\tfor(int i =0; i < numpoints; i++){\n\t\t\tfor(int j =0; j < numpoints;j++) ptArr[j] = mypoints[j];\n\t\t\tPoint origin = mypoints[i];\t\t\n\t\t\t//Sort the points using mergeSort for doubles\n\t\t\tArrays.sort(ptArr,origin.slopeOrder());\t\n\t\t\tfindAllCollinearPts(ptArr,origin);\n\t\t}\n\t\treturn getSegments();\n\t}", "@SuppressWarnings(\"unused\")\r\n private void beforeMarshal (Marshaller m)\r\n {\r\n // Convert sections -> ids\r\n if (sets != null) {\r\n descSets = new ArrayList<>();\r\n\r\n for (Collection<Section> set : sets) {\r\n SectionDescSet descSet = new SectionDescSet();\r\n\r\n for (Section section : set) {\r\n descSet.sections.add(\r\n new SectionDesc(\r\n section.getId(),\r\n section.getOrientation()));\r\n }\r\n\r\n descSets.add(descSet);\r\n }\r\n }\r\n }", "private void splitCaseBase(Collection<CBRCase> holeCaseBase, List<CBRCase> querySet, List<CBRCase> casebaseSet, int testPercent)\n {\n querySet.clear();\n casebaseSet.clear();\n \n int querySetSize = (holeCaseBase.size() * testPercent) / 100;\n casebaseSet.addAll(holeCaseBase);\n \n \n for(int i=0; i<querySetSize; i++)\n {\n int random = (int) (Math.random() * casebaseSet.size());\n CBRCase _case = casebaseSet.get( random );\n casebaseSet.remove(random);\n querySet.add(_case);\n }\n }", "public void split(int[] points, Object[] pieces)\n {\n int point0, point1;\n point0 = 0; point1 = points[0];\n for(int x=0;x<pieces.length;x++)\n {\n pieces[x] = new boolean[point1-point0];\n System.arraycopy(genome,point0,pieces[x],0,point1-point0);\n point0 = point1;\n if (x >=pieces.length-2)\n point1 = genome.length;\n else point1 = points[x+1];\n }\n }" ]
[ "0.5180378", "0.51489747", "0.5139369", "0.5049079", "0.49181244", "0.4909552", "0.4895872", "0.48942578", "0.4848455", "0.48319036", "0.482705", "0.47247523", "0.46940333", "0.4681046", "0.46783274", "0.4674645", "0.46686304", "0.46680278", "0.46542528", "0.46084777", "0.459671", "0.45767444", "0.45735872", "0.45551932", "0.45423388", "0.45326236", "0.4505429", "0.44955346", "0.44953746", "0.4485216", "0.44534558", "0.44531366", "0.44465092", "0.44460148", "0.44403052", "0.44338524", "0.4421898", "0.44168916", "0.43962783", "0.43950573", "0.43940678", "0.43903422", "0.43889695", "0.43830493", "0.43784347", "0.43782288", "0.43624705", "0.4353947", "0.43516093", "0.43441474", "0.43434542", "0.4337556", "0.4335809", "0.4325142", "0.43247455", "0.43213937", "0.43207416", "0.43110615", "0.43079433", "0.43018335", "0.42996058", "0.4287741", "0.4286636", "0.4286071", "0.42847115", "0.4279623", "0.42743796", "0.42738926", "0.4270784", "0.42650965", "0.42633903", "0.42549616", "0.4252345", "0.4243918", "0.4242984", "0.42412362", "0.4241082", "0.42367336", "0.42348576", "0.42259365", "0.4224393", "0.42228556", "0.4217722", "0.42157626", "0.42143002", "0.4212125", "0.4205656", "0.42053926", "0.4197024", "0.41967168", "0.4192781", "0.41887707", "0.41879004", "0.41840893", "0.41778103", "0.41760856", "0.41758877", "0.4168113", "0.41661948", "0.41659856" ]
0.5788535
0
Booleans Checks whether a point p is contained in a list.
private boolean contains(List<PointList> list, PointList pList){ for (PointList p : list){ if (p.equals(pList)) return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean contains(Point p);", "public boolean containsPointList(final PointListPanel plp) {\n\t\tfinal Component[] c = panel.getComponents();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\tif (c[i] == plp) return true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean isInList(List<Point3D> pointsList, Point3D point) {\r\n for (Point3D tempPoint : pointsList) {\r\n if(point.isAlmostEquals(tempPoint))\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean contains(Point2D p) {\n return pointSet.contains(p);\n }", "public boolean isIn(Point p)\n {\n \n \treturn isIn(p.x, p.y);\n \t\n //\tboolean cond1 = false;\n // boolean cond2 = false; \n // cond1 = (p.x>=rettangoloX)&&(p.x<=(rettangoloX+larghezza));\n // cond2 = (p.y>=rettangoloY)&&(p.y<=(rettangoloY+altezza));\n // return (cond1&&cond2);\n }", "public boolean contains(PointF point)\n {\n return contains(point.x, point.y);\n }", "public boolean contains(Point2D p) {\n if (p == null) {\n throw new IllegalArgumentException(\"cannot query null pt\");\n }\n return pointsSet.contains(p);\n\n }", "public boolean isInList();", "public boolean contains(GJPoint2D p) {\n\t\treturn this.contains(p.x(), p.y());\n\t}", "public boolean contains(Point2D p) {\n if (p == null) {\n throw new IllegalArgumentException();\n }\n return points.contains(p);\n }", "public boolean contains(Point2D p) {\n return mPoints.contains(p);\n }", "@JsMethod(name = \"containsPoint\")\n public boolean contains(double p) {\n return p >= lo && p <= hi;\n }", "public boolean inside(final Point p)\n\t\t{\n\t\t\tif(obj.contains(p))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "public boolean contains(Point2D.Double p) {\n if(p.x <= middle.x + length/2.0 &&\n p.x >= middle.x - length/2.0 &&\n p.y <= middle.y + length/2.0 &&\n p.y >= middle.y - length/2.0) return true;\n else return false;\n }", "public boolean contains(Point point) {\n\t\treturn false;\r\n\t}", "public boolean contains(Point2D p) {\n\n if (p == null)\n throw new IllegalArgumentException(\"Got null object in contains()\");\n\n return point2DSET.contains(p);\n }", "public boolean contains(Point2D p) {\n\n\t\tif (p == null)\n\t\t\tthrow new IllegalArgumentException(\"arguemnt to contains() is null\");\n\t\treturn get(p) != null;\n\n\t}", "static boolean isInArray(Point p, ArrayList<Point> al, double d) {\n\t\tfor (Point pa : al) {\n\t\t\tif (isEqual(p, pa, d)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsPoint(Point p) {\n \treturn\n \t\tp.x >= x &&\n \t\tp.x <= x + width &&\n \t\tp.y >= y &&\n \t\tp.y <= y + height;\n }", "public boolean contains(Point2D p) \r\n\t{\r\n\t\treturn get(root, p) != null;\r\n\t}", "boolean contains(Polygon p);", "public boolean contains(Point p) {\n\t\tif ((p.y > (super.getY() - super.height/2)) && (p.x > (super.getX() - width/2)) && (p.y < (super.getY() + super.height/2 + super.height)) && (p.x < (super.getX() - width/2 + super.width))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(final Point2d p){\n return this.getDistance(p) < 0.0000000001;\n }", "public boolean containsPoint(Point p) {\n\t\treturn (p.x >= x && p.x <= (x + WIDTH)\n\t\t\t\t&& p.y >= y && p.y <= (y + HEIGHT));\n\t}", "public boolean contains(Point2D p) {\n if (p == null)\n throw new IllegalArgumentException(\"Input point is null\");\n if (isEmpty())\n return false;\n boolean isX = true;\n Node curr = root;\n int cmp;\n while (true) {\n if (curr.point.equals(p))\n return true;\n if (isX)\n cmp = Point2D.X_ORDER.compare(p, curr.point);\n else\n cmp = Point2D.Y_ORDER.compare(p, curr.point);\n if (cmp < 0) {\n if (curr.left == null)\n return false;\n curr = curr.left;\n }\n else {\n if (curr.right == null)\n return false;\n curr = curr.right;\n }\n isX = !isX;\n }\n }", "public boolean contains(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"Point is null or invalid\");\n return get(p) != null;\n }", "public boolean onPosition(Point p)\n {\n for(Point pellet : pellets) // iterate over all the pellets\n {\n if (pellet.equals(p))\n return true;\n }\n return false;\n }", "public abstract boolean containsPoint(int x, int y);", "public boolean contains(Point2D p)\n {\n if (p != null && !isEmpty())\n {\n Node current = root;\n while (current != null)\n {\n if (current.isVertical()) // compare by x\n {\n if (p.x() < current.getPoint().x())\n {\n current = current.getLeft();\n }\n else if (p.x() > current.getPoint().x())\n {\n current = current.getRight();\n }\n else // equal x, now compare y\n {\n if (p.y() == current.getPoint().y())\n {\n return true;\n }\n }\n }\n else // compare by y\n {\n if (p.y() < current.getPoint().y())\n {\n current = current.getLeft();\n }\n else if (p.y() > current.getPoint().y())\n {\n current = current.getRight();\n }\n else // equal y, now compare x\n {\n if (p.x() == current.getPoint().x())\n {\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "boolean contains();", "public boolean contains(Point2D p) {\n checkNull(p);\n if (size == 0) {\n return false;\n } else {\n Node n = root;\n while (n != null) {\n double cmp = comparePoints(p, n);\n if (cmp < 0) {\n n = n.leftOrBot;\n } else if (cmp == 0) {\n return true;\n } else {\n n = n.rightOrTop;\n }\n }\n }\n return false;\n }", "public boolean contains(Point point) {\n\t\treturn (point.x >= getX1() && point.y >= getY1() && point.x < getX2() && point.y < getY2());\n\t}", "public boolean contains(Point2D p) {\n if (isEmpty()) return false;\n return search1(root, p);\n }", "private boolean checkForPointInArr(ArrayList<Point> array, Point point){\n\t\tfor (int i = 0; i < array.size(); i++){\n\t\t\tPoint checkPoint = array.get(i);\n\t\t\tif (array.get(i).x == point.x && array.get(i).y == point.y){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Point2D p)\n {\n if (degree == 1)\n {\n return overlaps(corner[0], p) || overlaps(corner[1], p) || overlaps(corner[2], p);\n }\n else if (degree == 2)\n {\n Point tp = new Point((int) Math.round(p.getX()), (int) Math.round(p.getY()));\n return line.linePoints.contains(tp);\n }\n\n /*\n the following code judges whether a point is contained in a normal triangle, \n taking the on edge case as contained\n */\n double pv0 = edgeEquationValue(p, corner[1], corner[2]);\n /*\n if corner[0] and point p are on different sides of line from corner[1] to corner[2], \n p is outside of the triangle\n */\n if (pv0 * v0 < 0)\n {\n return false;\n }\n double pv1 = edgeEquationValue(p, corner[2], corner[0]);\n /*\n if vertex corner[1] and point p are on different sides of line from corner[2] to corner[0], \n p is outside of the triangle\n */\n if (pv1 * v1 < 0)\n {\n return false;\n }\n double pv2 = edgeEquationValue(p, corner[0], corner[1]);\n /*\n only left one case:\n if corner[1] and point p are on different sides of line from corner[2] to corner[0], \n p is outside of the triangle, otherwise p is contained in the triangle\n */\n return pv2 * v2 >= 0; // !(pv2 * v2 < 0)\n }", "private boolean in(Integer e, ArrayList<Integer> l) {\n for (int i=0; i<l.size();i++) {\n if (l.get(i) == e) {\n return true;\n }\n }\n return false;\n }", "boolean hasContains();", "public boolean testPoint(Point p){\n\t\tif(parents.contains(p)) return false;\n\t\treturn true;\n\t}", "public boolean includesPoint(Point p) {\n double ABC = getArea();\n double PAB = new Triangle(p, p1, p2).getArea();\n double PBC = new Triangle(p, p2, p3).getArea();\n double PAC = new Triangle(p, p1, p3).getArea();\n return abs(ABC - (PAB + PBC + PAC)) < 0.000000001;\n }", "public boolean contains(Point2D p) {\n if (p == null) throw new IllegalArgumentException();\n if (root == null) return false;\n\n return containsSubMethod(p, root);\n }", "boolean contains(ShortPoint2D position);", "public boolean contains(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"input p is null\");\n return contains(p, root);\n }", "public boolean contains(final Coords point)\r\n {\r\n return toRectangle().contains(point.toPoint());\r\n }", "public boolean containsPoint( Point p ) {\r\n return (( p.x > drawx-getWidth()/2) && ( p.x < drawx+getWidth()/2) \r\n && ( p.y > drawy-getHeight()/2) && ( p.y < drawy+getHeight()/2));\r\n }", "boolean hasList();", "public boolean contains(Point2D p) {\n if (p == null) {\n throw new NullPointerException();\n }\n if (bst.contains(p))\n return true;\n return false;\n }", "public boolean contains(Point2D p) {\n if (p == null) {\n throw new IllegalArgumentException();\n }\n return contains(this.root, p);\n }", "public boolean contains(Point2D p) \n\t {\n\t\t if(p==null)\n\t\t\t throw new java.lang.NullPointerException();\n\t\t if(root==null)\n\t\t\t return false;\n\t\t return contains(root,p,true);\n\t }", "default boolean contains(Vector3 point) {\r\n return contains(point.getX(), point.getY(), point.getZ());\r\n }", "public boolean containsProduct(String p){\n\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\tfor (int j = 0; j < list.get(i).getWishlist().size(); j++) {\n\t\t\t\tif( p.equals(list.get(i).getWishlist().get(j)) ){\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}", "Boolean checkIfPriceExist(ArrayList<Point> pointList ,float price)\n\t{\n\t\tint a=0;\n\t\twhile(a<pointList.size())\n\t\t{\n\t\t\tif (price==pointList.get(a).getPrice())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\ta++;\n\t\t}\n\t\treturn false;\n\t}", "private boolean containsSameCoord(Point p) {\n boolean elementsContainsP = false;\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point pt = it.next();\n if (x(pt) == x(p) && y(pt) == y(p)) {\n elementsContainsP = true;\n break;\n }\n }\n return elementsContainsP;\n }", "public boolean contains(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"contains: Point2D is null\");\n return containSearch(root, p, true);\n }", "@Override\n\tpublic boolean contains(Vec2f pnt) {\n\t\tboolean isIn = false;\n\t\tif (_shape != null) {\n\t\t\tisIn = _shape.contains(pnt);\n\t\t}\n\t\treturn isIn;\n\t}", "public boolean contains(Vector pt) {\r\n final double x = pt.getX();\r\n final double y = pt.getY();\r\n final double z = pt.getZ();\r\n return x >= this.getMinimumPoint().getBlockX() && x < this.getMaximumPoint().getBlockX() + 1\r\n && y >= this.getMinimumPoint().getBlockY() && y < this.getMaximumPoint().getBlockY() + 1\r\n && z >= this.getMinimumPoint().getBlockZ() && z < this.getMaximumPoint().getBlockZ() + 1;\r\n }", "private boolean contains(Point2D p, Node x) {\n if (x == null) return false;\n if (x.p.equals(p)) return true;\n if ((x.vertical && p.x() < x.p.x()) || (!x.vertical && p.y() < x.p.y())) {\n return contains(p, x.left);\n }\n else return contains(p, x.right);\n }", "@Test\n\tpublic void testContains() {\n\t\tLine l1 = new Line(0, 0, 1, 0);\n\t\tLine l2 = new Line(0, 0, 0, 1);\n\t\tLine l3 = new Line(0, 0, 1, 1);\n\t\tLine l4 = new Line(2.65, 0.3, 2.65, 0.9);\n\n\t\tassertTrue(\"l1 does not contain point (0.5, 0)\",\n\t\t\t\tl1.contains(new Coord(0.5, 0)));\n\t\tassertTrue(\"l2 does not contain point (0, 0.5)\",\n\t\t\t\tl2.contains(new Coord(0, 0.5)));\n\t\tassertTrue(\"l3 does not contain point (0.5, 0.5)\",\n\t\t\t\tl3.contains(new Coord(0.5, 0.5)));\n\n\t\tassertTrue(\n\t\t\t\t\"l4 does not contain (2.6499999999999995, 0.46083784792155075)\",\n\t\t\t\tl4.contains(new Coord(2.6499999999999995, 0.46083784792155075)));\n\n\t\t// Check endpoints for l1\n\t\tassertTrue(\"l1 does not contain point (0, 0)\",\n\t\t\t\tl1.contains(new Coord(0, 0)));\n\t\tassertTrue(\"l1 does not contain point (1, 0)\",\n\t\t\t\tl1.contains(new Coord(1, 0)));\n\t}", "public boolean contains(Point2D p) {\n if (p == null) throw new IllegalArgumentException(\"Attempted to search for null query\");\n return isItThisNode(root, p);\n }", "public boolean contain(Point p) {\n\t\tdouble n1, n2, n3, n4, n5, n6;\n\t\tPlane pl1, pl2, pl3, pl4, pl5, pl6;\n\t\tpl1 = new Plane(A1, B1, C1); // Mat phang A1.B1.C1.D1 (1)\n\t\tpl2 = new Plane(A1, B1, A2); // Mat phang A1.B1.B2.A2 (2)\n\t\tpl3 = new Plane(A1, D1, A2); // Mat phang A1.D1.D2.A2 (3)\n\t\tpl4 = new Plane(A2, pl1.getV()); // Mat phang A2.B2.C2.D2 (1)\n\t\tpl5 = new Plane(C1, pl2.getV()); // Mat phang C1.D1.D2.C2 (2)\n\t\tpl6 = new Plane(B1, pl3.getV()); // Mat phang B1.C1.C2.B2 (3)\n\n\t\tn1 = pl1.doSomething(p);\n\t\tn4 = pl4.doSomething(p);\n\n\t\tif (n1 * n4 > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\tn2 = pl2.doSomething(p);\n\t\tn5 = pl5.doSomething(p);\n\t\tif (n2 * n5 > 0f) {\n\t\t\treturn false;\n\t\t}\n\n\t\tn3 = pl3.doSomething(p);\n\t\tn6 = pl6.doSomething(p);\n\t\tif (n3 * n6 > 0f) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean contains(Point mousePt) {\r\n\t\treturn (p.x <= mousePt.x && mousePt.x <= (p.x + width + 1)\t&&\tp.y <= mousePt.y && mousePt.y <= (p.y + height + 1));\r\n\t}", "public boolean pointInside(Point2D p) {\n AffineTransform fullTransform = this.getFullTransform();\n AffineTransform inverseTransform = null;\n try {\n inverseTransform = fullTransform.createInverse();\n } catch (NoninvertibleTransformException e) {\n e.printStackTrace();\n }\n Point2D newPoint = (Point2D)p.clone();\n inverseTransform.transform(newPoint, newPoint);\n return rect.contains(newPoint); \n }", "@JsMethod(name = \"interiorContainsPoint\")\n public boolean interiorContains(double p) {\n return p > lo && p < hi;\n }", "private boolean contains(ArrayList<int[]> list, int[] element) {\n for (int[] temp : list) {\n if (temp[0] == element[0] && temp[1] == element[1]) {\n return true;\n }\n }\n return false;\n }", "private boolean isIntersect(List<Tuple> list1, List<Tuple> list2) {\n\t\tboolean intersect = false;\n\t\tfor (Tuple tuple : list1) {\n\t\t\tif (list2.contains(tuple)) {\n\t\t\t\tintersect = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn intersect;\n\t}", "public boolean boundsContains(double[] pt){\n return bounds.contains(pt);\n }", "public boolean contains2(Point p) {\n int crossings = 0;\n for (int i = 0; i < N; i++) {\n int j = i + 1;\n boolean cond1 = (a[i].y <= p.y) && (p.y < a[j].y);\n boolean cond2 = (a[j].y <= p.y) && (p.y < a[i].y);\n if (cond1 || cond2) {\n // need to cast to double\n if (p.x < (a[j].x - a[i].x) * (p.y - a[i].y) / (a[j].y - a[i].y) + a[i].x)\n crossings++;\n }\n }\n if (crossings % 2 == 1) return true;\n else return false;\n }", "private boolean mapContainsList(HashMap<String,String[]> map, List<String> list){\n\t\tboolean flag = true;\n\t\tSet<String> mapKeys = map.keySet();\n\t\tfor(String temp : list){\n\t\t\tif(!mapKeys.contains(temp)){\n\t\t\t\tflag = false;\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "public boolean contains ( Object o ){\n\n \tboolean doesContain = false;\n\n \tfor(int i = 0; i < list.size(); i++){\n\n if(list.get(i).equals(o)){\n doesContain = true;\n }\n\n }\n\n \treturn doesContain;\n\n }", "public boolean pointInside(Point2D p) throws NoninvertibleTransformException {\n AffineTransform fullTransform = this.getFullTransform();\n AffineTransform inverseTransform = null;\n inverseTransform = fullTransform.createInverse();\n Point2D newP = (Point2D)p.clone();\n inverseTransform.transform(newP, newP);\n return elp.contains(newP);\n }", "public boolean contains(List l) {\n if (lists.contains(l.obtainTitle())) return true;\n else return false;\n }", "public boolean search(Point p) {\n\t\tif(p == null) {\n\t\t\tSystem.out.println(\"Illegal point argument\");\n\t\t}\n\t\treturn search(head, p);\n\t}", "public boolean contains(Point p) {\n int winding = 0;\n for (int i = 0; i < N; i++) {\n int ccw = Point.ccw(a[i], a[i+1], p);\n if (a[i+1].y > p.y && p.y >= a[i].y) // upward crossing\n if (ccw == +1) winding++;\n if (a[i+1].y <= p.y && p.y < a[i].y) // downward crossing\n if (ccw == -1) winding--;\n }\n return winding != 0;\n }", "boolean hasAddressList();", "public boolean contains(float x, float y);", "public boolean contains(float x, float y);", "public boolean contains(Point mousePt) {\r\n\t\treturn (x <= mousePt.x && mousePt.x <= (x + width + 1)\t&&\ty <= mousePt.y && mousePt.y <= (y + height + 1));\r\n\t}", "private synchronized static boolean arrayList_contain(ArrayList<?> _arrayList, String url)\n\t{\n\t\treturn _arrayList.contains(url);\n\t}", "public boolean isInShape(Point p) \n\t{\n\t\tPoint centre = new Point((int)posX + diam/2, (int)posY + diam/2);\n\t\t//If distance between two points if less than or equal to radius, true is\n\t\t//returned\n\t\treturn p.distance(centre) <= diam/2;\n\t}", "public static boolean itContains(ArrayList<Integer> list, int n) {\r\n\t\tfor (Integer broj : list) {\r\n\t\t\tif (n == broj) {\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Ako ga nema vraca se false\r\n\t\treturn false;\r\n\t}", "public boolean contains(Point point) {\n return this.center.distance(point) <= this.r;\n }", "public boolean contains(Object o) {\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) return true;\n }\n return false;\n }", "public boolean containsPoint(Point pt)\n {\n\n // E[O(log(n))]\n if(_lineBVH != null)\n {\n throw new Error(\"Implement me Please!\");\n }\n else\n {\n // O(n).\n return _point_in_polygon_test(pt);\n }\n }", "public boolean pointInFlammableLocations(Point point) {\n for (Point location : fireLocations) {\n if (location == point) {\n return true;\n }\n }\n return false;\n }", "public boolean isInRange(Point testPt){\n\t\tfor(int i = 0; i < display.size();i++){\n\t\t\tif(testPt.x >= display.get(i).x && testPt.y >= display.get(i).y && testPt.x <= (display.get(i).x + display.get(i).width()) && testPt.y <= (display.get(i).y + display.get(i).height())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(Point pPtrRelPrnt, Point pCmpRelPrnt) {\n\t\tPoint loc = this.getLocation();\n\t\tint px = (int) pPtrRelPrnt.getX();\n\t\tint py = (int) pPtrRelPrnt.getY();\n\t\tint xLoc = (int) (pCmpRelPrnt.getX() + loc.getX());\n\t\tint yLoc = (int) (pCmpRelPrnt.getY() + loc.getY());\n\t\t\n\t\tif ((px >= xLoc) && (px <= xLoc + width) && (py >= yLoc) && (py <= yLoc + height)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasIsPartOf();", "public boolean inside(Point p) {\n\t\tif (p.getX() < boundingRect.getX() || p.getY() < boundingRect.getY()) return false;\n\t\tif (p.getX() > boundingRect.getX() + boundingRect.getW() || \n\t\t p.getY() > boundingRect.getY() + boundingRect.getH()) return false;\n\n\t\t// Create a line from the point to the left\n\t\tLine l = new Line(p.getX(), p.getY(), p.getX() - boundingRect.getW(), p.getY());\n\n\t\t// Count intersections\n\t\tint count= 0;\t\t\n\t\tfor(int i=0; i<lines.size(); i++ ) {\n\t\t\tif (lines.get(i).intersectsAt(l) != null) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n // We are inside if the number of intersections is odd\n\t\treturn count%2 == 1;\n\t}", "public boolean fits(Point p) {\n\t\treturn boundary.contains(p);\n\t}", "public boolean contains(Point2D p) {\n return search(root, p, ORIENTATION_VERTICAL) != null;\n }", "public boolean contains(CParamImpl param);", "public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean contains(double x, double y) {\n\t\tfor (GPoint point : points) {\n\t\t\tif (point.equals(x, y)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < size() - 1; i++) {\n\t\t\tGPoint p1 = points.get(i);\n\t\t\tGPoint p2 = points.get(i + 1);\n\t\t\tif (GLine.intersects(x, y, p1.getX(), p1.getY(), p2.getX(), p2.getY(), getLineWidth())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Point2D p2d) {\n return contains(root, p2d, true);\n }", "public boolean doesContain(T t) {\n if (Arrays.asList(a).contains(t)) {\n return true;\n } else {\n return false;\n }\n }", "Boolean contains(X x);", "private boolean containsPosition(Collection<Item> c, Position p) {\n return getItem(c, p) != null;\n }", "public boolean containsLocation(Location p) {\n\t\tint r = p.getRow();\n\t\tint c = p.getCol();\n\t\tint offR = r - topLeft.getRow();\n\t\tint offC = c - topLeft.getCol();\n\t\treturn 0 <= offR && offR < length && 0 <= offC && offC < width;\n\t}", "public boolean pointWhithin(Point point) {\n\t\treturn false;\n\t}", "public boolean contains(T elem) {\n return list.contains(elem);\n }", "public boolean checkLines(List<Point> as) {\n\t\treturn this.trk.containsAll(as);\n\t}" ]
[ "0.8109164", "0.7847007", "0.7596226", "0.73186177", "0.7318226", "0.72732276", "0.7165551", "0.7138271", "0.71353996", "0.7124289", "0.71016586", "0.70654637", "0.702025", "0.70001745", "0.6976669", "0.69637805", "0.69419986", "0.69153035", "0.6905234", "0.6888451", "0.687496", "0.68079615", "0.68051374", "0.6779402", "0.6779204", "0.6769455", "0.67670345", "0.67390937", "0.67169374", "0.67112446", "0.6703153", "0.6700906", "0.6668958", "0.6660699", "0.6657217", "0.66418356", "0.66398597", "0.6630657", "0.66228235", "0.6617933", "0.6611081", "0.66070306", "0.65877193", "0.65692884", "0.6567984", "0.6556882", "0.65494365", "0.65257293", "0.65085596", "0.650081", "0.6500479", "0.6492469", "0.6452525", "0.6437549", "0.6425606", "0.6395561", "0.6383962", "0.63710606", "0.636245", "0.6355441", "0.63517004", "0.6349539", "0.6348634", "0.63462985", "0.6322372", "0.6317151", "0.63163036", "0.63076246", "0.6274633", "0.62643385", "0.6257265", "0.6252791", "0.6251058", "0.6237571", "0.6237571", "0.6232772", "0.6217439", "0.62141204", "0.621399", "0.6204034", "0.6184671", "0.61752534", "0.6161335", "0.6148437", "0.613942", "0.61372554", "0.6125905", "0.6125016", "0.61164206", "0.61013526", "0.60934633", "0.6093384", "0.60932356", "0.6092231", "0.60849977", "0.60781664", "0.6073004", "0.60725045", "0.6066506", "0.6061512" ]
0.8311162
0
Setters Sets the current turnpike startpoint for the currently solved Basic problem.
private void setCurrentTurnpike(Point t){ _currentTurnpikeStart = t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStart(Point point) {\n mStart = point;\n }", "public void setStartPoint(int s) {\r\n\t\tstartPoint = s;\r\n\t}", "public void setStartX(float startX) {this.startX = startX;}", "@Override\n\tpublic void setStartPoint(Point startPoint) {\n\t\tthis.startPoint=startPoint;\n\t}", "private void setWorkmanPoint( int point ){\n\n callGetSliderAds();\n }", "public void setStart(int start) {\n this.start=start;\n }", "public void setStartPoint(CartesianCoordinate startPoint) {\r\n\t\tthis.startPoint = startPoint;\r\n\t}", "public void setStart(int start) {\r\n this.start = start;\r\n }", "public void setStartPoint(int x) {\n\t\tthis.x = x;\n\n\t}", "private void setStart(int a_x, int a_y)\n {\n if(!isObstacle(m_grid[a_x][a_y]))\n {\n if(m_startPoint != null)\n m_grid[(int)m_startPoint.x][(int)m_startPoint.y] = Map.NIL;\n\n m_startPoint = new Vector2d(a_x,a_y);\n m_grid[(int)m_startPoint.x][(int)m_startPoint.y] = Map.START;\n }\n }", "public void goToStart() {\n\t\tsetPosition(0);\n\t}", "void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }", "public void setStartX(double x)\n {\n startxcoord=x; \n }", "public void setStart(int start) {\n\t\tthis.start = start;\n\t}", "public void start(Point p);", "private void setPoints () {\n\t\tArrayList<Point> emptySpot = new ArrayList<Point>();\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\tif (maze[i][j] == 0) {\n\t\t\t\temptySpot.add(new Point (i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(emptySpot);\n\t\tthis.goal = emptySpot.get(0);\n\t\tdouble goalRange = this.goal.getX() + this.goal.getY();\n\t\tfor (int i = 1; i < emptySpot.size(); i++) {\n\t\t\tPoint playerStart = emptySpot.get(i);\n\t\t\tdouble playerRange = playerStart.getX() + playerStart.getY();\n\t\t\tif (Math.abs(playerRange - goalRange) > width/2)\n\t\t\tthis.playerStart = playerStart;\n\t\t}\n\t}", "public void setStart() {\r\n // this code handles all events for squares\r\n int x1 = this.origin.getX(); //origin point is used to keep track\r\n int y1 = this.origin.getY(); //of where the rectangle was first pressed\r\n int x2 = this.end.getX();\r\n int y2 = this.end.getY();\r\n int L = this.length;\r\n\r\n if (x1 >= x2 && y1 >= y2) {\r\n this.start = new Point(x1 - L, y1 - L);\r\n } else if (x1 >= x2 && y1 <= y2) {\r\n this.start = new Point(x1 - L, y1);\r\n } else if (x1 <= x2 && y1 >= y2) {\r\n this.start = new Point(x1, y1 - L);\r\n } else if (x1 <= x2 && y1 <= y2) {\r\n this.start = new Point(x1, y1);\r\n }\r\n }", "public void setStart(int start)\n {\n if(start >= 0)\n {\n this.start = start;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "public void testSetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n test = new Location(0, 1);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n test = new Location(2, 2);\n maze1.setCell(test, MazeCell.WALL);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n \n }", "public void setStartX(double val) {\r\n startx = val;\r\n }", "public void setStartingStudent(int playerIndex) {\n startingPlayer = playerIndex;\n }", "private void setStart()\n {\n for(int i = 0; i < cities.size(); i++)\n System.out.println(\"Location: \"+i+\" \"+cities.get(i).getSourceName());\n \n System.out.println(\"Which city would you like to start at? Enter the location number\"); \n computePaths(cities.get(input.nextInt()));\n printMenu(); \n }", "public void go_to_base_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_base, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n // Extend the arm after getting to the base position\n Dispatcher.get_instance().add_job(new JRunnable(() -> Pneumatics.get_instance().set_solenoids(true), this));\n hold_arm();\n }", "public void setStartPoint(AKeyCallPoint startPoint) {\n\t\t\tthis.startPoint = startPoint;\n\t\t}", "public void setStart( GeoPoint start ){\n this.setOrigin(start);\n }", "void moveToStart();", "public void setStart(long start) { this.start = start; }", "void setZeroStart();", "public void setStartPoint(Point2D p)throws NoninvertibleTransformException{\n if(p == null){\n start = null;\n fastestPath = null;\n removePointer(\"startPointIcon\");\n closeDirectionList();\n routePanel.getStartAddressField().setForeground(Color.gray);\n routePanel.getStartAddressField().setText(\"Enter start address\");\n return;\n }\n //Recalibrate position for precision\n Insets x = getInsets();\n p.setLocation(p.getX(), p.getY() - x.top + x.bottom);\n\n //Transform from screen coordinates to map Values.\n start = transformPoint(p);\n MapPointer startPoint = new MapPointer(start, \"startPointIcon\");\n addPointer(startPoint);\n if(end != null && start != null) //check if a route should be found.\n findFastestRoute(start, end);\n repaint();\n }", "public float getStartX() {return startX;}", "public void setDistanceToStart(double val) {\r\n startDistance = val;\r\n }", "void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }", "public void setGoal(Point point) {\n mGoal = point;\n }", "StepTracker(int minimum) {\n STEPS = minimum;\n day=0;\n activeDay=0;\n totalSteps=0;\n }", "public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }", "public Point getStartPoint() {\n\t\treturn startPoint;\n\t}", "public void setSetpoint(double setpoint);", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "public void setBeginPosition(FPointType fpt) {\n fptStart.x = fpt.x;\n fptStart.y = fpt.y;\n }", "@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupStartValues() {\n }", "public void setStart(int startId) throws IllegalArgumentException, IllegalStateException;", "private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }", "public Point start() {\r\n return this.start;\r\n }", "@Override\r\n\tpublic void startTurn() {\n\t\t\r\n\t}", "public Point getStart(){\n\t\treturn bigstart;\n\t}", "private void setMin(int min) { this.min = new SimplePosition(false,false,min); }", "public DriveForwardByVision(double setPoint) {\n\n\t\t// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTOR\n\t\t// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=VARIABLE_SETTING\n\t\tm_setPoint = setPoint;\n\n\t\t// RobotBuilder Version: 2.0\n\t\t//\n\t\t// This file was generated by RobotBuilder. It contains sections of\n\t\t// code that are automatically generated and assigned by robotbuilder.\n\t\t// These sections will be updated in the future when you export to\n\t\t// Java from RobotBuilder. Do not put any code or make any change in\n\t\t// the blocks indicating autogenerated code or it will be lost on an\n\t\t// update. Deleting the comments indicating the section will prevent\n\t\t// it from being updated in the future.\n\n\t\trequires(Robot.driveTrain);\n\n\t\t// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=REQUIRES\n\t}", "void setStartAt(final Long startAt);", "@Override\n\tpublic void mousePressed(MouseEvent me) {\n\t\tstartPoint = new Point(me.getX(),me.getY());\n\t}", "@Override\n public void setSetpoint(double setpoint) {\n if (getController() != null) {\n getController().setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }\n super.setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }", "public void resetX() {this.startX = 0f;}", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "public DiscoBug(int startingPlace)\n {\n corner = startingPlace; \n turns = 0;\n }", "void setStaStart(double staStart);", "private void setStartingPointToPhenotypingPlanDto(\n PlanBasicDataDTO planBasicDataDTO, Set<PlanStartingPoint> planStartingPoints)\n {\n assert planStartingPoints.size() == 1;\n PlanStartingPoint planStartingPoint = planStartingPoints.stream().findFirst().orElse(null);\n PlanStartingPointDTO planStartingPointDTO = planStartingPointMapper.toDto(planStartingPoint);\n planBasicDataDTO.setPlanStartingPointDTO(planStartingPointDTO);\n }", "public void adjustInitialPosition() {\n\n //TelemetryWrapper.setLine(1,\"landFromLatch...\");\n runtime.reset();\n double maxLRMovingDist = 200.0; //millimeters\n double increamentalDist = 50.0;\n while ( runtime.milliseconds() < 5000 ) {\n int loops0 = 0;\n while ((loops0 < 10) && ( mR.getNumM() == 0 )) {\n mR.update();\n loops0 ++;\n }\n if (mR.getNumM() <= 1) {\n int loops = 0;\n while ( mR.getNumM() <= 1 )\n driveTrainEnc.moveLeftRightEnc(increamentalDist, 2000);\n continue;\n } else if ( mR.getHAlignSlope() > 2.0 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED,Math.atan(mR.getHAlignSlope()),2000);\n continue;\n } else if (! mR.isGoldFound()) {\n\n driveTrainEnc.moveLeftRightEnc(increamentalDist,2000);\n continue;\n } else if ( mR.getFirstGoldAngle() > 1.5 ) {\n driveTrainEnc.spinEnc(AUTO_DRIVE_SPEED, mR.getFirstGoldAngle(),2000);\n continue;\n }\n }\n driveTrainEnc.stop();\n }", "public void setStartPoint(int activePlayer, ShortPoint2D pos) {\n\t\tthis.undoDelta.setStartPoint(activePlayer, playerStarts[activePlayer]);\n\t\tthis.playerStarts[activePlayer] = pos;\n\t}", "void setNilSingleBetMinimum();", "public void setAnswer_start(int answer_start) {\n this.answer_start = answer_start;\n }", "@Test\n public void testSetBeginNotInMap(){\n smallMaze.setBegin(Maze.position(26, 23));\n }", "private void start() // Start the game\n\t{\n\t\tdouble startingPlayerDecider = 0; // Used in the process of deciding who goes first.\t\n\n\t\tif (needToReset == true) // If the game needs to be reset...\n\t\t{\n\t\t\treset(); // Then do so..\n\t\t}\n\n\t\tswitch (gameState) // Check the state of the game and change the messages as needed.\n\t\t{\n\t\tcase waitingForStart:\n\t\t\tlabelGameState.setText(\"Welcome to dig for diamonds.\");\t\n\t\t\tbuttonStart.setText(\"Next\"); // The start button now acts as the next button.\n\t\t\tgameState = GameState.gameWelcome;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase gameWelcome:\n\t\t\tlabelGameState.setText(\"We shall now randomly decide who goes first.\");\t\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase decideWhoGoesFirst:\n\t\t\tswitch(totalPlayers) // Decide based on the number of players who goes first.\n\t\t\t{\n\t\t\tcase 2: // For two players...\n\t\t\t\tstartingPlayerDecider = control.randomNumber(100,0); // Generate a random number between 0 and 100\n\n\t\t\t\tif (startingPlayerDecider >= 50) // If it is greater then or equal to 50...\n\t\t\t\t{\n\t\t\t\t\tplayers.get(0).setIsPlayerTurn(true); // Player 1 goes first.\t\n\t\t\t\t\tlabelGameState.setText(\"Player 1 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayers.get(1).setIsPlayerTurn(true); // Else player two goes first.\n\t\t\t\t\tlabelGameState.setText(\"Player 2 shall go first this time.\");\t\n\t\t\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t\t\t\tgameStateString = gameStateToString();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerOneGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(0).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\tcase twoPlayersPlayerTwoGoesFirst:\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t\tlabelGameState.setText(\"It is now \" + players.get(1).getPlayerName() + \"'s turn.\");\t\n\t\t\tgameStateString = gameStateToString();\n\t\t\tbreak;\n\t\t}\t\t\n\t}", "private void setupPlayerPosition() {\n\t\tHashMap<Suspect, Coordinates> startPositions = new HashMap<Suspect, Coordinates>();\r\n\t\tstartPositions.put(Suspect.KasandraScarlet, new Coordinates(18, 28));\r\n\t\tstartPositions.put(Suspect.JackMustard, new Coordinates(7, 28));\r\n\t\tstartPositions.put(Suspect.DianeWhite, new Coordinates(0, 19));\r\n\t\tstartPositions.put(Suspect.JacobGreen, new Coordinates(0, 9));\r\n\t\tstartPositions.put(Suspect.EleanorPeacock, new Coordinates(6, 0));\r\n\t\tstartPositions.put(Suspect.VictorPlum, new Coordinates(20, 0));\r\n\r\n\t\tfor (int i = 0; i < this.listOfPlayer.size(); i++) {\r\n\t\t\tPlayer p = this.listOfPlayer.get(i);\r\n\t\t\tSuspect sus = p.getSuspect().getData();\r\n\t\t\tboolean b = p.setCoord(startPositions.get(sus), this.grid);\r\n\t\t\t// should always be able to put character on starting position\r\n\t\t}\r\n\t\tSystem.out.println(\"Initial player starting positions set\");\r\n\t}", "public void start(){\r\n\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\tallowNewRoll();\r\n\t}", "private void SetUp() {\n numbers.add(0);\n numbers.add(1);\n numbers.add(2);\n numbers.add(3);\n numbers.add(4);\n numbers.add(5);\n numbers.add(6);\n numbers.add(7);\n numbers.add(8);\n numbers.add(9);\n\n PuzzleSolve(10, empty, numbers);\n }", "@Override\r\n\tpublic double getCurrentStepStart() {\n\t\treturn 0;\r\n\t}", "public Point getStart() {\n return mStart;\n }", "public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }", "void setStartSegment(int startSegment);", "void setStartSearch(int startSearch);", "public void setAsStartingPoint() {\n\t\tnodeStatus = Status.occupied;\n\t}", "void setStartPoint(Location location, boolean persistPoints);", "protected void initialize() {\n \tsetSetpoint(0.0);\n }", "public void setInitialPosition()\n {\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.a2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.b2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.c2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.d2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.e2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.f2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.g2);\n putGenericPiece(GenericPiece.PAWN, Colour.WHITE, Square.h2);\n //Se colocan los peones negros en la séptima fila\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.a7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.b7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.c7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.d7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.e7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.f7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.g7);\n putGenericPiece(GenericPiece.PAWN, Colour.BLACK, Square.h7);\n //Se colocan las torres blancas en a1 y h1\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.a1);\n putGenericPiece(GenericPiece.ROOK,Colour.WHITE,Square.h1);\n //Se colocan las torres negras en a8 y h9\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.a8);\n putGenericPiece(GenericPiece.ROOK,Colour.BLACK,Square.h8);\n //Se colocan los caballos blancos en b1 y g1\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.b1);\n putGenericPiece(GenericPiece.KNIGHT,Colour.WHITE,Square.g1);\n //Se colocan los caballos negros en b8 y g8\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.b8);\n putGenericPiece(GenericPiece.KNIGHT,Colour.BLACK,Square.g8);\n //Se colocan los alfiles blancos en c1 y f1\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.c1);\n putGenericPiece(GenericPiece.BISHOP,Colour.WHITE,Square.f1);\n //Se colocan los alfiles negros en c8 y f8\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.c8);\n putGenericPiece(GenericPiece.BISHOP,Colour.BLACK,Square.f8);\n //Se coloca la dama blanca en d1\n putGenericPiece(GenericPiece.QUEEN,Colour.WHITE,Square.d1);\n //Se coloca la dama negra en d8\n putGenericPiece(GenericPiece.QUEEN,Colour.BLACK,Square.d8);\n //Se coloca el rey blanco en e1\n putGenericPiece(GenericPiece.KING,Colour.WHITE,Square.e1);\n //Se coloca el rey negro en e8\n putGenericPiece(GenericPiece.KING,Colour.BLACK,Square.e8);\n \n //Se permiten los enroques para ambos jugadores\n setCastlingShort(Colour.WHITE,true);\n setCastlingShort(Colour.BLACK,true);\n setCastlingLong(Colour.WHITE,true);\n setCastlingLong(Colour.BLACK,true);\n \n //Se da el turno a las blancas\n setTurn(Colour.WHITE);\n \n gamePositionsHash.clear();\n gamePositionsHash.put(zobristKey.getKey(), 1);\n }", "@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}", "public abstract SolutionPartielle solutionInitiale();", "private void initialSetup() {\n\t\tcaretTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.caretBlinkRate), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\tisCaretVisible = !isCaretVisible;\t\t\t\t\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretTimer.setCycleCount(-1);\r\n\t\tcaretTimer.play();\r\n\t\t\r\n\t\tcaretMovementTimer = new Timeline(new KeyFrame(Duration.millis(GlobalAppSettings.fastDeviceFrameMillis), new EventHandler<ActionEvent>(){\r\n\t\t\t@Override\r\n\t\t public void handle(ActionEvent event) {\r\n\t\t\t\ttotalDestination += GlobalAppSettings.fastDeviceFrameMillis;\r\n\t\t\t\tscreenX = interpolation.apply(startX, destinationX, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tscreenY = interpolation.apply(startY, destinationY, totalDestination / GlobalAppSettings.caretMovementTime);\r\n\t\t\t\tif(totalDestination > GlobalAppSettings.caretMovementTime){\r\n\t\t\t\t\tscreenX = destinationX;\r\n\t\t\t\t\tscreenY = destinationY;\r\n\t\t\t\t\tcaretMovementTimer.stop();\r\n\t\t\t\t\ttotalDestination = 0;\r\n\t\t\t\t}\r\n\t\t\t\tif(caretParagraph!= null && caretIndex == anchor) {\r\n\t\t\t\t\ttextModifyFacade.getLineViewWithIndex(caretIndex).getColumnView().getDocumentView().refreshOverlay();\r\n\t\t\t\t}\r\n\t\t }\r\n\t\t}));\r\n\t\tcaretMovementTimer.setCycleCount(-1);\r\n\t\t\r\n\t\tcaretIndex = 0;\r\n\t\tanchor = 0;\r\n\t}", "public void setStart(int sx, int sy) {\n mStart = new Point(sx, sy);\n }", "public void setMin ( Point min ) {\r\n\r\n\tsetA ( min );\r\n }", "SolutionRef getStartSolution();", "public StartGame() {\n\t\tmessageType = CabalWireformatType.GAME_START;\n\t\tscenario = location = timePeriod = NULL; \n\t\tturn = maxTurn = 0;\n\t\t// startingFaction is null!!\n\t\tallMissions = new LinkedList<MissionConceptDTO>();\n\t}", "@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}", "public void setWhoGoesFirst(Player playerToGoFirst) {\n if(playerToGoFirst.equals(humanPlayer)) {\n firstPlayer = humanPlayer;\n secondPlayer = aiPlayer;\n } else {\n firstPlayer = aiPlayer;\n secondPlayer = humanPlayer;\n }\n turn = firstPlayer;\n }", "public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }", "private void transformPoints() {\r\n\r\n\t\t// angle between x-axis and the line between start and goal\r\n//\t\tthis.angle = inverse_tan (slope)\r\n\t\tthis.angle = (int) Math.toDegrees(Math.atan2(goal.getY()-robot.getY(), goal.getX()-robot.getX()));\r\n\r\n\t\t// deviation of start point's x-axis from (0,0)\r\n\t\tthis.deviation = this.robot;\r\n\r\n\t\tthis.robot = new Robot(GA_PathPlanning.Transform(robot, -deviation.x, -deviation.y));\r\n\t\tthis.robot = new Robot(Rotate(robot, -angle));\r\n\t\t \r\n\t\tthis.goal = GA_PathPlanning.Transform(goal, -deviation.x, -deviation.y);\r\n\t\tthis.goal = GA_PathPlanning.Rotate(goal, -angle);\r\n\t\t\r\n\t\tfor(int i=0;i<obstacles.length;i++)\r\n\t\t{\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Transform(obstacles[i], -deviation.x, -deviation.y));\r\n\t\t\tthis.obstacles[i]= new Obstacle(GA_PathPlanning.Rotate(obstacles[i], -angle));\r\n\t\t}\r\n\t\t// make start point as (0,0)\r\n\t\t// transform xy-axis to axis of the straight line between start and goal\r\n\t\t\r\n\t\t\r\n\t}", "static void startSolution(Tower t) {\n\t\t// store reference to tower\n\t\ttower = t;\n\t\t// get start tower array\n\t\tint[] discs = tower.startTower();\n\t\t// to keep track unique discs\n\t\tHashSet<Integer> set = new HashSet<Integer>();\n\t\t// populate set\n\t\tfor (int i = 0; i < discs.length; i++)\n\t\t\tset.add(discs[i]);\n\t\t// number of unique elems in nums\n\t\tint n = set.size();\n\t\t// show start configuration\n\t\tSystem.out.println(tower);\n\t\t// start solution\n\t\tloese(n, 'a', 'b', 'c');\n\t}", "void setStepCounterTileXY();", "void start() {\n \tm_e.step(); // 1, 3\n }", "public void addStart(Point point) {\n\t\tmaze[point.x][point.y] = Block.START;\n\t}", "public void setWhereToGo() {\n\t\tfloat diffZ=mApplications.get(CurIndex).getZ() - Constants.displayedPlace;\r\n\t\tif( Math.abs(diffZ) < Constants.threshold)\r\n\t\t{\r\n\t\t\tif(diffZ >=0)\r\n\t\t\t\tgoTo(Constants.TO_BACKWARD_CENTER);\r\n\t\t\telse\r\n\t\t\t\tgoTo(Constants.TO_FORWARD_CENTER);\r\n\t\t}\r\n\t\telse if( diffZ >= 0) // go to disappeared place\r\n\t\t{\r\n\t\t\tgoTo(Constants.TO_FRONT);\r\n\t\t}\r\n\t\telse if( diffZ < 0) // go to origin place\r\n\t\t{\r\n\t\t\tgoTo(Constants.TO_BACK);\r\n\t\t}\r\n\t}", "private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}", "protected abstract void forceStartValues();", "public XYPoint getSnakeHeadStartLocation();", "public void startExploration() {\n watermarkGoalTick = currentTick;\n }", "private void init()\n { \n JPanel control = new JPanel(); //declare control panel\n \n //CREATE BUTTONS\n JButton tourB = new JButton(\"Tour the Knight\");\n JButton resetB = new JButton(\"Reset\");\n JButton nextB = new JButton(\"Next Step\");\n JButton prevB = new JButton(\"Previous Step\");\n \n //DISABLE MOVEMENT BUTTONS, SINCE THERE IS NO TOUR YET\n nextB.setEnabled(false);\n prevB.setEnabled(false);\n\n //CREATE TEXTFIELDS\n JTextField xStartTxt = new JTextField(\"1\");\n JTextField yStartTxt = new JTextField(\"1\");\n JTextField messageTxt = new JTextField(\"Enter starting X and Y, then press Tour.\");\n \n messageTxt.setEditable(false); //message field is not editable\n \n //ACTION LISTENERS FOR BUTTONS AND TEXTFIELDS\n \n //Knight Tour button actionlistener\n tourB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n messageTxt.setText(\"Working on solution\"); // display on message\n \n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );//update the starting x and y position\n \n kComp.tourKnight(); //tour the knight's tour\n \n //Disable changing start position\n xStartTxt.setEnabled(false);\n yStartTxt.setEnabled(false);\n \n //enable movement buttons\n nextB.setEnabled(true);\n prevB.setEnabled(true);\n \n //disable Knight tour buttons\n tourB.setEnabled(false);\n \n //display message\n messageTxt.setText(\"Solution on Display\");\n \n }\n });\n \n //Reset action listener\n resetB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.reset(); //call reset method\n \n //set the starting position to 1x1\n xStartTxt.setText(\"1\");\n yStartTxt.setText(\"1\");\n \n //enable the acces to start-pos fields\n xStartTxt.setEnabled(true);\n yStartTxt.setEnabled(true);\n \n //disable movement buttons\n nextB.setEnabled(false);\n prevB.setEnabled(false);\n \n //enable tour button\n tourB.setEnabled(true);\n \n //update the start position\n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );\n \n //update the message box\n messageTxt.setText(\"Enter starting X and Y, then press Tour.\");\n }\n });\n \n \n //Next step movement event\n nextB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.nextStep(); //call the next step method\n }\n });\n \n //Previous step movement event\n prevB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.prevStep(); //call the previous step method\n }\n });\n \n //Action event class for textfields\n class TextListener implements ActionListener\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );//update the start location\n }\n }\n \n //Add the Textlistener to the texfields\n xStartTxt.addActionListener(new TextListener());\n yStartTxt.addActionListener(new TextListener());\n \n //Add 3-layered layout\n control.setLayout(new GridLayout(3,1));\n \n //Create top, middle, and bottom panels \n JPanel topP = new JPanel();\n JPanel midP = new JPanel(new GridLayout(1,3)); // 1 by 3 grid layout\n JPanel botP = new JPanel(new GridLayout(1,3)); // 1 by 3 grid layout\n \n //Add Message to Top Panel\n topP.add(messageTxt);\n \n \n //Add x-pos, y-pos, and Tour button to Middle Panel\n midP.add(xStartTxt);\n midP.add(yStartTxt);\n midP.add(tourB);\n \n //Add reset and movement buttons to Bottom Panel\n botP.add(resetB);\n botP.add(prevB);\n botP.add(nextB);\n \n //Add panels to the control panel\n control.add(topP);\n control.add(midP);\n control.add(botP);\n \n //add panel to the south of frame\n this.getContentPane().add(control, BorderLayout.SOUTH);\n \n }", "public void start() {\n \tthis.currentState = this.initialState;\n \tstop=false; //indica que el juego no se ha detenido\n \tnotifyObservers(new GameEvent<S, A>(EventType.Start,null,currentState,\n \t\t\t\t\tnull,\"The game started\"));\n\n }", "public void setThisManual()\n { \n actual = 1;\n \n nextPage = new Label();\n addObject(nextPage, 1132, 2001);\n \n prePage = new Label();\n addObject(prePage, 122, 2007);\n \n prePage.setImage(new GreenfootImage(\"\", 0, null, null));\n nextPage.setImagine(\"sipka1\");\n \n callMenu = new CallMenu();\n addObject(callMenu, 667, 60);\n }", "public void start(int p) {\n\t\t_start.setEnabled(true);\n\t\tupdateToPlace(p);\n\t}", "void changeStart(int newStart) {\n if (newStart < 0 || newStart >= endBeat) {\n throw new IllegalArgumentException(\"Invalid startBeat\");\n }\n this.startBeat = newStart;\n }", "public void startGame() {\n\t\tif (chordImpl.getPredecessorID().compareTo(chordImpl.getID()) > 0) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"I Start!\");\n\t\t\tshoot();\n\t\t}\n\t}", "public void resetY() {this.startY = 11.3f;}" ]
[ "0.6420392", "0.6401998", "0.6361902", "0.6239107", "0.6206439", "0.6164255", "0.61502427", "0.61342406", "0.60694164", "0.601301", "0.60099596", "0.59859717", "0.5967429", "0.59577185", "0.5914578", "0.5913886", "0.590023", "0.58639634", "0.5863416", "0.5861745", "0.5857494", "0.58354425", "0.581629", "0.5815164", "0.57988226", "0.577608", "0.57153773", "0.5697644", "0.5694843", "0.5685291", "0.5675011", "0.56702155", "0.5668341", "0.56479657", "0.56251854", "0.56051064", "0.56039584", "0.5594932", "0.5589015", "0.5584953", "0.5551033", "0.55422956", "0.5537878", "0.5536359", "0.5530166", "0.551979", "0.5505932", "0.5500145", "0.54996186", "0.54985344", "0.54824543", "0.54801077", "0.5479178", "0.5477598", "0.5471881", "0.5470717", "0.5468766", "0.54638165", "0.5463303", "0.5460832", "0.5454259", "0.5452878", "0.54514873", "0.54480016", "0.5442064", "0.54403454", "0.54254836", "0.5401996", "0.54015154", "0.53959537", "0.53959113", "0.539361", "0.5388565", "0.53826493", "0.53779125", "0.5367959", "0.5364938", "0.5361524", "0.5358687", "0.53566426", "0.5352516", "0.5349744", "0.53441584", "0.5342997", "0.534141", "0.5337471", "0.53370583", "0.5329407", "0.5325531", "0.53125834", "0.5311759", "0.5309719", "0.53094864", "0.5301979", "0.5298752", "0.52980554", "0.5296968", "0.52962387", "0.5290563", "0.5281953" ]
0.6809958
0
Sets the current facility point for the currently solved Basic problem.
private void setCurrentFacility(Point f){ _currentFacility = f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setThisFacility(Facility thisFacility) {\n this.thisFacility = thisFacility;\n }", "private void setWorkmanPoint( int point ){\n\n callGetSliderAds();\n }", "public void setGoal(Point point) {\n mGoal = point;\n }", "public void setSetpoint(double setpoint);", "public void setCurrentPerforme(String fdName) {\n\t\tcurrentFlieName = fdName;\n\t\tif (csvDataMap.size() == 0)\n\t\t\tSystem.err.println(\"[DEBUG] csv data map is empty. \");\n\n\t\tcurrentPerformed = new LinkedList<PositionVo>(csvDataMap.get(currentFlieName));\n\t\tif (currentPerformed == null)\n\t\t\tSystem.err.println(\"[DEBUG] data cannot find. \" + currentFlieName);\n\t}", "public abstract void setPoint(Point p);", "void setMode(SolvingMode solvingMode);", "public void setPoint(double point){\r\n this.point = point;\r\n }", "public void setChessLocation(ChessPiece aPiece, int xx, int yy) {//Just for test, set the selected chess piece(a JButton)'s location\n aPiece.setLocation(xx, yy);\n\n }", "public void setCurrentPoint(int[] currentPoint) {\n this.currentPoint = currentPoint.clone();\n }", "public void m1291a(Point point) {\r\n this.f763l = point;\r\n }", "static void setViewPointRelevantTo(Point point) {\n point.translate(-1 * viewPoint.x, -1 * viewPoint.y);\n point.x /= Map.zoom;\n point.y /= Map.zoom;\n point.translate(viewPoint.x, viewPoint.y);\n viewPoint.setLocation(point.x - GAME_WIDTH / 2, point.y - GAME_HEIGHT / 2);\n verifyViewPoint();\n }", "@Override\r\n\tpublic void setCurrent(double iCurrent) {\n\r\n\t}", "public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }", "public int setPoint(float x, float y, int gnum);", "private void editPoint() {\n Snackbar.make(coordinatorLayout, R.string.feature_not_available, Snackbar.LENGTH_SHORT).show();\n }", "public void setPoint(Integer point) {\n this.point = point;\n }", "public void setPoint(Integer point) {\n\t\tthis.point = point;\n\t}", "void setPosition(Point point);", "public void setLocation(Point p) {\n // Not supported for MenuComponents\n }", "public void setPoint( Float point ) {\n this.point = point;\n }", "public void setLocation(float x, float y);", "public void setLocation(Point2D p);", "void addPerformAt(Facility newPerformAt);", "public void setLocation(Vector location);", "public void setSetpoint(float setpoint) {\r\n m_setpoint = setpoint;\r\n }", "public void setPiece(PieceIF p);", "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 T setPoint(@NonNull PointF point) {\n return setPoint(point.x, point.y);\n }", "public void setPositionClosedLoopSetpoint(final double setpoint) {\n m_X.set(ControlMode.Position, 1000 * setpoint);\n //System.out.println(this.getEncPosition());\n }", "void setPointChange(Integer setPoint, Integer expectedValue);", "public static void assignFacilityToUse(Facility f, UseRequest useRequest)\n {\n Database.db.get(f).getFacilityUse().getSchedule().getSchedule().put(useRequest, useRequest.getIntervalSlot());\n }", "public void setProblem(AbstractSearchProblem<S> p) {\n problem = p;\n }", "@Override\n public void setSetpoint(double setpoint) {\n if (getController() != null) {\n getController().setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }\n super.setSetpoint(Utilities.clip(setpoint, Constants.Hood.MIN_ANGLE, Constants.Hood.MAX_ANGLE));\n }", "public void setFacilityid(int facilityid) {\n this.facilityid = facilityid;\n }", "public void setFE(int newFE){\n this._FE=newFE;\n }", "@AutoGUIAnnotation(\r\n\tDescriptionForUser = \"Sets the SetPoint temperature.\",\r\n\tParameterNames = {\"Temperature [K]\"},\r\n\tDefaultValues= {\"295\"},\r\n\tToolTips = {\"Define tool-tips here\"})\r\n @iC_Annotation(MethodChecksSyntax = true )\r\n public void setTemp(float SetPoint)\r\n throws IOException, DataFormatException {\r\n\r\n\t// perform Syntax-check\r\n\tif (SetPoint < 0 || SetPoint > 500)\r\n\t\tthrow new DataFormatException(\"Set point out of range.\");\r\n\r\n\t// exit if in Syntax-check mode\r\n\tif ( inSyntaxCheckMode() )\r\n\t\treturn;\r\n\r\n // build the GPIB command string\r\n\tString str = \"SETP 1,\" + SetPoint;\r\n\r\n\t// send to the Instrument\r\n\tSendToInstrument(str);\r\n\r\n\t// wait until setpoint is reached\r\n float T;\r\n\tdo {\r\n // it is recommended to check if scripting has been paused\r\n isPaused(true);\r\n\r\n // get current temperature\r\n str = QueryInstrument(\"KRDG? A\");\r\n\r\n // convert to a float value\r\n //T = getFloat(str); // this is the recommended way of converting\r\n T = Float.parseFloat(str);\r\n\t} while ( Math.abs(T-SetPoint) > 0.1 &&\r\n m_StopScripting == false);\r\n }", "void setLocation(int x, int y);", "@Override\n\tpublic void fillPoint(SpaceUserVO spaceUserVO, PointVO pointVO) throws Exception {\n\t\t\n\t}", "public void setFrame(Frame f){\n\t\tthis.frame = f;\n\t\t//if (singleInstance.mg == null || singleInstance.cpg == null) throw new AssertionViolatedException(\"Forgot to set important values first.\");\n\t}", "void setFeature(int index, Feature feature);", "public void solveIt() {\n\t\tfirstFreeSquare.setNumberMeAndTheRest();\n\t}", "public void setCurrentCard(PunchCard current, User _model){\n model = _model;\n PunchCard tempCard = _model.findDeck(current.getCategoryName()).findCard(current.getName());\n name = tempCard.getName();\n category = tempCard.getCategoryName();\n }", "public void setFaculty(Faculty faculty) {\n this.faculty = faculty;\n }", "public void setX(int x) { loc.x = x; }", "public void editAssessment(String faValue, String tpValue) {\n cmbFunctionalArea.select(faValue);\n selectType(tpValue);\n typeScore(scoreEdit);\n }", "public void addPoint(GridPoint newPoint) {\n\t\t//System.out.println(\"Added rubbish at coordinates X=\" + newPoint.getX() + \", Y=\" + newPoint.getY());\n\t\tsolutionRepresentation.add(newPoint);\n\t}", "public void setSetpoint(double setpoint) {\n \tthis.CTCSpeed = setpoint;\n }", "public void setFA(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localFATracker = true;\r\n } else {\r\n localFATracker = false;\r\n \r\n }\r\n \r\n this.localFA=param;\r\n \r\n\r\n }", "private static void replaceCurrentPerspective( IPerspectiveDescriptor persp )\r\n {\n IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\r\n\r\n if( window != null )\r\n {\r\n IWorkbenchPage page = window.getActivePage();\r\n\r\n if( page != null )\r\n {\r\n // Set the perspective.\r\n page.setPerspective( persp );\r\n }\r\n }\r\n }", "public void setGBInterval_point(java.math.BigInteger param){\n localGBInterval_pointTracker = param != null;\n \n this.localGBInterval_point=param;\n \n\n }", "public void setPuzzle (Puzzle p) {\r\n puzzle = p;\r\n }", "public abstract Piece setLocation(int row, int column);", "public abstract void assign(ParameterVector pv) throws SolverException;", "public Point2D setPoint(int i, double x, double y);", "public void setFeatureSet(byte featureSet) {\n\t\t\n\t\tthis.featureSet = featureSet;\n\t\tupdateTrigger(new NotificationPacket(myAddress() + \"/featureSet\", \"\" + featureSet, NotificationPacket.NPACTION_UPDATE));\n\t\tupdateTrigger(new NotificationPacket(myAddress() + \"/featureSet/text\", getFeatureSetText(), NotificationPacket.NPACTION_UPDATE));\n\n\t}", "protected abstract void setPpl();", "@Test\n public void setCurrent() throws SQLException {\n DataStorer.insertProfile(profile1);\n DataStorer.insertGoal(goal1, profile1);\n // Current for goal1 is currently true so change it to false\n boolean current = false;\n goal1.setCurrent(current);\n // Load profile1 from the database\n loadedProfile = DataLoader.loadProfile(profile1.getFirstName(), profile1.getLastName());\n\n //goal1.setCurrent(true);\n\n // Check that current was updated correctly in the database - will get index out of bounds exception if it was not\n assertEquals(current, loadedProfile.getPastGoals().get(0).isCurrent());\n\n // Reset current to true so other tests can use goal1\n goal1.setCurrent(true);\n }", "public void setFixed(entity.LocationNamedInsured value);", "public void setPosition(Point newPosition);", "public void setBeginPosition(FPointType fpt) {\n fptStart.x = fpt.x;\n fptStart.y = fpt.y;\n }", "void setCurrentPosition(Square currentPosition);", "public void setFact(Fact[] param) {\r\n\r\n validateFact(param);\r\n\r\n localFactTracker = true;\r\n\r\n this.localFact = param;\r\n }", "public void setLocation(int X, int Y){\n \tlocation = new Point(X,Y);\n }", "protected void initCurrentGP() {\n\t\t// centers the falling pieces at the top row\n\t\tcurrentPieceGridPosition = new int[]{0, 3};\n\t}", "public void setPoints(Integer i) {\n Log.d(\"berttest\",\"setPoints works\");\n points.setValue(i);\n }", "public void setLocalPharmacyDetails() {\n\n\t\tlocalFacilityDetails.setPharmacyName(txtPharmacyName.getText());\n\t\tlocalFacilityDetails.setPharmacist(txtPharmacistName1.getText());\n\t\tlocalFacilityDetails.setAssistantPharmacist(txtPharmacyAssistant.getText());\n\t\tlocalFacilityDetails.setModified(true);\n\n\t\tlocalFacilityDetails.setStreet(txtStreetAdd.getText());\n\t\tlocalFacilityDetails.setCity(txtCity.getText());\n\t\tlocalFacilityDetails.setContactNo(txtTel.getText());\n\n\t}", "public void setResistancePoint(int resistancePoint) {\r\n\t\tthis.resistancePoint = resistancePoint;\r\n\t}", "private void _setPoint(int index, DataPoint point) {\n ntree.set(index, point);\n ensureDistances();\n }", "public void setFacilityType(org.hl7.fhir.CodeableConcept facilityType)\n {\n generatedSetterHelperImpl(facilityType, FACILITYTYPE$4, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void setPoint(double value) {\r\n this.point = value;\r\n }", "public void setGoal(GoalComponent goal) {\n \tthis.goal = goal;\n }", "public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }", "void setFullPelForwardVector(int value)\n {\n forwardVector.setFullPel(value);\n }", "void setFigure(FigureInfo f);", "public void setXY(Point2D aPoint) { setXY(aPoint.getX(), aPoint.getY()); }", "public void setFpl(Double fpl) {\r\n this.fpl = fpl;\r\n }", "public void setCurrentFloor(int currentFloor) {\n this.currentFloor = currentFloor;\n }", "public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}", "public void setHandlingCampus(CampusId campus) ;", "@Override\n public void setCoord(PuertoPosition pp, Point2D newCoord) {\n layout.setLocation(pp, newCoord);\n }", "public final void setFoundUIP(java.lang.Boolean founduip)\r\n\t{\r\n\t\tsetFoundUIP(getContext(), founduip);\r\n\t}", "public void setXpeFacility(String value) {\n setAttributeInternal(XPEFACILITY, value);\n }", "Object onToUpdateFromEditor(Long facilityId) {\n\t\t_mode = Mode.UPDATE;\n\t\t_facilityId = facilityId;\n\t\treturn _editorZone.getBody();\n\t}", "private void setProject()\n\t{\n\t\tproject.setName(tf0.getValue().toString());\n \t\tproject.setDescription(tf8.getValue().toString());\n \t\tproject.setEndDate(df4.getValue());\n \t\tif (sf6.getValue().toString().equals(\"yes\"))project.setActive(true);\n \t\telse project.setActive(false);\n \t\tif (!tf7.getValue().toString().equals(\"\"))project.setBudget(Float.parseFloat(tf7.getValue().toString()));\n \t\telse project.setBudget(-1);\n \t\tproject.setNextDeadline(df5.getValue());\n \t\tproject.setStartDate(df3.getValue());\n \t\ttry \n \t\t{\n \t\t\t\tif (sf1.getValue()!=null)\n\t\t\t\tproject.setCustomerID(db.selectCustomerforName( sf1.getValue().toString()));\n\t\t}\n \t\tcatch (SQLException|java.lang.NullPointerException e) \n \t\t{\n \t\t\tErrorWindow wind = new ErrorWindow(e); \n \t UI.getCurrent().addWindow(wind);\t\t\n \t e.printStackTrace();\n\t\t\t}\n \t\tproject.setInserted_by(\"Grigoris\");\n \t\tproject.setModified_by(\"Grigoris\");\n \t\tproject.setRowversion(1);\n \t\tif (sf2.getValue()!=null)project.setProjectType(sf2.getValue().toString());\n \t\telse project.setProjectType(null);\n\t }", "public void setEatPoints(int param) {\n // setting primitive attribute tracker to true\n localEatPointsTracker = param != java.lang.Integer.MIN_VALUE;\n\n this.localEatPoints = param;\n }", "public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }", "public void setFurthestPoint(java.lang.Integer value) {\n this.furthest_point = value;\n }", "public void setPoint(int point) {\n\tthis.score_num.setText(String.valueOf(point));\r\n}", "public void setLocation( Point p ) {\r\n this.x = p.x;\r\n this.y = p.y;\r\n }", "@Override\n\tpublic void SetCoord(double x, double y) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void setFacilityId(int facilityId) {\r\n\t\tthis.facilityId = facilityId;\r\n\t}", "public void setLocus(Locus3f newLocus) {\r\n this.locus = newLocus;\r\n }", "void setFoil (Foil foil) {\n current_part.foil = foil;\n }", "public void setCurrentP(String currentP) {\t\t\n\t\tif(currentP==null||currentP.equals(\"\"))\n\t\t\tcurrentP=\"1\";\n\t\ttry{\n\t\t\tCurrentP=Integer.parseInt(currentP);\n\t\t}catch(NumberFormatException e){\n\t\t\tCurrentP=1;\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(CurrentP<1)\n\t\t\tCurrentP=1;\n\t\tif(CurrentP>AllP)\n\t\t\tCurrentP=AllP;\t\t\n\t}", "public void setRobotLocation(Point p);", "public void editStudentGPA(Student tempStudent, float fGPA)\n\t{\n\t\ttempStudent.setfGPA(fGPA);\n\t\tthis.saveNeed = true;\n\n\n\t}", "private void updateCurrentTarget(){\n switch (state){\n case States.DEAD:\n currentTarget = currentLocation;\n break;\n case States.FIGHT:\n if (targetEnemy != null)\n currentTarget = targetEnemy.getCurrentLocation();\n else\n currentTarget = targetBuilding.getLocation();\n break;\n case States.RETREAT:\n currentTarget = new Point(20,20);\n break;\n case States.LOSS:\n currentTarget = new Point(20,20);\n break;\n case States.WIN:\n currentTarget = village.getCenter();\n break;\n case States.IDLE:\n currentTarget = targetBuilding.getLocation();\n }\n }", "protected abstract void setTile( int tile, int x, int y );", "public void\nsetDetail(SoDetail detail, SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n\n // Find node in path\n i = getNodeIndex(node);\n\n//#ifdef DEBUG\n// if (i < 0)\n// SoDebugError::post(\"SoPickedPoint::setDetail\",\n// \"Node %#x is not found in path\", node);\n//#endif /* DEBUG */\n\n details.set(i, detail);\n}" ]
[ "0.6365474", "0.5876566", "0.5571939", "0.5538904", "0.552878", "0.5484315", "0.5481141", "0.5379437", "0.5370409", "0.5359421", "0.5316264", "0.5279053", "0.5278397", "0.52722734", "0.5265497", "0.52649355", "0.5251258", "0.5214526", "0.519009", "0.51748216", "0.51502925", "0.51321834", "0.51014894", "0.508747", "0.5086167", "0.50827473", "0.5078902", "0.5074443", "0.5071846", "0.50559723", "0.50540066", "0.5048091", "0.5043723", "0.50422126", "0.50402284", "0.50388104", "0.50354946", "0.5032172", "0.5028503", "0.5023415", "0.5003814", "0.5001132", "0.49892217", "0.49887866", "0.49856928", "0.49675626", "0.49638838", "0.4953561", "0.49465537", "0.49427366", "0.49392745", "0.49313486", "0.49195275", "0.49190673", "0.49115905", "0.49073663", "0.490604", "0.4898982", "0.4898663", "0.4890905", "0.48882926", "0.48847014", "0.4876704", "0.4874643", "0.4874435", "0.4874176", "0.48689565", "0.48675573", "0.48316073", "0.48205638", "0.4819403", "0.4816132", "0.48068923", "0.4805641", "0.47878703", "0.47877958", "0.47831887", "0.4782306", "0.47754973", "0.47734883", "0.4772168", "0.4767468", "0.4766206", "0.47654828", "0.47650775", "0.47589618", "0.47529453", "0.4750144", "0.47497153", "0.47496533", "0.47485584", "0.47483492", "0.4747516", "0.4744963", "0.47442338", "0.4739375", "0.47383666", "0.47361216", "0.47334123", "0.47321635" ]
0.7620252
0
Sets the current radius of the balls for the currently solved Basic problem.
private void setCurrentRadius(double r){ _currentRadius = r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRadius(int radius);", "public void setRadius(double value) {\n this.radius = value;\n }", "public void setRadius(double value) {\n radius = value;\n }", "public void setRadius(double n)\r\n\t{\r\n\t\tradius = n;\r\n\t}", "public void setRadius(double radius){\n\t\tradius =this.radius;\n\t}", "public void setRadius(int r) {\n this.radius = r;\n }", "private void setRadius(float radius) {\n\t\tthis.radius = radius;\n\t}", "public void setRadius(double radius){\n this.radius = radius;\n }", "public void setRadius(double r) { radius.set(clamp(r, RADIUS_MIN, RADIUS_MAX)); }", "public void setRadius(double radius) {\r\n this.radius = radius;\r\n }", "public void setRadius(float aValue)\n {\n if (getRadius() == aValue) return;\n repaint();\n firePropChange(\"Radius\", _radius, _radius = aValue);\n }", "@Override\n public void setRadius(float radius) {\n Arrays.fill(mRadii, radius);\n updatePath();\n invalidateSelf();\n }", "SimpleCircle(double newRadius){\n\t\tradius=newRadius;\n\t}", "public void setRadius(int radius) {\n this.radius = radius;\n }", "public void setRadius(double radius) {\n this.radius = radius;\n }", "SimpleCircle(double newRadius) {\n\t\tradius = newRadius;\n\t}", "@Override\n public void setRadius(float radius) {\n Preconditions.checkArgument(radius >= 0, \"radius should be non negative\");\n Arrays.fill(mRadii, radius);\n updatePath();\n invalidateSelf();\n }", "public void setRadius(double entry) {\r\n\t\tradius = entry;\r\n\t}", "public Circle(double newRadius) {\n\t\tradius = newRadius;\t\t\t\n\t}", "public void setRadius(float radius) {\n this.radius = radius;\n }", "private void configureLocation() {\n radius = size / 2;\n circleX = bounds.left + radius;\n circleY = bounds.top + radius;\n }", "public void setRadius( double r ) \r\n { radius = ( r >= 0.0 ? r : 0.0 ); }", "public void setRadius(int radius) {\n\t\tthis.radius = radius;\n\t}", "public void setRadius(int radius)\n {\n this.radius = radius;\n super.setSize(radius + 2, radius + 2);\n this.paintImmediately(this.getVisibleRect());\n }", "public void setRadius(double radius) {\n\t\tthis.radius = radius;\n\t}", "public void setRadius(double radius) {\n\t\tthis.radius = radius;\n\t}", "private void setPenRadius() {\n\t}", "int getBallRadius();", "public void setPickRadius(double r) {\n\t\t\n\t}", "public void setFixedRadius ( int radius ) {\r\n\t\tradius_mag_dependent = false;\r\n\t\tplot_radius = radius;\r\n\t}", "public Builder setRadius(int value) {\n bitField0_ |= 0x00000004;\n radius_ = value;\n onChanged();\n return this;\n }", "public Ball(int x, int y, int radius, Color color, GameLevel gameLevel) {\n this.center = new Point(x, y);\n if (radius > 0) {\n this.radius = radius;\n } else {\n this.radius = DEFAULT_RADIUS;\n }\n this.color = color;\n this.velocity = new Velocity(0, 0);\n\n this.gameLevel = gameLevel;\n }", "public void setArea(double radius) {\n this.radius = radius;\n }", "protected void buildRadius()\r\n\t{\n\t\tif (m_Qmax == null || m_Qmin == null)\r\n\t\t{\r\n\t\t\tupdateQMinQMax();\r\n\t\t}\r\n\t\t\r\n\t\tm_Radius = getMaxDistanceOrigin();\r\n\t}", "@Override\n public void setRadius(double radius) {\n radius = makePositive(radius, \"Invalid radius. NaN\");\n\n if (radius < MINIMUM_RADIUS) {\n throw new IllegalArgumentException(\"Invalid radius. \" + radius + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n this.getRenderable().setRadius(radius);\n }", "public void setR( double radius ) {\n if ( radius < -100 ) {\n throw new IllegalArgumentException(\"ERROR: \" + radius + \" is too small for [\" + getType() +\"]\");\n }\n if ( radius > 100 ) {\n throw new IllegalArgumentException(\"ERROR: \" + radius + \" is too large for [\" + getType() +\"]\");\n }\n this.r = radius;\n }", "public EdgeNeon setRadius(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 1500.00 || value < 1.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, 1.00, 1500.00);\n\t }\n\n m_Radius = value;\n setProperty(\"radius\", value);\n return this;\n }", "public Circle(double radius){\n\t\tradius =this.radius;\n\t\tcolor =\"Red\";\n\t}", "public Ball(Point center, int r) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n }", "public double getRadius(){return radius;}", "public Circle(double radius){\n this.radius = radius;\n }", "public Ball(Point center, int r, GameEnvironment environment) {\n this.center = center;\n this.startingLoc = center;\n this.radius = r;\n this.gameEnvironment = environment;\n }", "public int getRadius() { return radius; }", "public Ball(Point center, int radius, Color color) {\n\n this.center = center;\n if (radius > 0) {\n this.radius = radius;\n } else {\n this.radius = DEFAULT_RADIUS;\n }\n this.color = color;\n this.velocity = new Velocity(0, 0);\n }", "public double getRadius() { return radius; }", "public void setRadius(int radius) {\r\n\t\tthis.majorAxis = radius;\r\n\t}", "public Circle(double givenRadius)\n\t{\n\t\tradius = givenRadius;\n\t}", "public GameObjectBase(float boundsRadius) {\n bounds = new Circle(x,y,boundsRadius);\n }", "private void circle(){\n\t\tsquareCollison();\n\t\tsetMoveSpeed(10);\n\t}", "public double getRadius(){\n return radius;\n }", "private void updateRadiusCircle(){\n if(mRadiusCircle != null) {\n mRadiusCircle.setVisible(false);\n }\n mRadiusCircle = mMap.addCircle(new CircleOptions()\n .center(new LatLng(mCurrentLoc.latitude, mCurrentLoc.longitude))\n .radius(mRadius * METERS_PER_MILE)\n .strokeColor(Color.BLUE)\n .fillColor(BLUE_COLOR));\n mRadiusCircle.setVisible(true);\n }", "public T setRadius(float radius) {\n if (radius <= 0) {\n throw new IllegalArgumentException(\"radius must be greater than 0\");\n }\n this.radius = radius;\n return self();\n }", "public void setRadius(int radius) {\n\t\tif (radius < 0)\n\t\t\tthrow new IllegalArgumentException(\"The given radius is negative\");\n\t\tthis.radius = radius;\n\t}", "public Ball(Point center, int r, java.awt.Color color){\r\n this.center = center;\r\n this.radius =r;\r\n this.color =color;\r\n }", "public Circle(double r)\n {\n setRad(r);\n\n }", "public void setCenterCircleFill(){\n if(solvable){\n solvableCircle.setFill(Color.GREEN);\n }\n else{\n solvableCircle.setFill(Color.RED);\n }\n }", "private void addCircle() {\n\t\tdouble r = getRadius();\n\t\tadd(new GOval(getWidth() / 2.0 - r, getHeight() / 2.0 - r, 2 * r, 2 * r));\n\t}", "public abstract double getBoundingCircleRadius();", "public void setMaxRadius(double value) {\n rrMaxRadius = value;\n }", "SimpleCircle() {\n\t\tradius=1;\n\t}", "double getRadius();", "public double getRadius(){\n\t\treturn radius;\n\t}", "public abstract float getRadius();", "public abstract float getRadius();", "public Ball(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(15);\n myCircle.setFill(innerColor);\n myCircle.setCenterX(x);\n myCircle.setCenterY(y);\n myShape = myCircle;\n }", "public Ex1Circle(double radiusIn)\n {\n radius = radiusIn;\n }", "public Circle(double radius){\n// Set the this.X to the args\n//Force any var radius < 0 to 0\n this.radius = Math.max(0, radius);\n }", "public Circle(double r)\r\n\t{\r\n\t\tradius=r;\r\n\t}", "public double getRadius() { return radius.get(); }", "public double getRadius(){\r\n return radius;\r\n }", "public float getRadius()\n {\n return _radius;\n }", "SimpleCircle() {\n\t\tradius = 1;\n\t}", "public double getRadius(){\n return r;\n }", "public Circle(int r) {\n\t\tthis.radius = r;\n\t}", "private static void calculateRadiusforCircle()\r\n\t{\r\n\t\tsensorRadius = Math.sqrt((double) averageDensity / (double) numberOfSensors);\r\n\t\tsensorRadius = sensorRadius * unitSizeForCircle;\r\n\t\tnoOfCellRowsCoulmns = (int) (unitSizeForSquare / sensorRadius);\r\n\t\tcell = new Cell[noOfCellRowsCoulmns + 2][noOfCellRowsCoulmns + 3];\r\n\t\tinitializeCell(noOfCellRowsCoulmns + 2, noOfCellRowsCoulmns + 3);\r\n\t}", "public void setRadius(int radius){\r\n\r\n if(radius < 1){\r\n throw new IllegalArgumentException(\"Radius must be greater than 0.\");\r\n }\r\n\r\n this.radius = radius;\r\n\r\n this.shadow.setRadius(this.radius);\r\n this.surface.setRadius(this.radius);\r\n this.shading.setRadius(this.radius - (this.radius / 8));\r\n }", "public float getRadius() {\n return radius;\n }", "public double getRadius() {\r\n\t\treturn _radius;\r\n\t}", "public int getRadius() {\n return radius;\n }", "public boolean setRadius(double radiusIn)\r\n {\r\n if (radiusIn > 0)\r\n {\r\n radius = radiusIn;\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public int getRadius()\n {\n return this.radius;\n }", "public void setRadius(double parseDouble) {\n\t\t\n\t}", "public double getRadius() {\n return radius; \n }", "@Override\n void individualUpdate() {\n timeToLive--;\n radius++;\n setColor();\n }", "public float radius() {\n\t\treturn radius;\n\t}", "@Override\n\tpublic float getBoundingRadius() {\n\t\treturn boundingradius;\n\t}", "public int getRadius_() {\r\n\t\treturn radius_;\r\n\t}", "public double getRadius() {\n return radius;\n }", "public double getRadius()\r\n\t{\r\n\t\treturn radius;\r\n\t}", "public double getRadius()\r\n {\r\n return radius;\r\n }", "public void setPuckRadius(int radius) {\n this.puck_radius = radius;\n\n this.puck.setRadius(radius);\n }", "public int getRadius() {\r\n\t\treturn this.radius;\r\n\t}", "long getRadius();", "int getRadius();", "public Circle(double radius){ // 2 constructor\n this.radius = radius;\n this.color = DEFAULT_COLOR;\n }", "public Builder clearRadius() {\n bitField0_ = (bitField0_ & ~0x00000004);\n radius_ = 0;\n onChanged();\n return this;\n }", "public int getRadius() {\n return radius_;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }", "public double getRadius() {\n return radius;\n }" ]
[ "0.69966227", "0.67848617", "0.67289436", "0.6618912", "0.65826637", "0.6527866", "0.65275186", "0.65264076", "0.65182596", "0.6513288", "0.6505737", "0.650375", "0.6496201", "0.64656013", "0.6425347", "0.6392526", "0.6384474", "0.63554007", "0.6327113", "0.6317365", "0.62887794", "0.6288243", "0.62681895", "0.6258894", "0.6246069", "0.6246069", "0.6177796", "0.6168914", "0.61611354", "0.61599547", "0.61364585", "0.6123049", "0.6117475", "0.60831356", "0.6048315", "0.597532", "0.59685117", "0.5954531", "0.59462017", "0.59406865", "0.5940422", "0.5935186", "0.5917039", "0.5907914", "0.5898878", "0.5894447", "0.58912706", "0.58879393", "0.58876014", "0.58854467", "0.5883357", "0.58816874", "0.58601886", "0.5854116", "0.58523977", "0.5829017", "0.5806137", "0.5782185", "0.5765138", "0.57649916", "0.5748808", "0.57461494", "0.57401407", "0.57401407", "0.5739166", "0.5734676", "0.5731521", "0.5723587", "0.5717894", "0.57175857", "0.56832033", "0.5682094", "0.56655717", "0.56616", "0.5650751", "0.5643286", "0.5642072", "0.5641535", "0.56346095", "0.5632", "0.56302124", "0.56295663", "0.56240916", "0.56207997", "0.56198615", "0.5619556", "0.561733", "0.5612033", "0.5608667", "0.5608598", "0.56068754", "0.5598239", "0.5595113", "0.5591788", "0.5586835", "0.5584424", "0.557516", "0.55732197", "0.55732197", "0.55732197" ]
0.68628573
1
For the given interface, get the stub implementation. If this service has no port for the given interface, then ServiceException is thrown.
public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { try { if (com.ibm.itim.ws.services.WSExtensionService.class.isAssignableFrom(serviceEndpointInterface)) { com.ibm.itim.ws.services.WSExtensionServiceSoapBindingStub _stub = new com.ibm.itim.ws.services.WSExtensionServiceSoapBindingStub(new java.net.URL(WSExtensionService_address), this); _stub.setPortName(getWSExtensionServiceWSDDServiceName()); return _stub; } } catch (java.lang.Throwable t) { throw new javax.xml.rpc.ServiceException(t); } throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Remote getPort(Class serviceEndpointInterface) throws ServiceException {\n try {\n if (SDKClient.class.isAssignableFrom(serviceEndpointInterface)) {\n SDKServiceBindingStub _stub = new SDKServiceBindingStub(new java.net.URL(SDKService_address), this);\n _stub.setPortName(getSDKServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (Throwable t) {\n throw new ServiceException(t);\n }\n throw new ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.mozart.web.wsdl.sosistemas.NFEServices.class.isAssignableFrom(serviceEndpointInterface)) {\n com.mozart.web.wsdl.sosistemas.NFEServicesSoapBindingStub _stub = new com.mozart.web.wsdl.sosistemas.NFEServicesSoapBindingStub(new java.net.URL(NFEServices_address), this);\n _stub.setPortName(getNFEServicesWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\ttry {\n\t\t\tif (kz.lof.webservices.clients.udp.UDPService.class.isAssignableFrom(serviceEndpointInterface)) {\n\t\t\t\tkz.lof.webservices.clients.udp.UDPServiceSoapBindingStub _stub = new kz.lof.webservices.clients.udp.UDPServiceSoapBindingStub(new java.net.URL(UDPService_address), this);\n\t\t\t\t_stub.setPortName(getUDPServiceWSDDServiceName());\n\t\t\t\treturn _stub;\n\t\t\t}\n\t\t}\n\t\tcatch (java.lang.Throwable t) {\n\t\t\tthrow new javax.xml.rpc.ServiceException(t);\n\t\t}\n\t\tthrow new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n\t}", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.iwinner.ws.service.WsUserServiceImpl.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.iwinner.ws.service.WsUserServiceImplSoapBindingStub _stub = new com.iwinner.ws.service.WsUserServiceImplSoapBindingStub(new java.net.URL(WsUserServiceImpl_address), this);\r\n _stub.setPortName(getWsUserServiceImplWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuawei.class.isAssignableFrom(serviceEndpointInterface)) {\n com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuaweiBindingStub _stub = new com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuaweiBindingStub(new java.net.URL(CancelIMSHuawei_pt_address), this);\n _stub.setPortName(getCancelIMSHuawei_ptWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (de.java2enterprise.onlineshop.Uploader.class.isAssignableFrom(serviceEndpointInterface)) {\n de.java2enterprise.onlineshop.UploaderPortBindingStub _stub = new de.java2enterprise.onlineshop.UploaderPortBindingStub(new java.net.URL(UploaderPort_address), this);\n _stub.setPortName(getUploaderPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (co.edu.uan.servicio.EmpleadoServiciolmpl.class.isAssignableFrom(serviceEndpointInterface)) {\r\n co.edu.uan.servicio.EmpleadoServiciolmplSoapBindingStub _stub = new co.edu.uan.servicio.EmpleadoServiciolmplSoapBindingStub(new java.net.URL(EmpleadoServiciolmpl_address), this);\r\n _stub.setPortName(getEmpleadoServiciolmplWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricola_PortType.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricolaPortBindingStub _stub = new com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricolaPortBindingStub(new java.net.URL(WSEmisionAgricolaPort_address), this);\r\n _stub.setPortName(getWSEmisionAgricolaPortWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacade.class.isAssignableFrom(serviceEndpointInterface)) {\r\n org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacadeCfcSoapBindingStub _stub = new org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacadeCfcSoapBindingStub(new java.net.URL(RemoteFacadeCfc_address), this);\r\n _stub.setPortName(getRemoteFacadeCfcWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.pws.integration.pathway.OutboundServiceSessionEJBPortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.pws.integration.pathway.OutboundServiceSessionEJBBeanServicePortBindingStub _stub = new com.pws.integration.pathway.OutboundServiceSessionEJBBeanServicePortBindingStub(new java.net.URL(OutboundServiceSessionEJBBeanServicePort_address), this);\n _stub.setPortName(getOutboundServiceSessionEJBBeanServicePortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplPortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplHttpBindingStub _stub = new com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplHttpBindingStub(new java.net.URL(UGSRuntimeServiceXfireImplHttpPort_address), this);\n _stub.setPortName(getUGSRuntimeServiceXfireImplHttpPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\ttry {\n\t\t\tif (iace.webservice.linkiacClient.LinkIacWSSoap.class.isAssignableFrom(serviceEndpointInterface)) {\n\t\t\t\tiace.webservice.linkiacClient.LinkIacWSSoapStub _stub = new iace.webservice.linkiacClient.LinkIacWSSoapStub(new java.net.URL(LinkIacWSSoap_address), this);\n\t\t\t\t_stub.setPortName(getLinkIacWSSoapWSDDServiceName());\n\t\t\t\treturn _stub;\n\t\t\t}\n\t\t} catch (java.lang.Throwable t) {\n\t\t\tthrow new javax.xml.rpc.ServiceException(t);\n\t\t}\n\t\tthrow new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n\t}", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (ca.concordia.dsd.stub.CenterServerImpl.class.isAssignableFrom(serviceEndpointInterface)) {\n ca.concordia.dsd.stub.CenterServerImplPortBindingStub _stub = new ca.concordia.dsd.stub.CenterServerImplPortBindingStub(new java.net.URL(CenterServerImplPort_address), this);\n _stub.setPortName(getCenterServerImplPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.hoyotech.group.MsgservicePortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.hoyotech.group.MsgserviceSoap11BindingStub _stub = new com.hoyotech.group.MsgserviceSoap11BindingStub(new java.net.URL(msgserviceHttpSoap11Endpoint_address), this);\n _stub.setPortName(getmsgserviceHttpSoap11EndpointWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (de.nrw.dipp.dippCore.www.definitions.ContentModel.class.isAssignableFrom(serviceEndpointInterface)) {\n de.nrw.dipp.dippCore.www.definitions.DippSoapBindingStub _stub = new de.nrw.dipp.dippCore.www.definitions.DippSoapBindingStub(new java.net.URL(dipp_address), this);\n _stub.setPortName(getdippWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (sample.OrderProcessingService.class.isAssignableFrom(serviceEndpointInterface)) {\n sample.OrderProcessingServiceSoapBindingStub _stub = new sample.OrderProcessingServiceSoapBindingStub(new java.net.URL(OrderProcessingService_address), this);\n _stub.setPortName(getOrderProcessingServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (org.sirius.server.win32lib.controls.slider.ISliderContract.class.isAssignableFrom(serviceEndpointInterface)) {\n org.sirius.server.win32lib.controls.slider.SliderSvcPortStub _stub = new org.sirius.server.win32lib.controls.slider.SliderSvcPortStub(new java.net.URL(SliderSvcPort_address), this);\n _stub.setPortName(getSliderSvcPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.crm.service.elcom.vasman.Webservice_vasmanPortType.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.crm.service.elcom.vasman.Webservice_vasmanHttpBindingStub _stub = new com.crm.service.elcom.vasman.Webservice_vasmanHttpBindingStub(new java.net.URL(webservice_vasmanHttpPort_address), this);\r\n _stub.setPortName(getwebservice_vasmanHttpPortWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n String inputPortName = portName.getLocalPart();\n if (\"SDKService\".equals(inputPortName)) {\n return getSDKService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"NFEServices\".equals(inputPortName)) {\n return getNFEServices();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"WSExtensionService\".equals(inputPortName)) {\n return getWSExtensionService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (mastercom.app.FeeCreate.FeeCreate_PortType.class.isAssignableFrom(serviceEndpointInterface)) {\n mastercom.app.FeeCreate.FeeCreateSOAPStub _stub = new mastercom.app.FeeCreate.FeeCreateSOAPStub(new java.net.URL(FeeCreateSOAP_address), this);\n _stub.setPortName(getFeeCreateSOAPWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (src.PublicService.class.isAssignableFrom(serviceEndpointInterface)) {\n src.PublicServiceSoapBindingStub _stub = new src.PublicServiceSoapBindingStub(new java.net.URL(publicService_address), this);\n _stub.setPortName(getpublicServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (AES_MB_IntakeWOList_Lib_1_0.AES_MB_IntakeWOList_Intf_1_0.class.isAssignableFrom(serviceEndpointInterface)) {\n return getWSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort();\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"WSWS3273E: Error: There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"WsUserServiceImpl\".equals(inputPortName)) {\r\n return getWsUserServiceImpl();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (org.tempuri.PublishAPIServiceSoap.class.isAssignableFrom(serviceEndpointInterface)) {\r\n org.tempuri.PublishAPIServiceSoapStub _stub = new org.tempuri.PublishAPIServiceSoapStub(new java.net.URL(PublishAPIServiceSoap_address), this);\r\n _stub.setPortName(getPublishAPIServiceSoapWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.mx.everis.taller.controller.PersonController.class.isAssignableFrom(serviceEndpointInterface)) {\n com.mx.everis.taller.controller.PersonControllerSoapBindingStub _stub = new com.mx.everis.taller.controller.PersonControllerSoapBindingStub(new java.net.URL(PersonController_address), this);\n _stub.setPortName(getPersonControllerWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\tif (portName == null) {\n\t\t\treturn getPort(serviceEndpointInterface);\n\t\t}\n\t\tjava.lang.String inputPortName = portName.getLocalPart();\n\t\tif (\"UDPService\".equals(inputPortName)) {\n\t\t\treturn getUDPService();\n\t\t}\n\t\telse {\n\t\t\tjava.rmi.Remote _stub = getPort(serviceEndpointInterface);\n\t\t\t((org.apache.axis.client.Stub) _stub).setPortName(portName);\n\t\t\treturn _stub;\n\t\t}\n\t}", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"publicService\".equals(inputPortName)) {\n return getpublicService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"RemoteFacade.cfc\".equals(inputPortName)) {\r\n return getRemoteFacadeCfc();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"OutboundServiceSessionEJBBeanServicePort\".equals(inputPortName)) {\n return getOutboundServiceSessionEJBBeanServicePort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"UGSRuntimeServiceXfireImplHttpPort\".equals(inputPortName)) {\n return getUGSRuntimeServiceXfireImplHttpPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"dipp\".equals(inputPortName)) {\n return getdipp();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"CancelIMSHuawei_pt\".equals(inputPortName)) {\n return getCancelIMSHuawei_pt();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"CenterServerImplPort\".equals(inputPortName)) {\n return getCenterServerImplPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"msgserviceHttpSoap11Endpoint\".equals(inputPortName)) {\n return getmsgserviceHttpSoap11Endpoint();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"EmpleadoServiciolmpl\".equals(inputPortName)) {\r\n return getEmpleadoServiciolmpl();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (ifscarsservice.GarageSeller.class.isAssignableFrom(serviceEndpointInterface)) {\n ifscarsservice.GarageSellerSoapBindingStub _stub = new ifscarsservice.GarageSellerSoapBindingStub(new java.net.URL(GarageSeller_address), this);\n _stub.setPortName(getGarageSellerWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"OrderProcessingService\".equals(inputPortName)) {\n return getOrderProcessingService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2PortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2SOAP11BindingStub _stub = new com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2SOAP11BindingStub(new java.net.URL(JobSubmission2SOAP11port_http_address), this);\n _stub.setPortName(getJobSubmission2SOAP11port_httpWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"UploaderPort\".equals(inputPortName)) {\n return getUploaderPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\tif (portName == null) {\n\t\t\treturn getPort(serviceEndpointInterface);\n\t\t}\n\t\tjava.lang.String inputPortName = portName.getLocalPart();\n\t\tif (\"LinkIacWSSoap\".equals(inputPortName)) {\n\t\t\treturn getLinkIacWSSoap();\n\t\t} else {\n\t\t\tjava.rmi.Remote _stub = getPort(serviceEndpointInterface);\n\t\t\t((org.apache.axis.client.Stub) _stub).setPortName(portName);\n\t\t\treturn _stub;\n\t\t}\n\t}", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"FeeCreateSOAP\".equals(inputPortName)) {\n return getFeeCreateSOAP();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"WSEmisionAgricolaPort\".equals(inputPortName)) {\r\n return getWSEmisionAgricolaPort();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"webservice_vasmanHttpPort\".equals(inputPortName)) {\r\n return getwebservice_vasmanHttpPort();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"SliderSvcPort\".equals(inputPortName)) {\n return getSliderSvcPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"JobSubmission2SOAP11port_http\".equals(inputPortName)) {\n return getJobSubmission2SOAP11port_http();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"GarageSeller\".equals(inputPortName)) {\n return getGarageSeller();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"PersonController\".equals(inputPortName)) {\n return getPersonController();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"PublishAPIServiceSoap\".equals(inputPortName)) {\r\n return getPublishAPIServiceSoap();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n String inputPortName = portName.getLocalPart();\n if (\"WSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort\".equals(inputPortName)) {\n return getWSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort();\n }\n else {\n throw new javax.xml.rpc.ServiceException();\n }\n }", "public interface OperationServiceService extends javax.xml.rpc.Service {\n public java.lang.String getOperationServiceAddress();\n\n public fr.uphf.service.OperationService getOperationService() throws javax.xml.rpc.ServiceException;\n\n public fr.uphf.service.OperationService getOperationService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;\n}", "public Remote getPort(Class arg0) throws ServiceException {\n\t\treturn null;\n\t}", "public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }", "public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }", "public Remote getPort(QName arg0, Class arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface,\n WebServiceFeature... features);", "public static com.itheima.alipay.IALiPayService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.itheima.alipay.IALiPayService))) {\nreturn ((com.itheima.alipay.IALiPayService)iin);\n}\nreturn new com.itheima.alipay.IALiPayService.Stub.Proxy(obj);\n}", "Interface_decl getInterface();", "int getServicePort();", "public com.android.internal.telecom.IConnectionServiceAdapter getStub() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter\");\n }", "public Class getServiceInterface() {\n return null;\n }", "public static Interface getInterface() {\n return null;\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface InterfaceService\n extends ListenerService<InterfaceEvent, InterfaceListener> {\n\n /**\n * Returns the set of all interfaces in the system.\n *\n * @return set of interfaces\n */\n Set<Interface> getInterfaces();\n\n /**\n * Returns the interface with the given name.\n *\n * @param connectPoint connect point of the interface\n * @param name name of the interface\n * @return interface if it exists, otherwise null\n */\n Interface getInterfaceByName(ConnectPoint connectPoint, String name);\n\n /**\n * Returns the set of interfaces configured on the given port.\n *\n * @param port connect point\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByPort(ConnectPoint port);\n\n /**\n * Returns the set of interfaces with the given IP address.\n *\n * @param ip IP address\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByIp(IpAddress ip);\n\n /**\n * Returns the set of interfaces in the given VLAN.\n *\n * @param vlan VLAN ID of the interfaces\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByVlan(VlanId vlan);\n\n /**\n * Returns an interface that has an address that is in the same subnet as\n * the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return interface\n */\n Interface getMatchingInterface(IpAddress ip);\n\n /**\n * Returns all interfaces that have an address that is in the same\n * subnet as the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return a set of interfaces\n */\n Set<Interface> getMatchingInterfaces(IpAddress ip);\n\n /**\n * Returns untagged VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple untagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return untagged VLAN or null if not configured\n */\n default VlanId getUntaggedVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns tagged VLAN configured on given connect point.\n * <p>\n * Returns all matches if there are multiple tagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return tagged VLAN or empty set if not configured\n */\n default Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) {\n return ImmutableSet.of();\n }\n\n /**\n * Returns native VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple native VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return native VLAN or null if not configured\n */\n default VlanId getNativeVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns true if given connectPoint has an IP address or vlan configured\n * on any of its interfaces.\n *\n * @param connectPoint the port on a device\n * @return true if connectpoint has a configured interface\n */\n default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n\n /**\n * Returns true if given vlanId is in use due to configuration on any of the\n * interfaces in the system.\n *\n * @param vlanId the vlan id being queried\n * @return true if vlan is configured on any interface\n */\n default boolean inUse(VlanId vlanId) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n}", "public String getEndpointInterface()\r\n {\r\n return endpointInterface;\r\n }", "org.omg.CORBA.Object _get_interface_def();", "Interface getInterface();", "Interface getInterface();", "public AIDLInterface getInterface()\n\t{\n\t\t//System.out.println(\"---- mInterface -----\" + mInterface);\n\t\treturn mInterface;\n\t}", "public String getInterface () throws SDLIPException {\r\n XMLObject theInterface = new sdlip.xml.dom.XMLObject();\r\n tm.getInterface(theInterface);\r\n //return postProcess (theInterface, \"SDLIPInterface\", false);\r\n return theInterface.getString();\r\n }", "public Iterator getPorts() throws ServiceException {\n\t\treturn null;\n\t}", "public static android.telephony.mbms.vendor.IMbmsStreamingService asInterface(android.os.IBinder obj)\n {\n if ((obj==null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin!=null)&&(iin instanceof android.telephony.mbms.vendor.IMbmsStreamingService))) {\n return ((android.telephony.mbms.vendor.IMbmsStreamingService)iin);\n }\n return new android.telephony.mbms.vendor.IMbmsStreamingService.Stub.Proxy(obj);\n }", "public String getEjbHomeInterface();", "public String getEjbInterface();", "public java.rmi.Remote getSomethingRemote() throws RemoteException;", "public static com.sogou.speech.wakeup.wakeupservice.IWakeupService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.sogou.speech.wakeup.wakeupservice.IWakeupService))) {\nreturn ((com.sogou.speech.wakeup.wakeupservice.IWakeupService)iin);\n}\nreturn new com.sogou.speech.wakeup.wakeupservice.IWakeupService.Stub.Proxy(obj);\n}", "@Override\n\tpublic <ITF> Optional<ITF> getService(Class<ITF> itfClass, String servicePath) {\n\t\treturn IRegistryProvider.INSTANCE.getService(itfClass, servicePath);\n\t}", "IFMLPort createIFMLPort();", "public static jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService))) {\nreturn ((jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService)iin);\n}\nreturn new jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService.Stub.Proxy(obj);\n}", "public <T> IRemoteService<T> getRemoteService(T bean)\n/* */ {\n/* 82 */ if ((bean instanceof IRemoteService))\n/* 83 */ return (IRemoteService)bean;\n/* 84 */ RemoteService rs = (RemoteService)AnnotationUtils.getAnnotation(bean.getClass(), RemoteService.class);\n/* 85 */ String name = rs.value();\n/* 86 */ if (StringUtils.isEmpty(name))\n/* */ {\n/* 88 */ String[] names = applicationContext.getBeanNamesForType(bean.getClass());\n/* 89 */ if ((names != null) && (names.length > 0)) {\n/* 90 */ name = names[0];\n/* */ }\n/* */ }\n/* 93 */ if (StringUtils.isEmpty(name)) {\n/* 94 */ name = StringUtils.uncapitalize(bean.getClass().getSimpleName());\n/* */ }\n/* 96 */ CglibRemoteServiceProxy<T> proxy = new CglibRemoteServiceProxy();\n/* 97 */ IRemoteService<T> srv = proxy.bind(bean, name);\n/* 98 */ return srv;\n/* */ }", "public static native short getRemoteInterfaceAddress(Remote remoteObj, byte interfaceIndex);", "public abstract Object getInterface(String strInterfaceName_p, Object oObject_p) throws Exception;", "public static com.xintu.smartcar.bluetoothphone.iface.ContactInterface asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.xintu.smartcar.bluetoothphone.iface.ContactInterface))) {\nreturn ((com.xintu.smartcar.bluetoothphone.iface.ContactInterface)iin);\n}\nreturn new com.xintu.smartcar.bluetoothphone.iface.ContactInterface.Stub.Proxy(obj);\n}", "public interface Service extends AsyncRunnable, Remote {\n\n\tint registryPort() throws RemoteException;\n\n\tString name() throws RemoteException;\n}", "@Override\n public List<Address> getInterfaceAddresses() {\n List<Address> output = new ArrayList<>();\n\n Enumeration<NetworkInterface> ifaces;\n try {\n ifaces = NetworkInterface.getNetworkInterfaces();\n } catch (SocketException e) {\n // If we could not retrieve the network interface list, we\n // probably can't bind to any interface addresses either.\n return Collections.emptyList();\n }\n\n for (NetworkInterface iface : Collections.list(ifaces)) {\n // List the addresses associated with each interface.\n Enumeration<InetAddress> addresses = iface.getInetAddresses();\n for (InetAddress address : Collections.list(addresses)) {\n try {\n // Make an address object from each interface address, and\n // add it to the output list.\n output.add(Address.make(\"zmq://\" + address.getHostAddress() + \":\" + port));\n } catch (MalformedAddressException ignored) {\n // Should not be reachable.\n }\n }\n }\n\n return output;\n }", "private JiraManagementService getJiraManagementServicePort() throws JiraManagerException {\r\n try {\r\n return serviceClient.getJiraManagementServicePort();\r\n } catch (WebServiceException e) {\r\n Util.logError(log, e);\r\n throw new JiraManagerException(\"Unable to create JiraManagementService proxy.\", e);\r\n }\r\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public interface DemoService extends Remote {\r\n public final static String SERVICE_NAME = \"DemoService\";\r\n \r\n public String doTask(String[] args) throws RemoteException;\r\n}", "public org.tempuri.HISWebServiceStub.SapInterfaceResponse sapInterface(\r\n org.tempuri.HISWebServiceStub.SapInterface sapInterface16)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/SapInterface\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n sapInterface16,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"sapInterface\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"SapInterface\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.SapInterfaceResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.SapInterfaceResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "public native int getRemotePort() throws IOException,IllegalArgumentException;", "public InterfaceBean get(String id) {\n\t\treturn null;\n\t}", "public AddressInfo getLoopbackInterface() {\r\n return loopbackInterface;\r\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public <T> IRemoteService<T> getRemoteService(String bizId)\n/* */ {\n/* 51 */ if (applicationContext != null)\n/* */ {\n/* 53 */ T bean = applicationContext.getBean(bizId);\n/* 54 */ if (bean != null)\n/* 55 */ return getRemoteService(bean);\n/* */ }\n/* 57 */ return null;\n/* */ }", "public static android.service.fingerprint.IFingerprintServiceReceiver asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof android.service.fingerprint.IFingerprintServiceReceiver))) {\nreturn ((android.service.fingerprint.IFingerprintServiceReceiver)iin);\n}\nreturn new android.service.fingerprint.IFingerprintServiceReceiver.Stub.Proxy(obj);\n}", "public interface RMIInterface extends Remote {\n\n public String helloTo(String name) throws RemoteException;\n\n}", "public static org.chromium.weblayer_private.interfaces.ITab asInterface(android.os.IBinder obj)\n {\n if ((obj==null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin!=null)&&(iin instanceof org.chromium.weblayer_private.interfaces.ITab))) {\n return ((org.chromium.weblayer_private.interfaces.ITab)iin);\n }\n return new org.chromium.weblayer_private.interfaces.ITab.Stub.Proxy(obj);\n }", "private static String readAddressFromInterface(final String interfaceName) {\n try {\n final String filePath = \"/sys/class/net/\" + interfaceName + \"/address\";\n final StringBuilder fileData = new StringBuilder(1000);\n final BufferedReader reader = new BufferedReader(new FileReader(filePath), 1024);\n final char[] buf = new char[1024];\n int numRead;\n\n String readData;\n while ((numRead = reader.read(buf)) != -1) {\n readData = String.valueOf(buf, 0, numRead);\n fileData.append(readData);\n }\n\n reader.close();\n return fileData.toString();\n } catch (IOException e) {\n return null;\n }\n }" ]
[ "0.78286654", "0.7688559", "0.7677454", "0.7644553", "0.7643072", "0.76214576", "0.7620097", "0.76175714", "0.7575225", "0.7573785", "0.75614876", "0.75524366", "0.7525484", "0.7500085", "0.74891156", "0.74784493", "0.7407812", "0.7401983", "0.74010134", "0.7390378", "0.7379585", "0.7352709", "0.7324118", "0.7316506", "0.7312808", "0.7293492", "0.7292433", "0.72868514", "0.72840774", "0.72803867", "0.7268173", "0.7263739", "0.72385585", "0.72340447", "0.72322136", "0.72257316", "0.72013", "0.71953535", "0.71914953", "0.7184197", "0.71789426", "0.71664405", "0.7163969", "0.7158612", "0.71472085", "0.70485556", "0.69251925", "0.6924693", "0.69120824", "0.6910213", "0.6866271", "0.5660134", "0.5557791", "0.54825014", "0.54553586", "0.54427135", "0.5423252", "0.53972125", "0.53077507", "0.53013444", "0.52957904", "0.5275864", "0.5268648", "0.5217535", "0.52089983", "0.5150202", "0.5027573", "0.500214", "0.4991043", "0.4991043", "0.49753943", "0.49674422", "0.4923391", "0.4918145", "0.4916884", "0.49046877", "0.48898366", "0.48612165", "0.47913176", "0.47476396", "0.4741354", "0.47210348", "0.47111708", "0.4681688", "0.46773756", "0.46748206", "0.46718132", "0.4666893", "0.46605363", "0.4659263", "0.46504304", "0.4643769", "0.46386054", "0.4633119", "0.4610192", "0.4601075", "0.45811197", "0.45747736", "0.4572508", "0.4570842" ]
0.7633333
5
For the given interface, get the stub implementation. If this service has no port for the given interface, then ServiceException is thrown.
public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { if (portName == null) { return getPort(serviceEndpointInterface); } java.lang.String inputPortName = portName.getLocalPart(); if ("WSExtensionService".equals(inputPortName)) { return getWSExtensionService(); } else { java.rmi.Remote _stub = getPort(serviceEndpointInterface); ((org.apache.axis.client.Stub) _stub).setPortName(portName); return _stub; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Remote getPort(Class serviceEndpointInterface) throws ServiceException {\n try {\n if (SDKClient.class.isAssignableFrom(serviceEndpointInterface)) {\n SDKServiceBindingStub _stub = new SDKServiceBindingStub(new java.net.URL(SDKService_address), this);\n _stub.setPortName(getSDKServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (Throwable t) {\n throw new ServiceException(t);\n }\n throw new ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.mozart.web.wsdl.sosistemas.NFEServices.class.isAssignableFrom(serviceEndpointInterface)) {\n com.mozart.web.wsdl.sosistemas.NFEServicesSoapBindingStub _stub = new com.mozart.web.wsdl.sosistemas.NFEServicesSoapBindingStub(new java.net.URL(NFEServices_address), this);\n _stub.setPortName(getNFEServicesWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\ttry {\n\t\t\tif (kz.lof.webservices.clients.udp.UDPService.class.isAssignableFrom(serviceEndpointInterface)) {\n\t\t\t\tkz.lof.webservices.clients.udp.UDPServiceSoapBindingStub _stub = new kz.lof.webservices.clients.udp.UDPServiceSoapBindingStub(new java.net.URL(UDPService_address), this);\n\t\t\t\t_stub.setPortName(getUDPServiceWSDDServiceName());\n\t\t\t\treturn _stub;\n\t\t\t}\n\t\t}\n\t\tcatch (java.lang.Throwable t) {\n\t\t\tthrow new javax.xml.rpc.ServiceException(t);\n\t\t}\n\t\tthrow new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n\t}", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.iwinner.ws.service.WsUserServiceImpl.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.iwinner.ws.service.WsUserServiceImplSoapBindingStub _stub = new com.iwinner.ws.service.WsUserServiceImplSoapBindingStub(new java.net.URL(WsUserServiceImpl_address), this);\r\n _stub.setPortName(getWsUserServiceImplWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuawei.class.isAssignableFrom(serviceEndpointInterface)) {\n com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuaweiBindingStub _stub = new com.oracle.xmlns.IMS.CancelIMSHuawei.CancelIMSHuawei.CancelIMSHuaweiBindingStub(new java.net.URL(CancelIMSHuawei_pt_address), this);\n _stub.setPortName(getCancelIMSHuawei_ptWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.ibm.itim.ws.services.WSExtensionService.class.isAssignableFrom(serviceEndpointInterface)) {\n com.ibm.itim.ws.services.WSExtensionServiceSoapBindingStub _stub = new com.ibm.itim.ws.services.WSExtensionServiceSoapBindingStub(new java.net.URL(WSExtensionService_address), this);\n _stub.setPortName(getWSExtensionServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (de.java2enterprise.onlineshop.Uploader.class.isAssignableFrom(serviceEndpointInterface)) {\n de.java2enterprise.onlineshop.UploaderPortBindingStub _stub = new de.java2enterprise.onlineshop.UploaderPortBindingStub(new java.net.URL(UploaderPort_address), this);\n _stub.setPortName(getUploaderPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (co.edu.uan.servicio.EmpleadoServiciolmpl.class.isAssignableFrom(serviceEndpointInterface)) {\r\n co.edu.uan.servicio.EmpleadoServiciolmplSoapBindingStub _stub = new co.edu.uan.servicio.EmpleadoServiciolmplSoapBindingStub(new java.net.URL(EmpleadoServiciolmpl_address), this);\r\n _stub.setPortName(getEmpleadoServiciolmplWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricola_PortType.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricolaPortBindingStub _stub = new com.qbe.cotizador.servicios.QBE.emisionAgricolaWS.WSEmisionAgricolaPortBindingStub(new java.net.URL(WSEmisionAgricolaPort_address), this);\r\n _stub.setPortName(getWSEmisionAgricolaPortWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacade.class.isAssignableFrom(serviceEndpointInterface)) {\r\n org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacadeCfcSoapBindingStub _stub = new org.mxunit.eclipseplugin.actions.bindings.generated.bluedragon.RemoteFacadeCfcSoapBindingStub(new java.net.URL(RemoteFacadeCfc_address), this);\r\n _stub.setPortName(getRemoteFacadeCfcWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.pws.integration.pathway.OutboundServiceSessionEJBPortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.pws.integration.pathway.OutboundServiceSessionEJBBeanServicePortBindingStub _stub = new com.pws.integration.pathway.OutboundServiceSessionEJBBeanServicePortBindingStub(new java.net.URL(OutboundServiceSessionEJBBeanServicePort_address), this);\n _stub.setPortName(getOutboundServiceSessionEJBBeanServicePortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplPortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplHttpBindingStub _stub = new com.hp.it.spf.user.group.stub.UGSRuntimeServiceXfireImplHttpBindingStub(new java.net.URL(UGSRuntimeServiceXfireImplHttpPort_address), this);\n _stub.setPortName(getUGSRuntimeServiceXfireImplHttpPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\ttry {\n\t\t\tif (iace.webservice.linkiacClient.LinkIacWSSoap.class.isAssignableFrom(serviceEndpointInterface)) {\n\t\t\t\tiace.webservice.linkiacClient.LinkIacWSSoapStub _stub = new iace.webservice.linkiacClient.LinkIacWSSoapStub(new java.net.URL(LinkIacWSSoap_address), this);\n\t\t\t\t_stub.setPortName(getLinkIacWSSoapWSDDServiceName());\n\t\t\t\treturn _stub;\n\t\t\t}\n\t\t} catch (java.lang.Throwable t) {\n\t\t\tthrow new javax.xml.rpc.ServiceException(t);\n\t\t}\n\t\tthrow new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n\t}", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (ca.concordia.dsd.stub.CenterServerImpl.class.isAssignableFrom(serviceEndpointInterface)) {\n ca.concordia.dsd.stub.CenterServerImplPortBindingStub _stub = new ca.concordia.dsd.stub.CenterServerImplPortBindingStub(new java.net.URL(CenterServerImplPort_address), this);\n _stub.setPortName(getCenterServerImplPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.hoyotech.group.MsgservicePortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.hoyotech.group.MsgserviceSoap11BindingStub _stub = new com.hoyotech.group.MsgserviceSoap11BindingStub(new java.net.URL(msgserviceHttpSoap11Endpoint_address), this);\n _stub.setPortName(getmsgserviceHttpSoap11EndpointWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (de.nrw.dipp.dippCore.www.definitions.ContentModel.class.isAssignableFrom(serviceEndpointInterface)) {\n de.nrw.dipp.dippCore.www.definitions.DippSoapBindingStub _stub = new de.nrw.dipp.dippCore.www.definitions.DippSoapBindingStub(new java.net.URL(dipp_address), this);\n _stub.setPortName(getdippWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (sample.OrderProcessingService.class.isAssignableFrom(serviceEndpointInterface)) {\n sample.OrderProcessingServiceSoapBindingStub _stub = new sample.OrderProcessingServiceSoapBindingStub(new java.net.URL(OrderProcessingService_address), this);\n _stub.setPortName(getOrderProcessingServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (org.sirius.server.win32lib.controls.slider.ISliderContract.class.isAssignableFrom(serviceEndpointInterface)) {\n org.sirius.server.win32lib.controls.slider.SliderSvcPortStub _stub = new org.sirius.server.win32lib.controls.slider.SliderSvcPortStub(new java.net.URL(SliderSvcPort_address), this);\n _stub.setPortName(getSliderSvcPortWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n String inputPortName = portName.getLocalPart();\n if (\"SDKService\".equals(inputPortName)) {\n return getSDKService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (com.crm.service.elcom.vasman.Webservice_vasmanPortType.class.isAssignableFrom(serviceEndpointInterface)) {\r\n com.crm.service.elcom.vasman.Webservice_vasmanHttpBindingStub _stub = new com.crm.service.elcom.vasman.Webservice_vasmanHttpBindingStub(new java.net.URL(webservice_vasmanHttpPort_address), this);\r\n _stub.setPortName(getwebservice_vasmanHttpPortWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"NFEServices\".equals(inputPortName)) {\n return getNFEServices();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (mastercom.app.FeeCreate.FeeCreate_PortType.class.isAssignableFrom(serviceEndpointInterface)) {\n mastercom.app.FeeCreate.FeeCreateSOAPStub _stub = new mastercom.app.FeeCreate.FeeCreateSOAPStub(new java.net.URL(FeeCreateSOAP_address), this);\n _stub.setPortName(getFeeCreateSOAPWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (src.PublicService.class.isAssignableFrom(serviceEndpointInterface)) {\n src.PublicServiceSoapBindingStub _stub = new src.PublicServiceSoapBindingStub(new java.net.URL(publicService_address), this);\n _stub.setPortName(getpublicServiceWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (AES_MB_IntakeWOList_Lib_1_0.AES_MB_IntakeWOList_Intf_1_0.class.isAssignableFrom(serviceEndpointInterface)) {\n return getWSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort();\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"WSWS3273E: Error: There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"WsUserServiceImpl\".equals(inputPortName)) {\r\n return getWsUserServiceImpl();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n try {\r\n if (org.tempuri.PublishAPIServiceSoap.class.isAssignableFrom(serviceEndpointInterface)) {\r\n org.tempuri.PublishAPIServiceSoapStub _stub = new org.tempuri.PublishAPIServiceSoapStub(new java.net.URL(PublishAPIServiceSoap_address), this);\r\n _stub.setPortName(getPublishAPIServiceSoapWSDDServiceName());\r\n return _stub;\r\n }\r\n }\r\n catch (java.lang.Throwable t) {\r\n throw new javax.xml.rpc.ServiceException(t);\r\n }\r\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.mx.everis.taller.controller.PersonController.class.isAssignableFrom(serviceEndpointInterface)) {\n com.mx.everis.taller.controller.PersonControllerSoapBindingStub _stub = new com.mx.everis.taller.controller.PersonControllerSoapBindingStub(new java.net.URL(PersonController_address), this);\n _stub.setPortName(getPersonControllerWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\tif (portName == null) {\n\t\t\treturn getPort(serviceEndpointInterface);\n\t\t}\n\t\tjava.lang.String inputPortName = portName.getLocalPart();\n\t\tif (\"UDPService\".equals(inputPortName)) {\n\t\t\treturn getUDPService();\n\t\t}\n\t\telse {\n\t\t\tjava.rmi.Remote _stub = getPort(serviceEndpointInterface);\n\t\t\t((org.apache.axis.client.Stub) _stub).setPortName(portName);\n\t\t\treturn _stub;\n\t\t}\n\t}", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"publicService\".equals(inputPortName)) {\n return getpublicService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"RemoteFacade.cfc\".equals(inputPortName)) {\r\n return getRemoteFacadeCfc();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"OutboundServiceSessionEJBBeanServicePort\".equals(inputPortName)) {\n return getOutboundServiceSessionEJBBeanServicePort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"UGSRuntimeServiceXfireImplHttpPort\".equals(inputPortName)) {\n return getUGSRuntimeServiceXfireImplHttpPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"dipp\".equals(inputPortName)) {\n return getdipp();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"CancelIMSHuawei_pt\".equals(inputPortName)) {\n return getCancelIMSHuawei_pt();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"CenterServerImplPort\".equals(inputPortName)) {\n return getCenterServerImplPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"msgserviceHttpSoap11Endpoint\".equals(inputPortName)) {\n return getmsgserviceHttpSoap11Endpoint();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"EmpleadoServiciolmpl\".equals(inputPortName)) {\r\n return getEmpleadoServiciolmpl();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (ifscarsservice.GarageSeller.class.isAssignableFrom(serviceEndpointInterface)) {\n ifscarsservice.GarageSellerSoapBindingStub _stub = new ifscarsservice.GarageSellerSoapBindingStub(new java.net.URL(GarageSeller_address), this);\n _stub.setPortName(getGarageSellerWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"OrderProcessingService\".equals(inputPortName)) {\n return getOrderProcessingService();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n try {\n if (com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2PortType.class.isAssignableFrom(serviceEndpointInterface)) {\n com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2SOAP11BindingStub _stub = new com.lexmark.workflow.components.prompt.jsapi2.JobSubmission2SOAP11BindingStub(new java.net.URL(JobSubmission2SOAP11port_http_address), this);\n _stub.setPortName(getJobSubmission2SOAP11port_httpWSDDServiceName());\n return _stub;\n }\n }\n catch (java.lang.Throwable t) {\n throw new javax.xml.rpc.ServiceException(t);\n }\n throw new javax.xml.rpc.ServiceException(\"There is no stub implementation for the interface: \" + (serviceEndpointInterface == null ? \"null\" : serviceEndpointInterface.getName()));\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"UploaderPort\".equals(inputPortName)) {\n return getUploaderPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n\t\tif (portName == null) {\n\t\t\treturn getPort(serviceEndpointInterface);\n\t\t}\n\t\tjava.lang.String inputPortName = portName.getLocalPart();\n\t\tif (\"LinkIacWSSoap\".equals(inputPortName)) {\n\t\t\treturn getLinkIacWSSoap();\n\t\t} else {\n\t\t\tjava.rmi.Remote _stub = getPort(serviceEndpointInterface);\n\t\t\t((org.apache.axis.client.Stub) _stub).setPortName(portName);\n\t\t\treturn _stub;\n\t\t}\n\t}", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"FeeCreateSOAP\".equals(inputPortName)) {\n return getFeeCreateSOAP();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"WSEmisionAgricolaPort\".equals(inputPortName)) {\r\n return getWSEmisionAgricolaPort();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"webservice_vasmanHttpPort\".equals(inputPortName)) {\r\n return getwebservice_vasmanHttpPort();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"SliderSvcPort\".equals(inputPortName)) {\n return getSliderSvcPort();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"JobSubmission2SOAP11port_http\".equals(inputPortName)) {\n return getJobSubmission2SOAP11port_http();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"GarageSeller\".equals(inputPortName)) {\n return getGarageSeller();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n if (portName == null) {\n return getPort(serviceEndpointInterface);\n }\n java.lang.String inputPortName = portName.getLocalPart();\n if (\"PersonController\".equals(inputPortName)) {\n return getPersonController();\n }\n else {\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\n return _stub;\n }\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\r\n if (portName == null) {\r\n return getPort(serviceEndpointInterface);\r\n }\r\n java.lang.String inputPortName = portName.getLocalPart();\r\n if (\"PublishAPIServiceSoap\".equals(inputPortName)) {\r\n return getPublishAPIServiceSoap();\r\n }\r\n else {\r\n java.rmi.Remote _stub = getPort(serviceEndpointInterface);\r\n ((org.apache.axis.client.Stub) _stub).setPortName(portName);\r\n return _stub;\r\n }\r\n }", "public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException {\n String inputPortName = portName.getLocalPart();\n if (\"WSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort\".equals(inputPortName)) {\n return getWSExport1_AES_MB_IntakeWOList_Intf_1_0HttpPort();\n }\n else {\n throw new javax.xml.rpc.ServiceException();\n }\n }", "public interface OperationServiceService extends javax.xml.rpc.Service {\n public java.lang.String getOperationServiceAddress();\n\n public fr.uphf.service.OperationService getOperationService() throws javax.xml.rpc.ServiceException;\n\n public fr.uphf.service.OperationService getOperationService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;\n}", "public Remote getPort(Class arg0) throws ServiceException {\n\t\treturn null;\n\t}", "public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }", "@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }", "public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }", "public Remote getPort(QName arg0, Class arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public abstract <T> T getPort(EndpointReference endpointReference, Class<T> serviceEndpointInterface,\n WebServiceFeature... features);", "public static com.itheima.alipay.IALiPayService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.itheima.alipay.IALiPayService))) {\nreturn ((com.itheima.alipay.IALiPayService)iin);\n}\nreturn new com.itheima.alipay.IALiPayService.Stub.Proxy(obj);\n}", "Interface_decl getInterface();", "int getServicePort();", "public com.android.internal.telecom.IConnectionServiceAdapter getStub() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter\");\n }", "public Class getServiceInterface() {\n return null;\n }", "public static Interface getInterface() {\n return null;\n }", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "public interface InterfaceService\n extends ListenerService<InterfaceEvent, InterfaceListener> {\n\n /**\n * Returns the set of all interfaces in the system.\n *\n * @return set of interfaces\n */\n Set<Interface> getInterfaces();\n\n /**\n * Returns the interface with the given name.\n *\n * @param connectPoint connect point of the interface\n * @param name name of the interface\n * @return interface if it exists, otherwise null\n */\n Interface getInterfaceByName(ConnectPoint connectPoint, String name);\n\n /**\n * Returns the set of interfaces configured on the given port.\n *\n * @param port connect point\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByPort(ConnectPoint port);\n\n /**\n * Returns the set of interfaces with the given IP address.\n *\n * @param ip IP address\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByIp(IpAddress ip);\n\n /**\n * Returns the set of interfaces in the given VLAN.\n *\n * @param vlan VLAN ID of the interfaces\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByVlan(VlanId vlan);\n\n /**\n * Returns an interface that has an address that is in the same subnet as\n * the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return interface\n */\n Interface getMatchingInterface(IpAddress ip);\n\n /**\n * Returns all interfaces that have an address that is in the same\n * subnet as the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return a set of interfaces\n */\n Set<Interface> getMatchingInterfaces(IpAddress ip);\n\n /**\n * Returns untagged VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple untagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return untagged VLAN or null if not configured\n */\n default VlanId getUntaggedVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns tagged VLAN configured on given connect point.\n * <p>\n * Returns all matches if there are multiple tagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return tagged VLAN or empty set if not configured\n */\n default Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) {\n return ImmutableSet.of();\n }\n\n /**\n * Returns native VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple native VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return native VLAN or null if not configured\n */\n default VlanId getNativeVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns true if given connectPoint has an IP address or vlan configured\n * on any of its interfaces.\n *\n * @param connectPoint the port on a device\n * @return true if connectpoint has a configured interface\n */\n default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n\n /**\n * Returns true if given vlanId is in use due to configuration on any of the\n * interfaces in the system.\n *\n * @param vlanId the vlan id being queried\n * @return true if vlan is configured on any interface\n */\n default boolean inUse(VlanId vlanId) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n}", "public String getEndpointInterface()\r\n {\r\n return endpointInterface;\r\n }", "org.omg.CORBA.Object _get_interface_def();", "Interface getInterface();", "Interface getInterface();", "public AIDLInterface getInterface()\n\t{\n\t\t//System.out.println(\"---- mInterface -----\" + mInterface);\n\t\treturn mInterface;\n\t}", "public String getInterface () throws SDLIPException {\r\n XMLObject theInterface = new sdlip.xml.dom.XMLObject();\r\n tm.getInterface(theInterface);\r\n //return postProcess (theInterface, \"SDLIPInterface\", false);\r\n return theInterface.getString();\r\n }", "public Iterator getPorts() throws ServiceException {\n\t\treturn null;\n\t}", "public static android.telephony.mbms.vendor.IMbmsStreamingService asInterface(android.os.IBinder obj)\n {\n if ((obj==null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin!=null)&&(iin instanceof android.telephony.mbms.vendor.IMbmsStreamingService))) {\n return ((android.telephony.mbms.vendor.IMbmsStreamingService)iin);\n }\n return new android.telephony.mbms.vendor.IMbmsStreamingService.Stub.Proxy(obj);\n }", "public String getEjbHomeInterface();", "public String getEjbInterface();", "public java.rmi.Remote getSomethingRemote() throws RemoteException;", "public static com.sogou.speech.wakeup.wakeupservice.IWakeupService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.sogou.speech.wakeup.wakeupservice.IWakeupService))) {\nreturn ((com.sogou.speech.wakeup.wakeupservice.IWakeupService)iin);\n}\nreturn new com.sogou.speech.wakeup.wakeupservice.IWakeupService.Stub.Proxy(obj);\n}", "@Override\n\tpublic <ITF> Optional<ITF> getService(Class<ITF> itfClass, String servicePath) {\n\t\treturn IRegistryProvider.INSTANCE.getService(itfClass, servicePath);\n\t}", "IFMLPort createIFMLPort();", "public static jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService))) {\nreturn ((jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService)iin);\n}\nreturn new jag.kumamoto.apps.gotochi.stamprally.IArriveWatcherService.Stub.Proxy(obj);\n}", "public <T> IRemoteService<T> getRemoteService(T bean)\n/* */ {\n/* 82 */ if ((bean instanceof IRemoteService))\n/* 83 */ return (IRemoteService)bean;\n/* 84 */ RemoteService rs = (RemoteService)AnnotationUtils.getAnnotation(bean.getClass(), RemoteService.class);\n/* 85 */ String name = rs.value();\n/* 86 */ if (StringUtils.isEmpty(name))\n/* */ {\n/* 88 */ String[] names = applicationContext.getBeanNamesForType(bean.getClass());\n/* 89 */ if ((names != null) && (names.length > 0)) {\n/* 90 */ name = names[0];\n/* */ }\n/* */ }\n/* 93 */ if (StringUtils.isEmpty(name)) {\n/* 94 */ name = StringUtils.uncapitalize(bean.getClass().getSimpleName());\n/* */ }\n/* 96 */ CglibRemoteServiceProxy<T> proxy = new CglibRemoteServiceProxy();\n/* 97 */ IRemoteService<T> srv = proxy.bind(bean, name);\n/* 98 */ return srv;\n/* */ }", "public static native short getRemoteInterfaceAddress(Remote remoteObj, byte interfaceIndex);", "public abstract Object getInterface(String strInterfaceName_p, Object oObject_p) throws Exception;", "public static com.xintu.smartcar.bluetoothphone.iface.ContactInterface asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.xintu.smartcar.bluetoothphone.iface.ContactInterface))) {\nreturn ((com.xintu.smartcar.bluetoothphone.iface.ContactInterface)iin);\n}\nreturn new com.xintu.smartcar.bluetoothphone.iface.ContactInterface.Stub.Proxy(obj);\n}", "public interface Service extends AsyncRunnable, Remote {\n\n\tint registryPort() throws RemoteException;\n\n\tString name() throws RemoteException;\n}", "@Override\n public List<Address> getInterfaceAddresses() {\n List<Address> output = new ArrayList<>();\n\n Enumeration<NetworkInterface> ifaces;\n try {\n ifaces = NetworkInterface.getNetworkInterfaces();\n } catch (SocketException e) {\n // If we could not retrieve the network interface list, we\n // probably can't bind to any interface addresses either.\n return Collections.emptyList();\n }\n\n for (NetworkInterface iface : Collections.list(ifaces)) {\n // List the addresses associated with each interface.\n Enumeration<InetAddress> addresses = iface.getInetAddresses();\n for (InetAddress address : Collections.list(addresses)) {\n try {\n // Make an address object from each interface address, and\n // add it to the output list.\n output.add(Address.make(\"zmq://\" + address.getHostAddress() + \":\" + port));\n } catch (MalformedAddressException ignored) {\n // Should not be reachable.\n }\n }\n }\n\n return output;\n }", "private JiraManagementService getJiraManagementServicePort() throws JiraManagerException {\r\n try {\r\n return serviceClient.getJiraManagementServicePort();\r\n } catch (WebServiceException e) {\r\n Util.logError(log, e);\r\n throw new JiraManagerException(\"Unable to create JiraManagementService proxy.\", e);\r\n }\r\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation1();\n\t\t}", "public interface DemoService extends Remote {\r\n public final static String SERVICE_NAME = \"DemoService\";\r\n \r\n public String doTask(String[] args) throws RemoteException;\r\n}", "public org.tempuri.HISWebServiceStub.SapInterfaceResponse sapInterface(\r\n org.tempuri.HISWebServiceStub.SapInterface sapInterface16)\r\n throws java.rmi.RemoteException {\r\n org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\r\n\r\n try {\r\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\r\n _operationClient.getOptions()\r\n .setAction(\"http://tempuri.org/SapInterface\");\r\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\r\n\r\n addPropertyToOperationClient(_operationClient,\r\n org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\r\n \"&\");\r\n\r\n // create SOAP envelope with that payload\r\n org.apache.axiom.soap.SOAPEnvelope env = null;\r\n\r\n env = toEnvelope(getFactory(_operationClient.getOptions()\r\n .getSoapVersionURI()),\r\n sapInterface16,\r\n optimizeContent(\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"sapInterface\")),\r\n new javax.xml.namespace.QName(\"http://tempuri.org/\",\r\n \"SapInterface\"));\r\n\r\n //adding SOAP soap_headers\r\n _serviceClient.addHeadersToEnvelope(env);\r\n // set the message context with that soap envelope\r\n _messageContext.setEnvelope(env);\r\n\r\n // add the message contxt to the operation client\r\n _operationClient.addMessageContext(_messageContext);\r\n\r\n //execute the operation client\r\n _operationClient.execute(true);\r\n\r\n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\r\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\r\n\r\n java.lang.Object object = fromOM(_returnEnv.getBody()\r\n .getFirstElement(),\r\n org.tempuri.HISWebServiceStub.SapInterfaceResponse.class);\r\n\r\n return (org.tempuri.HISWebServiceStub.SapInterfaceResponse) object;\r\n } catch (org.apache.axis2.AxisFault f) {\r\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\r\n\r\n if (faultElt != null) {\r\n if (faultExceptionNameMap.containsKey(\r\n new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"))) {\r\n //make the fault by reflection\r\n try {\r\n java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"));\r\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\r\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);\r\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\r\n\r\n //message class\r\n java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(\r\n faultElt.getQName(), \"SapInterface\"));\r\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\r\n java.lang.Object messageObject = fromOM(faultElt,\r\n messageClass);\r\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\r\n new java.lang.Class[] { messageClass });\r\n m.invoke(ex, new java.lang.Object[] { messageObject });\r\n\r\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\r\n } catch (java.lang.ClassCastException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.ClassNotFoundException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.NoSuchMethodException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.reflect.InvocationTargetException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.IllegalAccessException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n } catch (java.lang.InstantiationException e) {\r\n // we cannot intantiate the class - throw the original Axis fault\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } else {\r\n throw f;\r\n }\r\n } finally {\r\n if (_messageContext.getTransportOut() != null) {\r\n _messageContext.getTransportOut().getSender()\r\n .cleanup(_messageContext);\r\n }\r\n }\r\n }", "public native int getRemotePort() throws IOException,IllegalArgumentException;", "public InterfaceBean get(String id) {\n\t\treturn null;\n\t}", "public AddressInfo getLoopbackInterface() {\r\n return loopbackInterface;\r\n }", "@Override\n\t\tpublic Service getService() {\n\t\t\treturn new Implementation2();\n\t\t}", "public <T> IRemoteService<T> getRemoteService(String bizId)\n/* */ {\n/* 51 */ if (applicationContext != null)\n/* */ {\n/* 53 */ T bean = applicationContext.getBean(bizId);\n/* 54 */ if (bean != null)\n/* 55 */ return getRemoteService(bean);\n/* */ }\n/* 57 */ return null;\n/* */ }", "public static android.service.fingerprint.IFingerprintServiceReceiver asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof android.service.fingerprint.IFingerprintServiceReceiver))) {\nreturn ((android.service.fingerprint.IFingerprintServiceReceiver)iin);\n}\nreturn new android.service.fingerprint.IFingerprintServiceReceiver.Stub.Proxy(obj);\n}", "public interface RMIInterface extends Remote {\n\n public String helloTo(String name) throws RemoteException;\n\n}", "public static org.chromium.weblayer_private.interfaces.ITab asInterface(android.os.IBinder obj)\n {\n if ((obj==null)) {\n return null;\n }\n android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (((iin!=null)&&(iin instanceof org.chromium.weblayer_private.interfaces.ITab))) {\n return ((org.chromium.weblayer_private.interfaces.ITab)iin);\n }\n return new org.chromium.weblayer_private.interfaces.ITab.Stub.Proxy(obj);\n }", "private static String readAddressFromInterface(final String interfaceName) {\n try {\n final String filePath = \"/sys/class/net/\" + interfaceName + \"/address\";\n final StringBuilder fileData = new StringBuilder(1000);\n final BufferedReader reader = new BufferedReader(new FileReader(filePath), 1024);\n final char[] buf = new char[1024];\n int numRead;\n\n String readData;\n while ((numRead = reader.read(buf)) != -1) {\n readData = String.valueOf(buf, 0, numRead);\n fileData.append(readData);\n }\n\n reader.close();\n return fileData.toString();\n } catch (IOException e) {\n return null;\n }\n }" ]
[ "0.782763", "0.76865995", "0.7675835", "0.7642962", "0.7641442", "0.76316404", "0.7620029", "0.7619347", "0.7616479", "0.7573579", "0.7572099", "0.75600874", "0.7551034", "0.7524021", "0.74983776", "0.7487805", "0.7476485", "0.74065953", "0.7401048", "0.7400837", "0.7390175", "0.73510176", "0.73229235", "0.7315811", "0.7312653", "0.72921115", "0.72913134", "0.7286671", "0.72842604", "0.7280111", "0.7267828", "0.72637427", "0.7238399", "0.72335976", "0.7232226", "0.7225439", "0.7201375", "0.719336", "0.71911615", "0.71829945", "0.71790045", "0.7166348", "0.71634877", "0.7158883", "0.7147241", "0.70485175", "0.6925114", "0.6924536", "0.6912358", "0.69104785", "0.68669075", "0.56619537", "0.5561122", "0.5483029", "0.5454507", "0.54430133", "0.54266346", "0.5397581", "0.5307392", "0.52997595", "0.52988964", "0.52775407", "0.52689445", "0.5215898", "0.5208951", "0.5151405", "0.5027723", "0.5001448", "0.49894515", "0.49894515", "0.49741063", "0.496685", "0.49260563", "0.49182934", "0.4916921", "0.49046874", "0.48919326", "0.48611423", "0.47908863", "0.4748013", "0.47420257", "0.47231242", "0.47102603", "0.4681761", "0.46767724", "0.46762538", "0.4672945", "0.46714997", "0.4663368", "0.4659584", "0.46481335", "0.46463445", "0.46376663", "0.4632854", "0.46132624", "0.46017948", "0.458066", "0.45742622", "0.45713753", "0.45693243" ]
0.7379483
21
Set the endpoint address for the specified port name.
public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { if ("WSExtensionService".equals(portName)) { setWSExtensionServiceEndpointAddress(address); } else { // Unknown Port Name throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"dipp\".equals(portName)) {\n setdippEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"webservice_vasmanHttpPort\".equals(portName)) {\r\n setwebservice_vasmanHttpPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"JobSubmission2SOAP11port_http\".equals(portName)) {\n setJobSubmission2SOAP11port_httpEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UploaderPort\".equals(portName)) {\n setUploaderPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OutboundServiceSessionEJBBeanServicePort\".equals(portName)) {\n setOutboundServiceSessionEJBBeanServicePortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\n\t\tif (\"UDPService\".equals(portName)) {\n\t\t\tsetUDPServiceEndpointAddress(address);\n\t\t}\n\t\telse \n\t\t{ // Unknown Port Name\n\t\t\tthrow new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n\t\t}\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UGSRuntimeServiceXfireImplHttpPort\".equals(portName)) {\n setUGSRuntimeServiceXfireImplHttpPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"EmpleadoServiciolmpl\".equals(portName)) {\r\n setEmpleadoServiciolmplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"FeeCreateSOAP\".equals(portName)) {\n setFeeCreateSOAPEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CenterServerImplPort\".equals(portName)) {\n setCenterServerImplPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"PersonController\".equals(portName)) {\n setPersonControllerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"NFEServices\".equals(portName)) {\n setNFEServicesEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WSEmisionAgricolaPort\".equals(portName)) {\r\n setWSEmisionAgricolaPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"RemoteFacadeCfc\".equals(portName)) {\r\n setRemoteFacadeCfcEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"msgserviceHttpSoap11Endpoint\".equals(portName)) {\n setmsgserviceHttpSoap11EndpointEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"SliderSvcPort\".equals(portName)) {\n setSliderSvcPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\n\t\tif (\"LinkIacWSSoap\".equals(portName)) {\n\t\t\tsetLinkIacWSSoapEndpointAddress(address);\n\t\t} else { // Unknown Port Name\n\t\t\tthrow new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n\t\t}\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"PublishAPIServiceSoap\".equals(portName)) {\r\n setPublishAPIServiceSoapEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WsUserServiceImpl\".equals(portName)) {\r\n setWsUserServiceImplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CancelIMSHuawei_pt\".equals(portName)) {\n setCancelIMSHuawei_ptEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"GarageSeller\".equals(portName)) {\n setGarageSellerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"publicService\".equals(portName)) {\n setpublicServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(QName portName, String address) throws ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\t\tsetEndpointAddress(portName.getLocalPart(), address);\n\t}", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\t\tsetEndpointAddress(portName.getLocalPart(), address);\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OrderProcessingService\".equals(portName)) {\n setOrderProcessingServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(String portName, String address) throws ServiceException {\n\n if (\"SDKService\".equals(portName)) {\n setSDKServiceEndpointAddress(address);\n }\n else\n { // Unknown Port Name\n throw new ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "void setServicePort( int p );", "public void setPort(int port);", "public void setPort(int port);", "public void setPort(int port) throws SipParseException {\n\tif (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setPort()\" + port);\n Via via=(Via)sipHeader;\n \n if (port <= 0)\n throw new SipParseException\n (\"port is not accepted by implementation\");\n via.setPort(port);\n }", "public void setPort(int p_port) throws MalformedURIException {\n if (p_port >= 0 && p_port <= 65535) {\n if (m_host == null) {\n throw new MalformedURIException(\n \"Port cannot be set when host is null!\");\n }\n }\n else if (p_port != -1) {\n throw new MalformedURIException(\"Invalid port number!\");\n }\n m_port = p_port;\n }", "public void setPort(final String port){\n this.port=port;\n }", "public void setPort(int a_port)\n\t{\n\t\tif (!isValidPort(a_port))\n\t\t{\n\t\t\tm_iInetPort = -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_iInetPort = a_port;\n\t\t}\n\t}", "Builder setPort(String port);", "public void setPort(String port) {\r\n this.port = port;\r\n }", "public void setPort(int port) {\r\n this.port = port;\r\n }", "final public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n m_Port = port;\n }", "public void setPort (int port) {\n this.port = port;\n }", "public void setPortName(String portName){\n\t\tthis.portName = portName;\n\t}", "public void port (int port) {\n this.port = port;\n }", "public void setPort(final int p) {\n this.port = p;\n }", "public void setPort(final int p) {\n this.port = p;\n }", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "public void setPort(int port) {\n\t\tthis.port = port;\n\t}", "public void setPort(int port) {\n\t\tthis.port = port;\n\t}", "public void setPort(int p) {\n\t\tport = p;\n\t}", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(int value) {\n this.port = value;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public static void setPort(int port){\n catalogue.port = port;\n }", "@Override\n\tpublic void setPort(Integer port) {\n\t\tthis.port=port;\n\t}", "public Builder setPort(\n\t\t\t\t\t\tjava.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\tport_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "private void setEndpoint(Node node, DescriptorEndpointInfo ep) {\n NamedNodeMap map = node.getAttributes();\n\n String epname = map.getNamedItem(\"endpoint-name\").getNodeValue();\n String sername = map.getNamedItem(\"service-name\").getNodeValue();\n String intername = map.getNamedItem(\"interface-name\").getNodeValue();\n ep.setServiceName(new QName(getNamespace(sername), getLocalName(sername)));\n ep.setInterfaceName(new QName(getNamespace(intername), getLocalName(intername)));\n ep.setEndpointName(epname);\n }", "public void setPort(int port) {\n this.port = port;\n prefs.putInt(\"AEUnicastOutput.port\", port);\n }", "public Builder setPort(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n port_ = value;\n onChanged();\n return this;\n }", "public NodeEndPoint(final String hostName, final int port) {\n this(hostName, null, port);\n }", "public com.example.DNSLog.Builder setPort(int value) {\n validate(fields()[6], value);\n this.port = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public NodeEndPoint(final String hostName, final String ipAddress, final int port) {\n this.hostName = hostName != null ? hostName.trim() : null;\n this.ipAddress = ipAddress != null ? ipAddress.trim() : null;\n this.port = port;\n }", "private void setPort(int value) {\n \n port_ = value;\n }", "private void setPort(int value) {\n \n port_ = value;\n }", "public CertAuthHost setPort(int port)\n\t\t{\n\t\t\tif (this.started)\n\t\t\t\tthrow new IllegalStateException(\"Server already started!\");\n\t\t\tthis.port = port;\n\t\t\treturn this;\n\t\t}", "public static void setNameServer(InetAddress ip, int port){\n nameServer.setIp(ip);\n nameServer.setPort(port);\n }", "public HttpClient setPort(Env env, NumberValue port) {\n client.setPort(port.toInt());\n return this;\n }", "protected void bind(InetAddress host, int port) throws IOException {\n localport = port;\n }", "void setEndpointParameter(Endpoint endpoint, String name, Object value) throws RuntimeCamelException;" ]
[ "0.78726363", "0.78114974", "0.7810368", "0.7802772", "0.7794247", "0.7790045", "0.7785466", "0.77511", "0.77474827", "0.77336913", "0.77313584", "0.77237904", "0.76927227", "0.76839626", "0.76837003", "0.7667008", "0.76624376", "0.76261586", "0.76159585", "0.7588643", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7583316", "0.7581642", "0.7581642", "0.7581642", "0.7581642", "0.7581642", "0.7581642", "0.7577258", "0.7566354", "0.7566073", "0.75235146", "0.75235146", "0.7516027", "0.7499845", "0.70432675", "0.6884156", "0.6884156", "0.6822745", "0.66800517", "0.66742337", "0.6649532", "0.6638632", "0.6636501", "0.65791416", "0.65708756", "0.6549616", "0.6549616", "0.6549616", "0.6549616", "0.6549616", "0.6549616", "0.65471196", "0.6536988", "0.6531157", "0.651659", "0.65123373", "0.64922917", "0.6481728", "0.6481728", "0.64232683", "0.64232683", "0.64138275", "0.64102423", "0.6409067", "0.63659453", "0.6362249", "0.6362249", "0.6362249", "0.6362249", "0.6338626", "0.6268137", "0.6240665", "0.62231815", "0.62185633", "0.61791235", "0.61440843", "0.612881", "0.6005454", "0.60024834", "0.60024834", "0.6002392", "0.60021454", "0.5969789", "0.5958943", "0.5941418" ]
0.7554135
45
Set the endpoint address for the specified port name.
public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { setEndpointAddress(portName.getLocalPart(), address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"dipp\".equals(portName)) {\n setdippEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"webservice_vasmanHttpPort\".equals(portName)) {\r\n setwebservice_vasmanHttpPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"JobSubmission2SOAP11port_http\".equals(portName)) {\n setJobSubmission2SOAP11port_httpEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UploaderPort\".equals(portName)) {\n setUploaderPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OutboundServiceSessionEJBBeanServicePort\".equals(portName)) {\n setOutboundServiceSessionEJBBeanServicePortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\n\t\tif (\"UDPService\".equals(portName)) {\n\t\t\tsetUDPServiceEndpointAddress(address);\n\t\t}\n\t\telse \n\t\t{ // Unknown Port Name\n\t\t\tthrow new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n\t\t}\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"UGSRuntimeServiceXfireImplHttpPort\".equals(portName)) {\n setUGSRuntimeServiceXfireImplHttpPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"EmpleadoServiciolmpl\".equals(portName)) {\r\n setEmpleadoServiciolmplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"FeeCreateSOAP\".equals(portName)) {\n setFeeCreateSOAPEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CenterServerImplPort\".equals(portName)) {\n setCenterServerImplPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"PersonController\".equals(portName)) {\n setPersonControllerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"NFEServices\".equals(portName)) {\n setNFEServicesEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WSEmisionAgricolaPort\".equals(portName)) {\r\n setWSEmisionAgricolaPortEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"msgserviceHttpSoap11Endpoint\".equals(portName)) {\n setmsgserviceHttpSoap11EndpointEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"RemoteFacadeCfc\".equals(portName)) {\r\n setRemoteFacadeCfcEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"SliderSvcPort\".equals(portName)) {\n setSliderSvcPortEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\n\t\tif (\"LinkIacWSSoap\".equals(portName)) {\n\t\t\tsetLinkIacWSSoapEndpointAddress(address);\n\t\t} else { // Unknown Port Name\n\t\t\tthrow new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n\t\t}\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"PublishAPIServiceSoap\".equals(portName)) {\r\n setPublishAPIServiceSoapEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n \r\nif (\"WsUserServiceImpl\".equals(portName)) {\r\n setWsUserServiceImplEndpointAddress(address);\r\n }\r\n else \r\n{ // Unknown Port Name\r\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\r\n }\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"CancelIMSHuawei_pt\".equals(portName)) {\n setCancelIMSHuawei_ptEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\r\n setEndpointAddress(portName.getLocalPart(), address);\r\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"GarageSeller\".equals(portName)) {\n setGarageSellerEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"publicService\".equals(portName)) {\n setpublicServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(QName portName, String address) throws ServiceException {\n setEndpointAddress(portName.getLocalPart(), address);\n }", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"WSExtensionService\".equals(portName)) {\n setWSExtensionServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\t\tsetEndpointAddress(portName.getLocalPart(), address);\n\t}", "public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n\t\tsetEndpointAddress(portName.getLocalPart(), address);\n\t}", "public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException {\n \nif (\"OrderProcessingService\".equals(portName)) {\n setOrderProcessingServiceEndpointAddress(address);\n }\n else \n{ // Unknown Port Name\n throw new javax.xml.rpc.ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "public void setEndpointAddress(String portName, String address) throws ServiceException {\n\n if (\"SDKService\".equals(portName)) {\n setSDKServiceEndpointAddress(address);\n }\n else\n { // Unknown Port Name\n throw new ServiceException(\" Cannot set Endpoint Address for Unknown Port\" + portName);\n }\n }", "void setServicePort( int p );", "public void setPort(int port);", "public void setPort(int port);", "public void setPort(int port) throws SipParseException {\n\tif (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setPort()\" + port);\n Via via=(Via)sipHeader;\n \n if (port <= 0)\n throw new SipParseException\n (\"port is not accepted by implementation\");\n via.setPort(port);\n }", "public void setPort(int p_port) throws MalformedURIException {\n if (p_port >= 0 && p_port <= 65535) {\n if (m_host == null) {\n throw new MalformedURIException(\n \"Port cannot be set when host is null!\");\n }\n }\n else if (p_port != -1) {\n throw new MalformedURIException(\"Invalid port number!\");\n }\n m_port = p_port;\n }", "public void setPort(final String port){\n this.port=port;\n }", "public void setPort(int a_port)\n\t{\n\t\tif (!isValidPort(a_port))\n\t\t{\n\t\t\tm_iInetPort = -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tm_iInetPort = a_port;\n\t\t}\n\t}", "Builder setPort(String port);", "public void setPort(String port) {\r\n this.port = port;\r\n }", "public void setPort(int port) {\r\n this.port = port;\r\n }", "final public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n this.port = port;\n }", "public void setPort(int port) {\n m_Port = port;\n }", "public void setPort (int port) {\n this.port = port;\n }", "public void setPortName(String portName){\n\t\tthis.portName = portName;\n\t}", "public void port (int port) {\n this.port = port;\n }", "public void setPort(final int p) {\n this.port = p;\n }", "public void setPort(final int p) {\n this.port = p;\n }", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "public void setPort(int port) {\r\n\t\tthis.port = port;\r\n\t}", "public void setPort(int port) {\n\t\tthis.port = port;\n\t}", "public void setPort(int port) {\n\t\tthis.port = port;\n\t}", "public void setPort(int p) {\n\t\tport = p;\n\t}", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(int value) {\n this.port = value;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public void setPort(Integer port) {\n this.port = port;\n }", "public static void setPort(int port){\n catalogue.port = port;\n }", "@Override\n\tpublic void setPort(Integer port) {\n\t\tthis.port=port;\n\t}", "public Builder setPort(\n\t\t\t\t\t\tjava.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\tport_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "private void setEndpoint(Node node, DescriptorEndpointInfo ep) {\n NamedNodeMap map = node.getAttributes();\n\n String epname = map.getNamedItem(\"endpoint-name\").getNodeValue();\n String sername = map.getNamedItem(\"service-name\").getNodeValue();\n String intername = map.getNamedItem(\"interface-name\").getNodeValue();\n ep.setServiceName(new QName(getNamespace(sername), getLocalName(sername)));\n ep.setInterfaceName(new QName(getNamespace(intername), getLocalName(intername)));\n ep.setEndpointName(epname);\n }", "public void setPort(int port) {\n this.port = port;\n prefs.putInt(\"AEUnicastOutput.port\", port);\n }", "public Builder setPort(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n port_ = value;\n onChanged();\n return this;\n }", "public NodeEndPoint(final String hostName, final int port) {\n this(hostName, null, port);\n }", "public com.example.DNSLog.Builder setPort(int value) {\n validate(fields()[6], value);\n this.port = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public NodeEndPoint(final String hostName, final String ipAddress, final int port) {\n this.hostName = hostName != null ? hostName.trim() : null;\n this.ipAddress = ipAddress != null ? ipAddress.trim() : null;\n this.port = port;\n }", "public CertAuthHost setPort(int port)\n\t\t{\n\t\t\tif (this.started)\n\t\t\t\tthrow new IllegalStateException(\"Server already started!\");\n\t\t\tthis.port = port;\n\t\t\treturn this;\n\t\t}", "private void setPort(int value) {\n \n port_ = value;\n }", "private void setPort(int value) {\n \n port_ = value;\n }", "public static void setNameServer(InetAddress ip, int port){\n nameServer.setIp(ip);\n nameServer.setPort(port);\n }", "public HttpClient setPort(Env env, NumberValue port) {\n client.setPort(port.toInt());\n return this;\n }", "protected void bind(InetAddress host, int port) throws IOException {\n localport = port;\n }", "void setEndpointParameter(Endpoint endpoint, String name, Object value) throws RuntimeCamelException;" ]
[ "0.78734714", "0.78118074", "0.78110653", "0.78025514", "0.77947915", "0.7789663", "0.7785925", "0.77517325", "0.7748381", "0.773377", "0.77321035", "0.77238184", "0.76925415", "0.76846975", "0.7684268", "0.76668376", "0.7661453", "0.76269335", "0.7615809", "0.7589098", "0.75807595", "0.75807595", "0.75807595", "0.75807595", "0.75807595", "0.75807595", "0.75776213", "0.7567726", "0.75646144", "0.75545156", "0.7522609", "0.7522609", "0.75169545", "0.74974316", "0.7041664", "0.6882225", "0.6882225", "0.6819405", "0.66784054", "0.66722435", "0.66470295", "0.6637869", "0.6634477", "0.6576959", "0.6568404", "0.65474683", "0.65474683", "0.65474683", "0.65474683", "0.65474683", "0.65474683", "0.65442026", "0.6535023", "0.65291286", "0.6515274", "0.65108955", "0.6490972", "0.64793295", "0.64793295", "0.6420813", "0.6420813", "0.6412192", "0.640829", "0.64067733", "0.6363959", "0.636033", "0.636033", "0.636033", "0.636033", "0.6336503", "0.62659764", "0.6238039", "0.6223219", "0.6216704", "0.6177819", "0.61454624", "0.6125631", "0.6007802", "0.60008115", "0.6000429", "0.6000429", "0.59980464", "0.5968564", "0.5959515", "0.59417427" ]
0.7582344
34
No op for this repo
@Override public void save(Game game) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void gitThis(){\n\t}", "private void checkout() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private HelloGitUtil(){\n\t}", "public boolean isNoOp() {\n\t\treturn false;\n\t}", "boolean isBareRepository() throws GitException, InterruptedException;", "public void doNothing(){\n\t}", "private NettyHttpUtil() {\n\t\t// do nothing.\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void visitNullRepository() {\n\t\tTreeUtils.visit(null, ObjectId.zeroId(), new ITreeVisitor() {\n\n\t\t\tpublic boolean accept(FileMode mode, String path, String name,\n\t\t\t\t\tAnyObjectId id) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t}", "public final Nfa buildNoAccept() {\n return buildInternal();\n }", "protected static Tool doNothing() {\n return DoNothingTool.INSTANCE;\n }", "void reset() throws GitException, InterruptedException;", "public static void doNothing(){\n\t}", "private ObjectRepository() {\n\t}", "static void ignore() {\n }", "public void testGitHub() {\n\t}", "@Override\n\tpublic void noLoadCargo() {\n\n\t}", "private Repository getSnprcEhrModulesRepository()\r\n {\r\n RepositoryBuilder repoBuilder = new RepositoryBuilder(\"optionalModules\", \"snprcEHRModules\", LicenseType.APACHE_LICENSE, BranchType.TRUNK);\r\n repoBuilder.setDirectoriesToIgnore(\r\n set(\r\n \"snprc_scheduler\"\r\n )\r\n );\r\n return repoBuilder.buildRepository();\r\n }", "public Repo() {\n //this.app = Init.application;\n }", "public Document checkOut() {\n throw new UnsupportedOperationException();\n }", "TRepo createRepo();", "@Override\n void undo() {\n assert false;\n }", "@Override\n public void visit(NoOpNode noOpNode) {\n }", "protected void nop() throws Exception {\n reply_ok();\n }", "private void processOrphanCommits(GitHubRepo repo) {\n long refTime = Math.min(System.currentTimeMillis() - gitHubSettings.getCommitPullSyncTime(), gitHubClient.getRepoOffsetTime(repo));\n List<Commit> orphanCommits = commitRepository.findCommitsByCollectorItemIdAndTimestampAfterAndPullNumberIsNull(repo.getId(), refTime);\n List<GitRequest> pulls = gitRequestRepository.findByCollectorItemIdAndMergedAtIsBetween(repo.getId(), refTime, System.currentTimeMillis());\n orphanCommits = CommitPullMatcher.matchCommitToPulls(orphanCommits, pulls);\n List<Commit> orphanSaveList = orphanCommits.stream().filter(c -> !StringUtils.isEmpty(c.getPullNumber())).collect(Collectors.toList());\n orphanSaveList.forEach( c -> LOG.info( \"Updating orphan \" + c.getScmRevisionNumber() + \" \" +\n new DateTime(c.getScmCommitTimestamp()).toString(\"yyyy-MM-dd hh:mm:ss.SSa\") + \" with pull \" + c.getPullNumber()));\n commitRepository.save(orphanSaveList);\n }", "public void nop() throws IOException {\n simpleCommand(\"NOP\\0\");\n }", "boolean isIgnorable() { return false; }", "protected Depot() {\n\t\tthis(null);\n\t}", "@Test(expected = RepositoryNotFoundException.class)\n public void testNonExistingRepository() throws AuthorCommitsFailedException,\n IOException{\n EasyMock.expect(mockManager.openRepository(new Project.NameKey(\"abcdefg\")))\n .andReturn(\n RepositoryCache.open(FileKey.lenient(new File(\n \"../../review_site/git\", \"abcdefg.git\"), FS.DETECTED)));\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability, mockManager);\n cmd_test.setCommits(new Project.NameKey(\"abcdefg\"), \"kee\");\n }", "private void clearRepoList() {\n this.tvRepoList.setText(\"\");\n }", "void reset(boolean hard) throws GitException, InterruptedException;", "public void checkout() {\n\t}", "@Override\r\n \tpublic File getWorkspace() {\n \t\treturn null;\r\n \t}", "boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;", "public void __noop() {\n __send(__buildMessage(FTPCommand.getCommand(32), null));\n __getReplyNoReport();\n }", "@DeleteMapping(path = \"/local-repository\")\n public VoidResponse setNoRepositoryMode(@PathVariable String userId,\n @PathVariable String serverName)\n {\n return adminAPI.setNoRepositoryMode(userId, serverName);\n }", "public File getRepo() {\n return _repo;\n }", "@Test\n public void testNonGavArtifacts()\n throws Exception\n {\n new DeployUtils( this ).deployWithWagon( \"http\", getRepositoryUrl( getTestRepositoryId() ),\n getTestFile( \"pom.xml\" ), \"foo/bar\" );\n\n // now get the info for it\n Response response =\n RequestFacade.doGetRequest( \"service/local/repositories/\" + getTestRepositoryId() + \"/content/\"\n + \"foo/bar\" + \"?describe=maven2\" );\n String responseText = response.getEntity().getText();\n Assert.assertEquals( response.getStatus().getCode(), 404, \"Response was: \" + responseText );\n\n }", "protected OpinionFinding() {/* intentionally empty block */}", "public void resetRepository() {\n repository.clear();\n addDirectories( directory );\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void withCommitsNullRepository() {\n\t\tTreeUtils.withCommits(null, ObjectId.zeroId());\n\t}", "String repoUrl();", "@Override\r\n\tpublic String swim() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}", "public NoRemoteRepositoryException(URIish uri, String s) {\n\t\tsuper(uri, s);\n\t}", "private Helper() {\r\n // do nothing\r\n }", "private ContentUtil() {\n // do nothing\n }", "public Channel method_4121() {\n return null;\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void visitNullVisitor() throws IOException {\n\t\tTreeUtils.visit(new FileRepository(testRepo), ObjectId.zeroId(), null);\n\t}", "Repository getFallbackRepository();", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "public GitFile[] getFiles() { return null; }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tno();\n\t\t\t\t}", "public Channel method_4090() {\n return null;\n }", "public abstract boolean manipulateRepositories();", "public no() {}", "@Override\n public MethodOutcome nonExistentSourceOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_FALSE);\n }", "private NoOpCompactor(SegmentStorageSystem storage) {\n super(storage);\n }", "private void foundNonExistent() {\n\t\tstate = BridgeState.NON_EXISTENT;\n\t}", "public interface IRepo {\r\n\t//current state of the repository\r\n\tPrgState getCurrentState() throws RepoException;\r\n\t\r\n\t//writes log of execution to log file\r\n\tvoid logPrgStateExec() throws FileNotFoundException, IOException;\r\n}", "@Override\n\t\t\tpublic Optional<INoChannelHandler> noChannelHandler() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic Optional<INoChannelHandler> noChannelHandler() {\n\t\t\t\treturn null;\n\t\t\t}", "public NoneBloomCache(Index index) {\n\t\tsuper(index, ImmutableSettings.Builder.EMPTY_SETTINGS);\n\t}", "@Override\r\n\tpublic String globNoPaths(String[] args) {\r\n\t\treturn \"\";\r\n\t}", "@Override\r\n public void notLeader() {\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DispositivoRepository extends JpaRepository<Dispositivo, Long> {\n\n}", "private stendhal() {\n\t}", "private DungeonBotsMain() {\n\t\t// Does nothing.\n\t}", "public ChannelFuture method_4120() {\n return null;\n }", "public interface Repository {}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ProjectHistoryRepository extends JpaRepository<ProjectHistory, Long> {\n\n}", "public Channel method_4112() {\n return null;\n }", "private void deleteRepository() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tint opt = JOptionPane.showConfirmDialog(this, \"Delete entire Repository (all change sets) at \"+ repURLFld.getText()+\" ?\", \"Delete All\", JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\r\n\t\t\t// delete repository header\r\n\t\t\tif (repHeaderLoc!=null) {\r\n\t\t\t\tclient.delete(this.repHeaderLoc);\r\n\t\t\t\tSystem.out.println(\"Deleted Repository Header at \" + repHeaderLoc);\r\n\t\t\t}\r\n\t\t\telse System.out.println(\"URL location of Repository Header not known\");\r\n\t\t\t\r\n\t\t\t// delete all commits at Version Controlled Repository\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tURL loc = null;\r\n\t\t\t\tif (versionNodes[ctr]!=null) {\r\n\t\t\t\t\tloc = versionNodes[ctr].location;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI.toString()+\"#\"+String.valueOf(ctr));\r\n\t\t\t\t\tSet versionSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\tloc = ((Description) versionSet.iterator().next()).getLocation();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tclient.delete(loc);\r\n\t\t\t\tSystem.out.println(\"Deleted Version at \"+loc);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public ICancellable sync(RepositorySyncRequest arg0, ResponseHandler<RepositorySyncResponse> arg1) {\n\t\treturn null;\n\t}", "public Repository() {\n\n }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface DocRepository extends JpaRepository<Doc, Long> {\n\n}", "public static RemoteRepositoryFilterSource neverAccept() {\n return new RemoteRepositoryFilterSource() {\n public String getName() {\n return \"never-accept\";\n }\n\n private final RemoteRepositoryFilter.Result RESULT =\n new RemoteRepositoryFilterSourceSupport.SimpleResult(false, getName());\n\n @Override\n public RemoteRepositoryFilter getRemoteRepositoryFilter(RepositorySystemSession session) {\n return new RemoteRepositoryFilter() {\n @Override\n public Result acceptArtifact(RemoteRepository remoteRepository, Artifact artifact) {\n return RESULT;\n }\n\n @Override\n public Result acceptMetadata(RemoteRepository remoteRepository, Metadata metadata) {\n return RESULT;\n }\n };\n }\n };\n }", "@Override\n public void shutDown() throws RepositoryException\n {\n }", "public static void noOverwrite() {\n\t\tdefaultOverwriteMode = NO_OVERWRITE;\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface QcmRepositoryExtended extends QcmRepository {\n\n}", "T noHook();", "public ChannelFuture method_4126() {\n return null;\n }", "@Override\n public String getContributionURI()\n {\n return null;\n }", "public ChannelPromise method_4109() {\n return null;\n }", "@Override\r\n\tprotected String getProjectHelpId() {\n\t\treturn null;\r\n\t}", "public ChannelFuture method_4130() {\n return null;\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "@SuppressWarnings(\"unused\")\npublic interface ApiInfoRepository extends MongoRepository<ApiInfo,String> {\n\n}", "public ChannelFuture method_4092() {\n return null;\n }", "@SuppressWarnings(\"unused\")\npublic interface ShopRepository extends CrudRepository<Shop,Long> {\n\n}", "private Repository getAccountsRepository()\r\n {\r\n RepositoryBuilder repoBuilder = new RepositoryBuilder(\"optionalModules\", \"accounts\", LicenseType.APACHE_LICENSE, BranchType.TRUNK);\r\n return repoBuilder.buildRepository();\r\n }", "@Override\r\n\tpublic TreeNode getRootProject() {\n\t\treturn null;\r\n\t}", "public ChannelFuture method_4097() {\n return null;\n }", "public PublishNoImgJoke() {\n\t\tsuper();\n\t}", "public String getLastDocRepository() {\n return \"\";\n }", "private void checkNoStatus(IgniteEx n, String cacheName) throws Exception {\n assertNull(statuses(n).get(cacheName));\n assertNull(metaStorageOperation(n, metaStorage -> metaStorage.read(KEY_PREFIX + cacheName)));\n assertTrue(indexBuildStatusStorage(n).rebuildCompleted(cacheName));\n }", "private SolutionsPackage() {}", "@Override\n public boolean isCommunity() {\n return false;\n }", "public void testAccessObrRepositoryWithoutCredentialsFail() throws Exception {\n try {\n URL url = new URL(\"http://localhost:\" + TestConstants.PORT + m_endpoint + \"/index.xml\");\n\n // do NOT use connection factory as it will supply the credentials for us...\n URLConnection conn = url.openConnection();\n assertNotNull(conn);\n\n // we expect a 403 for this URL...\n assertTrue(NetUtils.waitForURL(url, HttpURLConnection.HTTP_FORBIDDEN));\n\n try {\n // ...causing all other methods on URLConnection to fail...\n conn.getContent(); // should fail!\n fail(\"IOException expected!\");\n }\n catch (IOException exception) {\n // Ok; ignored...\n }\n finally {\n NetUtils.closeConnection(conn);\n }\n }\n catch (Exception e) {\n printLog(m_logReader);\n throw e;\n }\n }", "public ORB _orb() {\n throw new NO_IMPLEMENT(reason);\n }", "public Repository (FileSystem def) {\n this.system = def;\n java.net.URL.setURLStreamHandlerFactory(\n new org.openide.execution.NbfsStreamHandlerFactory());\n init ();\n }" ]
[ "0.6062974", "0.60341597", "0.60218704", "0.58902174", "0.5770787", "0.5633405", "0.5623804", "0.5604023", "0.5592304", "0.55476964", "0.55097556", "0.5472651", "0.54253674", "0.5422241", "0.5378523", "0.53556424", "0.5342764", "0.53256375", "0.531181", "0.5307809", "0.52838343", "0.5281322", "0.52663594", "0.52633053", "0.52616704", "0.5260328", "0.52465403", "0.5227444", "0.5226953", "0.52108294", "0.5197482", "0.5189912", "0.5188309", "0.51779187", "0.51698", "0.5129398", "0.5128646", "0.5112634", "0.5112414", "0.509562", "0.5080985", "0.5069675", "0.5063958", "0.5061177", "0.50439817", "0.5042946", "0.5035266", "0.50314015", "0.5004143", "0.50029606", "0.5002509", "0.50023204", "0.49966103", "0.49930245", "0.4989941", "0.49762863", "0.4976043", "0.49677512", "0.49642715", "0.49633977", "0.49631864", "0.49631864", "0.49608678", "0.4956172", "0.49540704", "0.49534968", "0.49507275", "0.49473515", "0.4937229", "0.4933554", "0.49316943", "0.49194306", "0.4918349", "0.49130255", "0.4909461", "0.4905956", "0.48903242", "0.4889474", "0.48884493", "0.4883476", "0.48831877", "0.48817384", "0.4881223", "0.4876633", "0.48749897", "0.48742795", "0.48737636", "0.48728856", "0.48704717", "0.48691037", "0.48664823", "0.48659664", "0.4865872", "0.48611483", "0.48601037", "0.48587", "0.4858199", "0.4856643", "0.48503122", "0.48484045", "0.48473722" ]
0.0
-1
Created by Crisley Alves on 12, out, 2017
public interface PessoaRepository extends JpaRepository<Pessoa, Long>{ List<Pessoa> pessoas = new ArrayList<>(); Optional<Pessoa> findByCpf(String cpf); Optional<Pessoa> findByTelefones(String ddd, String numero); Pessoa findByCodigo(Long codigo); Pessoa findByNome(String nome); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void perish() {\n \n }", "private void poetries() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "public void method_4270() {}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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 nefesAl() {\n\n\t}", "@Override\n protected void getExras() {\n }", "protected boolean func_70041_e_() { return false; }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "public void skystonePos4() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "private void level7() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public abstract void mo70713b();", "public void m23075a() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "protected void mo6255a() {\n }", "public void mo6081a() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n protected void init() {\n }", "private void init() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "public void mo21877s() {\n }", "public void mo12930a() {\n }", "public void skystonePos6() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void mo21779D() {\n }", "public void mo115190b() {\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\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.5596007", "0.55835503", "0.5536645", "0.5511785", "0.5479912", "0.54508024", "0.5424788", "0.54143476", "0.5397536", "0.5397536", "0.53909826", "0.5387089", "0.5333257", "0.52849257", "0.5261824", "0.52236146", "0.52094686", "0.5203976", "0.5201861", "0.51943374", "0.5193288", "0.5186074", "0.51747537", "0.51580554", "0.51571757", "0.51524764", "0.51451916", "0.5142169", "0.5125777", "0.51106787", "0.5101784", "0.5072285", "0.5069322", "0.5052555", "0.5052555", "0.5052555", "0.5052555", "0.5052555", "0.5049375", "0.50484574", "0.5047643", "0.5047643", "0.5047643", "0.5047643", "0.5047643", "0.5047643", "0.5047643", "0.5046386", "0.5039914", "0.50188905", "0.50057554", "0.5003155", "0.49954945", "0.4995429", "0.49892583", "0.49881425", "0.49866998", "0.4985514", "0.49834934", "0.49834934", "0.49824613", "0.49808067", "0.4967298", "0.49665445", "0.4961436", "0.49538407", "0.49425355", "0.4941743", "0.49350247", "0.49256825", "0.49242643", "0.4924212", "0.4922711", "0.49203327", "0.49098402", "0.49094057", "0.49085376", "0.49085376", "0.49085376", "0.49085376", "0.49085376", "0.49085376", "0.48989227", "0.48907518", "0.48836416", "0.48836416", "0.48836416", "0.48810178", "0.48802352", "0.4878876", "0.48772752", "0.48772752", "0.48772752", "0.48718667", "0.48706424", "0.48676434", "0.48665506", "0.4861018", "0.48579007", "0.4855812", "0.48509586" ]
0.0
-1
current value of max flow
public FordFulkerson(FlowNetwork G, int s, int t) { validate(s, G.V()); validate(t, G.V()); if (s == t) throw new IllegalArgumentException("Source equals sink"); if (!isFeasible(G, s, t)) throw new IllegalArgumentException("Initial flow is infeasible"); // while there exists an augmenting path, use it value = excess(G, t); while (hasAugmentingPath(G, s, t)) { // compute bottleneck capacity double bottle = Double.POSITIVE_INFINITY; for (int v = t; v != s; v = edgeTo[v].other(v)) { bottle = Math.min(bottle, edgeTo[v].residualCapacityTo(v)); } // augment flow for (int v = t; v != s; v = edgeTo[v].other(v)) { edgeTo[v].addResidualFlowTo(v, bottle); } value += bottle; } // check optimality conditions assert check(G, s, t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getMaximum() {\n return (max);\n }", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public abstract int getMaximumValue();", "int getMaximum();", "protected final int getMax() {\n\treturn(this.max);\n }", "E maxVal();", "public double getMaximumValue() { return this.maximumValue; }", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "public int getResult() {\n return this.max;\n }", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public long maxValue() {\n return 0;\n }", "public double getMaxVal() {\n return maxVal;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }", "Double getMaximumValue();", "public Point getMax () {\r\n\r\n\treturn getB();\r\n }", "public float getMaxValue();", "public float getMaximumFloat() {\n/* 266 */ return (float)this.max;\n/* */ }", "public T getMaxStep() {\n return maxStep;\n }", "private static int max_value(State curr_state) {\n\t\tcounterMinimax++; \r\n\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint max_value = Integer.MIN_VALUE;\r\n\t\tState[] successors = curr_state.getSuccessors('1');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmax_value = Math.max(max_value, min_value(curr_state));\r\n\t\t}\r\n\t\t//\t\telse if(successors.length != 0 && curr_state.isTerminal() == false){\r\n\r\n\t\t//Get the successors of the current state, as dark always runs first\r\n\t\t//it will call maxValue;\r\n\r\n\r\n\t\t//Select the successor that returns the biggest value\r\n\t\tfor(State state : successors){\r\n\t\t\tmax_value = Math.max(max_value, min_value(state));\r\n\t\t}\t\r\n\t\t//\t\t}\r\n\t\treturn max_value;\r\n\t}", "double getMax();", "double getMax();", "public abstract float getMaxValue();", "public int getMaxValue() {\n return maxValue;\n }", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "public int getMax(){\n return tab[rangMax()];\n }", "public int getMax()\n {\n return 0;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public double maxValue() {\n return 1;\r\n }", "public Double getMaximumValue () {\r\n\t\treturn (maxValue);\r\n\t}", "float getXStepMax();", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public int getMaximum() {\n return this.iMaximum;\n }", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public Long getMaxValue() {\n return maxValue;\n }", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "public double getMaxValue() {\r\n\t\treturn maxValue;\r\n\t}", "public float maxSpeed();", "public double getMaxT() {\n return v[points_per_segment - 1];\n }", "public double getMaxTransfer() {\n\t\treturn maxTransfer;\n\t}", "public int maxYield(){\n return this.maxYield;\n }", "public Double getMaximum() {\n\t\treturn maximum;\n\t}", "public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }", "@Override\n\tpublic T max() {\n\t\treturn val;\n\t}", "public float getMax()\n {\n parse_text();\n return max;\n }", "@Override // same as gt sum of all hatches\n public long getMaxInputVoltage() {\n return getMaxInputVoltageSum();\n }", "public Integer max() {\n return this.max;\n }", "int maxNoteValue();", "int getMax();", "public int GetMaxVal();", "public long getMaxIfShift() {\n return localMaxIfShift;\n }", "float xMax();", "private double getMax() {\n return Collections.max(values.values());\n }", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public int getMaxActive();", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }", "public int getMaxTemp() {\n\t\treturn this.maxTemp;\n\t}", "public int max() {\n\t\treturn 0;\n\t}", "public MaxFlow(Graph g){\n graph = g;\n graphNode = graph.G;\n s = 0;\n maxFlow = 0;\n t = graphNode[graphNode.length - 1].nodeID;\n }", "public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }", "public int getMaximumAir ( ) {\n\t\treturn extract ( handle -> handle.getMaximumAir ( ) );\n\t}", "int max();", "private StreamEvent findIfActualMax(AttributeDetails latestEvent) {\n int indexCurrentMax = valueStack.indexOf(currentMax);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMax;\n // If latest event is at a distance greater than maxPostBound from max, max is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMax.notEligibleForRealMax();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", 0, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMax.getValue() - currentMax.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMax - preBound >= 0) {\n if (valueStack.get(indexCurrentMax - preBound).getValue() <= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", preBound, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore max is not eligible to be sent as output.\n currentMax.notEligibleForRealMax();\n return null;\n }", "public float getmaxP() {\n Reading maxPressureReading = null;\n float maxPressure = 0;\n if (readings.size() >= 1) {\n maxPressure = readings.get(0).pressure;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).pressure > maxPressure) {\n maxPressure = readings.get(i).pressure;\n }\n }\n } else {\n maxPressure = 0;\n }\n return maxPressure;\n }", "public int findMax(){\n return nilaiMaks(this.root);\n }", "public int getMaxAmount() {\n return _max;\n }", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "@NonNull\n public Integer getMaxTemp() {\n return maxTemp;\n }", "public long getMax() {\n return m_Max;\n }", "int askForTempMax();", "public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);", "public double getMaxS() {\n return u[nr_of_segments - 1];\n }", "int getMax( int max );", "public int getMaximumPoints();", "public double max() {\n return max(0.0);\n }", "float yMax();", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "@Override\r\n\tpublic double max_value(GameState s, int depthLimit) \r\n\t{\r\n\t\tdouble stateEvaluationValue = stateEvaluator(s);\r\n\r\n\t\tif (depthLimit == 0)\r\n\t\t{\r\n\t\t\treturn stateEvaluationValue;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdouble currMax = Double.NEGATIVE_INFINITY;\r\n\t\t\tint bestMove = 0;\r\n\t\t\tArrayList <Integer> succList = generateSuccessors(s.lastMove, s.takenList);\r\n\t\t\tif (succList.isEmpty())\r\n\t\t\t{\r\n\t\t\t\ts.bestMove = -1;\r\n\t\t\t\ts.leaf = true;\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\tIterator <Integer> myItr = succList.iterator();\r\n\t\t\twhile (myItr.hasNext())\r\n\t\t\t{\r\n\t\t\t\tdouble tempMax = currMax;\r\n\t\t\t\tint currNumber = myItr.next();\r\n\t\t\t\tint [] newList = s.takenList;\r\n\t\t\t\tnewList [currNumber] = 1; //assign it to player 1\r\n\t\t\t\tGameState newGameState = new GameState(newList, currNumber);\r\n\t\t\t\tcurrMax = Math.max(currMax, min_value(newGameState, depthLimit - 1));\r\n\r\n\t\t\t\tif (tempMax < currMax)\r\n\t\t\t\t{\r\n\t\t\t\t\tbestMove = currNumber;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts.bestMove = bestMove;\t\t\t\r\n\t\t\treturn currMax;\r\n\t\t}\r\n\r\n\r\n\t}", "public Object getMaxValue() {\n\t\treturn null;\n\t}", "public Quantity<Q> getMax() {\n return max;\n }", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "public int getMaxAdvance() {\n return -1;\n }", "private double getMaxThreshold() {\n return maxThreshold;\n }", "public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }", "public float getMaxFloat() {\n\t\treturn this.maxFloat;\n\t}", "public Integer getMax() {\n\t\t\tif (hotMinMax) {\n\t\t\t\tConfigValue rawMinMax = new ConfigValue();\n\t\t\t\ttry {\n\t\t\t\t\trawSrv.getCfgMinMax(name, rawMinMax);\n\t\t\t\t\t// TODO: FIX HERE\n\t\t\t\t\treturn 100;\n\t\t\t\t} catch (TVMException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn new Integer(max);\n\t\t\t}\n\t\t\t// ....\n\t\t\treturn 100;\n\t\t}", "public float getNitrateMax() {\n return nitrateMax;\n }", "public double getMaxSpeedValue() {\n return maxSpeedValue;\n }", "public byte get_max() {\n return (byte)getSIntBEElement(offsetBits_max(), 8);\n }", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();" ]
[ "0.732765", "0.7235121", "0.7223249", "0.71140635", "0.7100554", "0.70815414", "0.7072621", "0.70659333", "0.7056416", "0.700224", "0.69931096", "0.6991593", "0.6987363", "0.69557965", "0.6954947", "0.69450057", "0.6937748", "0.6924467", "0.69081366", "0.6901585", "0.6891757", "0.6891757", "0.68858033", "0.68642426", "0.68374693", "0.6800169", "0.6785951", "0.67803353", "0.6775192", "0.6775192", "0.6775192", "0.67398584", "0.67375416", "0.6735887", "0.67316526", "0.6723466", "0.6694978", "0.66828185", "0.66791254", "0.6678068", "0.6677942", "0.6677942", "0.6674157", "0.6661106", "0.6661061", "0.66576624", "0.6656426", "0.6650247", "0.66373986", "0.66315347", "0.66276455", "0.66093934", "0.66040206", "0.6603364", "0.6593019", "0.6568131", "0.6556379", "0.6548558", "0.65456057", "0.6537407", "0.6532298", "0.65265167", "0.6518255", "0.65105176", "0.65069467", "0.6504447", "0.6489415", "0.6484442", "0.64757794", "0.64751494", "0.647451", "0.64730906", "0.6468638", "0.64549416", "0.6445521", "0.64452285", "0.6423725", "0.6421718", "0.6418346", "0.6415464", "0.6405871", "0.64025384", "0.64007086", "0.63998914", "0.6398389", "0.63937277", "0.6392537", "0.6391812", "0.6387229", "0.63775575", "0.63748354", "0.6374835", "0.63585305", "0.6354311", "0.63542426", "0.6347102", "0.6343059", "0.6327412", "0.6327412", "0.6327412", "0.6327412" ]
0.0
-1
throw an exception if v is outside prescibed range
private void validate(int v, int V) { if (v < 0 || v >= V) throw new IndexOutOfBoundsException("vertex " + v + " is not between 0 and " + (V-1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate(int v) {\r\n if (v < 0 || v >= V)\r\n throw new IllegalArgumentException(\r\n \"vertex \" + v + \" is not between 0 and \" + (V - 1));\r\n }", "private void validate(int v) {\n int upperBound = G.V() - 1;\n if (v < 0 || v > upperBound) {\n String errMsg = String.format(\"Need vertex v; 0 <= v <= %d; got %d\",\n upperBound, v);\n throw new IndexOutOfBoundsException(errMsg);\n }\n }", "private void validateVertex(int v) {\r\n\t if (v < 0 || v >= V)\r\n\t throw new IndexOutOfBoundsException(\"vertex \" + v + \" is not between 0 and \" + (V-1));\r\n\t }", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }", "void checkRange(Long value) throws TdtTranslationException {\r\n\t\tif (hasRange) {\r\n\t\t\tif ((value.compareTo(minimum) < 0)\r\n\t\t\t\t\t|| (value.compareTo(maximum) > 0)) {\r\n\t\t\t\tthrow new TdtTranslationException(\"Value {\" + value\r\n\t\t\t\t\t\t+ \"} out of range [{\" + minimum + \"},{\" + maximum\r\n\t\t\t\t\t\t+ \"}] in field \" + getId());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void rangeCheck(int index) {\n if (index >= this.values.length) {\n throw new ArrayIndexOutOfBoundsException(\"Index of out bounds!\");\n }\n }", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n // Undeclared exception!\n try { \n Range.of(3253L, 1198L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public void rangeCheck(int value) throws RangeException {\n\tSystem.out.println(\"In rangeCheck, value: \" + value);\n\tif (value < min || value > max) {\n\t throw new RangeException(min, max, value);\n\t}\n }", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483648L));\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 3993L, (-2147483648L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n long long0 = (-1903L);\n // Undeclared exception!\n try { \n Range.ofLength((-1903L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test055() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, (-2147483648L), (-2147483649L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public ValueOutOfRangeException(int value, int lowerBound, int upperBound) {\n this.message = String.format(VALUE_OUT_OF_EXPECTED_RANGE, value, lowerBound, upperBound);\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n long long0 = 785L;\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 9223372036854775806L, (-128L));\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -129 would make range [9223372036854775805 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "void validateValue(long val) {\n\n if ((min != null && val < min) || (max != null && val > max)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Value, \");\n sb.append(val);\n sb.append(\", is outside of the allowed range\");\n throw new IllegalArgumentException(sb.toString());\n }\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Range range0 = Range.of(0L);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem1);\n range0.iterator();\n Range.of((-1233L), 0L);\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem1, 0L, (-1233L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n\tpublic void testAddOutOfRange() {\n\t\tInteger result = SimpleCalc.add(40, 10);\n\t\tassertNull(\"Input value 40 is out of range [-10, 10]\", result);\n\t}", "private void checkRange(int index) {\n if ((index < 0 || index >= curSize))\n throw new IndexOutOfBoundsException(\"Index: \" + index + \" is out of bounds. Size = \" + size());\n }", "private void checkRange(int index) {\n\t\tif (index < 0 || index >= array.length()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index \" + index + \" is out of bouds [0, \" + array.length() + \"]\");\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n long long0 = (-1259L);\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n // Undeclared exception!\n try { \n Range.of(0L, (-1259L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n long long0 = (-1259L);\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n List<Range> list1 = range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n range2.complementFrom(list1);\n // Undeclared exception!\n try { \n Range.of(0L, (-1259L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public V getLowerBound();", "public boolean inRange(Vector v) {\r\n\t\tdouble w = v.get(0);\r\n\t\tdouble x = v.get(1);\r\n\t\tdouble y = v.get(2);\r\n\t\tdouble z = v.get(3);\r\n\t\tboolean a = (x+w>1)&&(x+1>w)&&(w+1>x);\r\n\t\tboolean b = (y+z>1)&&(y+1>z)&&(z+1>y);\r\n\t\treturn a&&b;\r\n\t}", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "private void checkRange(int i) throws IndexOutOfBoundsException {\n if (i < 0 || i >= size) {\n throw new IndexOutOfBoundsException();\n }\n }", "@Test(timeout = 4000)\n public void test080() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.getEnd();\n long long0 = 0L;\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private boolean isInsideValidRange (int value)\r\n\t{\r\n\t\treturn (value > m_lowerBounds && value <= m_upperBounds);\r\n\t}", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n long long0 = (-1L);\n Range range0 = Range.of((-1L));\n range0.getBegin();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.build();\n long long1 = 0L;\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void boundsCheck(BigDecimal d) throws InvalidDatatypeValueException {\n boolean minOk = false;\n boolean maxOk = false;\n String upperBound = (fMaxExclusive != null )? ( fMaxExclusive.toString() ):\n ( ( fMaxInclusive != null )?fMaxInclusive.toString():\"\");\n \n String lowerBound = (fMinExclusive != null )? ( fMinExclusive.toString() ):\n (( fMinInclusive != null )?fMinInclusive.toString():\"\"); \n String lowerBoundIndicator = \"\";\n String upperBoundIndicator = \"\";\n \n \n if ( isMaxInclusiveDefined){\n maxOk = (d.compareTo(fMaxInclusive) <= 0);\n upperBound = fMaxInclusive.toString();\n if ( upperBound != null ){\n upperBoundIndicator = \"<=\"; \n } else {\n upperBound=\"\";\n }\n } else if ( isMaxExclusiveDefined){\n maxOk = (d.compareTo(fMaxExclusive) < 0);\n upperBound = fMaxExclusive.toString();\n if ( upperBound != null ){\n upperBoundIndicator = \"<\";\n } else {\n upperBound = \"\";\n }\n } else{\n maxOk = (!isMaxInclusiveDefined && ! isMaxExclusiveDefined);\n }\n \n \n if ( isMinInclusiveDefined){\n minOk = (d.compareTo(fMinInclusive) >= 0);\n lowerBound = fMinInclusive.toString();\n if( lowerBound != null ){\n lowerBoundIndicator = \"<=\";\n }else {\n lowerBound = \"\";\n }\n } else if ( isMinExclusiveDefined){\n minOk = (d.compareTo(fMinExclusive) > 0);\n lowerBound = fMinExclusive.toString();\n if( lowerBound != null ){\n lowerBoundIndicator = \"<\";\n } else {\n lowerBound = \"\";\n }\n } else{\n minOk = (!isMinInclusiveDefined && !isMinExclusiveDefined);\n }\n \n if (!(minOk && maxOk))\n throw new InvalidDatatypeValueException (\n getErrorString(DatatypeMessageProvider.OutOfBounds,\n DatatypeMessageProvider.MSG_NONE,\n new Object [] { d.toString() , lowerBound ,\n upperBound, lowerBoundIndicator, upperBoundIndicator}));\n \n }", "private void RangeCheck(int index) {\r\n if (index >= size || index < 0)\r\n throw new IndexOutOfBoundsException(\"Index: \"+index+\", Size: \"+size);\r\n }", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n Range range0 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getBegin(range_CoordinateSystem0);\n Range range1 = Range.of(0L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem1, 0L, 0L);\n Object object0 = new Object();\n range2.equals(object0);\n range2.complement(range1);\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n Range range3 = Range.of(range_CoordinateSystem2, 1L, 1L);\n Range.Builder range_Builder0 = new Range.Builder(range3);\n // Undeclared exception!\n try { \n range_Builder0.contractEnd(977L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Range.Comparators.values();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, (-5250L), 2383L);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Range range0 = Range.ofLength(4360L);\n Range.of(255L);\n Range range1 = null;\n // Undeclared exception!\n try { \n range0.complement((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem0, 2147483646L, (-9223372036854775808L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Range coordinates 2147483646, -9223372036854775808 are not valid Zero Based coordinates\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public static int clip(int v, int max) {\n // TODO: I'm sure this could be done in a smarter way.\n if (v < 0) {\n return ((v % max) + max) % max;\n } else if (v >= max) {\n return v % max;\n } else {\n return v;\n }\n }", "@Test(timeout = 4000)\n public void test016() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n // Undeclared exception!\n try { \n range_Builder0.contractBegin(2147483647L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public ValueOutOfRangeException(String value, int lowerBound, int upperBound) {\n this.message = String.format(VALUE_OUT_OF_EXPECTED_RANGE, value, lowerBound, upperBound);\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n String string0 = \"]?&0A@\";\n range0.getLength();\n // Undeclared exception!\n try { \n Range.ofLength((-2524L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // must be >=0\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.endsBefore(range0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"[ 0 .. -1 ]/0B\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ 0 .. -1 ]/0B into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test30() throws Throwable {\n Range.of(4294967296L);\n long long0 = 1264L;\n // Undeclared exception!\n try { \n Range.of(1321L, 1264L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "protected final boolean rangeTestFailed(int value) {\n\tboolean test1 =\n\t (reqminSet && (reqminClosed? (value < reqmin): (value <= reqmin)))\n\t || (minSet && (minClosed? (value < min): (value <= min)));\n\tboolean test2 =\n\t (reqmaxSet && (reqmaxClosed? (value > reqmax): (value >= reqmax)))\n\t || (maxSet && (maxClosed? (value > max): (value >= max)));\n\treturn (test1 || test2);\n }", "private int deadZone(int value, int minValue)\n\t{\n\t\tif (Math.abs(value) < minValue) value = 0;\n\t\t\n\t\treturn value;\n\t}", "@Test(timeout = 4000)\n public void test019() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n // Undeclared exception!\n try { \n range0.intersects((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n Object object0 = new Object();\n range0.equals(\"[ 0 .. -1 ]/0B\");\n // Undeclared exception!\n try { \n range0.endsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "protected double[] clampV(double nextVabs, double nextVarg)\r\n\t\t{\r\n//\t\t\tif(nextVabs < v_min)\r\n//\t\t\t\tnextVabs = v_min;\r\n//\t\t\telse if(nextVabs > v_max)\r\n//\t\t\t\tnextVabs = v_max;\r\n\t\t\t\r\n\t\t\treturn new double[]{nextVabs, nextVarg};\r\n\t\t}", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n range0.getEnd();\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "private void validateParameter(){\n\t\tif(hrNum > upperBound){\n\t\t\thrNum = upperBound;\n\t\t}\n\t\telse if(hrNum < lowerBound){\n\t\t\thrNum = lowerBound;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372032559808509L, 9223372036854775806L);\n // Undeclared exception!\n try { \n range0.split((-797L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n long long0 = 2147483647L;\n Range.of(2147483647L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "Range controlLimits();", "public void outOfBoundsError() {\r\n\t\tSystem.out.println(\"\\nYou moved out of bounds, choose again.\");\r\n\t}", "public boolean isOutsideLimits(int value) {\n return value < lowerLimit || value > upperLimit;\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n Range.Builder range_Builder1 = new Range.Builder(0L);\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n range_Builder0.shift(243L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n long long0 = 127L;\n Range range1 = Range.of((-636L), 127L);\n range1.isSubRangeOf(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test\n public void testIsInLimitLower() {\n Assertions.assertTrue(saab.isInLimit(.3, .9, .6));\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Range range0 = Range.of((-1259L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n range1.getEnd();\n range1.getEnd();\n Range range2 = Range.of((-1259L), 255L);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n Range range3 = Range.of(range_CoordinateSystem1, (-1259L), 0L);\n range3.endsBefore(range0);\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. 256 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public IndexException(int min, int max, int value) {\n super(\"Index is out of range\");\n this.min = min;\n this.max = max;\n this.value = value;\n }", "protected void mapValueToWithinBounds() {\n if (getAllele() != null) {\n \tFloat d_value = ( (Float) getAllele());\n if (d_value.isInfinite()) {\n // Here we have to break to avoid a stack overflow.\n // ------------------------------------------------\n return;\n }\n // If the value exceeds either the upper or lower bounds, then\n // map the value to within the legal range. To do this, we basically\n // calculate the distance between the value and the float min,\n // then multiply it with a random number and then care that the lower\n // boundary is added.\n // ------------------------------------------------------------------\n if (d_value.floatValue() > m_upperBound ||\n d_value.floatValue() < m_lowerBound) {\n RandomGenerator rn;\n if (getConfiguration() != null) {\n rn = getConfiguration().getRandomGenerator();\n }\n else {\n rn = new StockRandomGenerator();\n }\n setAllele(new Float((rn.nextFloat()\n * ((m_upperBound - m_lowerBound))) + m_lowerBound));\n }\n }\n }", "private void checkStartLimit(int start, int limit) {\r\n if (start > limit) {\r\n throw new IllegalArgumentException(\r\n \"Start is greater than limit. start:\" + start + \"; limit:\" + limit);\r\n }\r\n if (start < 0) {\r\n throw new IllegalArgumentException(\"Start is negative. start:\" + start);\r\n }\r\n if (limit > length()) {\r\n throw new IllegalArgumentException(\"Limit is greater than length. limit:\" + limit);\r\n }\r\n }", "public static double limitRange( double val )\n {\n if( val > 1.0 )//If number is greater than 1.0, it becomes 1.0.\n {\n val = 1.0; \n }\n else if( val < -1.0 )//Else if number is less than -1.0, it becomes -1.0.\n {\n val = -1.0;\n }\n \n //Returns the limited number\n return val;\n }", "private boolean outOfRange(double i, double e, int threshold) {\n\n\t\tdouble lowerBound = e / (double) threshold;\n\t\tdouble upperBound = e * (double) threshold;\n\n\t\treturn ((i < lowerBound) || (i > upperBound));\n\t}", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long0 = (-665L);\n long long1 = (-1L);\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem0, (-665L), (-1L));\n range_Builder0.contractEnd((-665L));\n range_Builder0.expandEnd((-1L));\n // Undeclared exception!\n try { \n range_Builder0.contractEnd(9223372036854775807L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public void assertIndexInRange(int index) {\n assert index >= 0;\n }", "@Test(timeout = 4000)\n public void test000() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n long long0 = (-665L);\n long long1 = 14L;\n Range.Builder range_Builder0 = new Range.Builder(14L);\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(14L, (-665L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test040() throws Throwable {\n Range range0 = Range.of((-128L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.getBegin();\n range0.forEach(consumer0);\n // Undeclared exception!\n try { \n Range.parseRange(\"=817I#e%\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse =817I#e% into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {\n\t\tif (fromIndex > toIndex)\n\t\t\tthrow new IllegalArgumentException(\"fromIndex(\" + fromIndex +\n\t\t\t\t\t\") > toIndex(\" + toIndex+\")\");\n\t\tif (fromIndex < 0)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(fromIndex);\n\t\tif (toIndex > arrayLen)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(toIndex);\n\t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n Range range0 = Range.of((-2147483648L));\n Range range1 = Range.of(1845L);\n boolean boolean0 = range0.isSubRangeOf(range1);\n assertFalse(boolean0);\n \n range0.getBegin();\n assertTrue(range0.isEmpty());\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-23L), (-23L));\n Range.Builder range_Builder0 = new Range.Builder(range0);\n range_Builder0.expandBegin((-23L));\n range_Builder0.shift((-23L));\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n linkedList0.add(range0);\n range0.complementFrom(linkedList0);\n Range range1 = Range.of(9223372036854775807L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Long> consumer0 = (Consumer<Long>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.ZERO_BASED;\n range_CoordinateSystem2.toString();\n range0.equals(\"Zero Based\");\n range_CoordinateSystem1.toString();\n // Undeclared exception!\n try { \n range1.complement(range0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // given length -24 would make range [9223372036854775807 - ? ] beyond max allowed end offset\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n long long0 = 0L;\n Range range0 = Range.of(0L, 0L);\n range0.spliterator();\n Range.Builder range_Builder0 = new Range.Builder(range0);\n Object object0 = new Object();\n range0.equals(object0);\n range0.toString();\n // Undeclared exception!\n try { \n range0.endsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n Range range0 = Range.of(range_CoordinateSystem0, (-1241L), 848L);\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void testScanItemLowException(){\n instance.scanItem(-0.5);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals(\"number of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean0);\n \n Range range1 = Range.of((-2147483648L));\n List<Range> list0 = range1.complement(range0);\n assertEquals(0, list0.size());\n }", "RangeInfo(int type, float min, float max, float current) {\n/* 3044 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test015() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Object object0 = new Object();\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.startsBefore((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // Null Range used in range comparison operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n long long0 = 0L;\n Range range0 = Range.of(0L, 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.getBegin(range_CoordinateSystem0);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.getBegin();\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range.Builder range_Builder0 = new Range.Builder(range_CoordinateSystem2, 0L, 0L);\n long long1 = 0L;\n // Undeclared exception!\n try { \n Range.of(0L, (-1813L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test\n\tpublic void excepHeighthMinRange()\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew Game(\"BoulderDash\", 768, 768);\n\t\t\tfail(\"Schould throw exception when width > 100\");\n\t\t}\n\t\tcatch(final Exception e)\n\t\t{\n\t\t\tfinal String expected = \"width out range\";\n\t\t\tassertEquals(expected, e.getMessage());\n\t\t}\n\t}", "@Override\n\tprotected void setLowerBound() {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range0.isSubRangeOf(range1);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Range range0 = Range.of((-2147483660L));\n assertFalse(range0.isEmpty());\n }", "private double checkBounds(double param, int i) {\n if (param < low[i]) {\n return low[i];\n } else if (param > high[i]) {\n return high[i];\n } else {\n return param;\n }\n }", "public static void checkValue(BigDecimal candidate) throws ArithmeticException {\n if (candidate.compareTo(MIN_VALUE) < 0) {\n throw new ArithmeticException();\n }\n if (candidate.compareTo(MAX_VALUE) > 0) {\n throw new ArithmeticException();\n }\n }", "@Test\n\tpublic void excepWidthMinRange()\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew Game(\"BoulderDash\", 768, 768);\n\t\t\tfail(\"Schould throw exception when width < 100\");\n\t\t}\n\t\tcatch(final Exception e)\n\t\t{\n\t\t\tfinal String expected = \"width out range\";\n\t\t\tassertEquals(expected, e.getMessage());\n\t\t}\n\t}", "private void checkCommissionRate(double commissionRate) throws ValueOutOfRangeException {\n if (commissionRate < 0 || commissionRate > 1) {\n throw new ValueOutOfRangeException(\"Commission rate has to be between 0 and 1.\");\n }\n }", "int selectValue(IntVar v) {\r\n int c = (v.max() + v.min())/2;\r\n return c;\r\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n Range.Builder range_Builder0 = new Range.Builder();\n range_Builder0.contractBegin(0L);\n range_Builder0.copy();\n range_Builder0.copy();\n Range range0 = range_Builder0.build();\n long long0 = 265L;\n range_Builder0.shift(265L);\n Consumer<Object> consumer0 = (Consumer<Object>) mock(Consumer.class, new ViolatedAssumptionAnswer());\n range0.forEach(consumer0);\n Range range1 = Range.of(0L);\n List<Range> list0 = range0.complement(range1);\n List<Range> list1 = range0.complementFrom(list0);\n List<Range> list2 = range0.complementFrom(list1);\n List<Range> list3 = range0.complementFrom(list2);\n range0.complementFrom(list3);\n Range.of((-1147L), 0L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range2 = Range.of(range_CoordinateSystem0, 0L, 0L);\n Range range3 = range2.intersection(range0);\n range0.getEnd();\n range3.intersects(range0);\n // Undeclared exception!\n try { \n Range.parseRange(\"q)fxUX9s]Tp\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse q)fxUX9s]Tp into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n Range range0 = Range.of(4294967295L);\n Object object0 = new Object();\n range0.intersects(range0);\n // Undeclared exception!\n try { \n range0.isSubRangeOf((Range) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // range can not be null\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Override\n public boolean isRange() {\n return false;\n }", "public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }", "public OtpErlangRangeException(final String msg) {\n super(msg);\n }", "public void setLowerBound (int lowerBound) throws ModelException;", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"/9-5!2 Hl\", range_CoordinateSystem0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void beginGreaterException() {\n\n\t\tset.beginAt(set.size() + 1);\n\t}", "public ValueOutOfBoundsException(String message){\n super(message);\n //do nothing else\n }", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n Range range0 = Range.of(12599011L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n Range range1 = range0.asRange();\n Range.CoordinateSystem.values();\n // Undeclared exception!\n try { \n range1.intersection((Range) null);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Null Range used in intersection operation.\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 0L, 4294967295L);\n range0.getBegin();\n // Undeclared exception!\n try { \n range0.split(0L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // max splitLength must be >= 1\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n Range range0 = Range.ofLength(4294967244L);\n Long long0 = new Long(4294967244L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range.of(4294967244L);\n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\");\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range2 = Range.parseRange(\"[ 1 .. 4294967244 ]/RB\", range_CoordinateSystem1);\n range2.getEnd();\n range0.equals(range1);\n range2.getBegin();\n Range.CoordinateSystem range_CoordinateSystem2 = Range.CoordinateSystem.RESIDUE_BASED;\n // Undeclared exception!\n try { \n Range.parseRange(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\", range_CoordinateSystem2);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public void myMethod(int a) throws Exception {\n if(a>=1 && a<=10)\n System.out.println(\"We are safe\");\n else\n throw new Exception(\"we are at danger\");\n }", "private void check_range(int offset, int byte_count) throws BadRangeException {\n int end_block = get_end_block(offset, byte_count);\n if (offset < 0 ||\n byte_count < 0 ||\n (final_block != -1 && final_block == end_block &&\n (offset+byte_count) % Constants.FILE_BLOCK_SIZE > content.get(end_block).length()) ||\n (final_block != -1 && end_block > final_block))\n {\n throw new BadRangeException();\n }\n }" ]
[ "0.69525445", "0.6860043", "0.64817744", "0.6454906", "0.63077295", "0.62737656", "0.6269238", "0.6216232", "0.6188581", "0.6165851", "0.61577547", "0.60967404", "0.6048084", "0.59643173", "0.5954929", "0.5953195", "0.59476155", "0.5919883", "0.586917", "0.58607376", "0.5843204", "0.5820069", "0.5793", "0.578867", "0.5785057", "0.5780002", "0.5774745", "0.5766733", "0.57426363", "0.57343", "0.5730144", "0.5720765", "0.57169884", "0.5706457", "0.57056624", "0.5705614", "0.5696004", "0.5689262", "0.5683664", "0.56797016", "0.56754494", "0.56752414", "0.5674824", "0.5672239", "0.56699175", "0.5661687", "0.565828", "0.5656606", "0.56403714", "0.56342775", "0.5629839", "0.56193835", "0.56160355", "0.5614849", "0.5603848", "0.5587049", "0.5578001", "0.55721474", "0.5571716", "0.55716974", "0.55674314", "0.55595154", "0.55562085", "0.55461645", "0.5540707", "0.5533996", "0.55335784", "0.55316913", "0.55260926", "0.5511097", "0.54979146", "0.5496443", "0.54931974", "0.54892826", "0.54833376", "0.54681885", "0.5455004", "0.5454059", "0.5449442", "0.54464", "0.543929", "0.5438924", "0.5434634", "0.5434383", "0.5432314", "0.5431441", "0.5424113", "0.54072887", "0.53987396", "0.53865486", "0.53828263", "0.53826284", "0.5370325", "0.536716", "0.5351829", "0.53493065", "0.534433", "0.5342861", "0.53377515", "0.5331501" ]
0.6633293
2
return excess flow at vertex v
private double excess(FlowNetwork G, int v) { double excess = 0.0; for (FlowEdge e : G.adj(v)) { if (v == e.from()) excess -= e.flow(); else excess += e.flow(); } return excess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double excess(FlowNetwork G, int v) {\r\n double excess = 0.0;\r\n for (FlowEdge e : G.adj(v)) {\r\n if (v == e.from())\r\n excess -= e.flow();\r\n else\r\n excess += e.flow();\r\n }\r\n return excess;\r\n }", "public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }", "public double residualCapacity(int vertex)\n {\n if (vertex == v)\n return flow; // 正向流量\n else if (vertex == w)\n return capacity() - flow;// 剩余流量\n else\n throw new InconsistentEdgeException();\n }", "public int outdegree(int v) {\n return adj[v].size();\n }", "public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }", "private static int nonIsolatedVertex(Graph G) {\n for (int v = 0; v < G.V(); v++)\n if (G.degree(v) > 0)\n return v;\n return -1;\n }", "private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }", "public int outDegree(N v) {\n return getOutEdges(v).size();\n }", "private void validateVertex(int v) {\r\n\t if (v < 0 || v >= V)\r\n\t throw new IndexOutOfBoundsException(\"vertex \" + v + \" is not between 0 and \" + (V-1));\r\n\t }", "int getShortestDistance(V vertex);", "private void validate(int v) {\r\n if (v < 0 || v >= V)\r\n throw new IllegalArgumentException(\r\n \"vertex \" + v + \" is not between 0 and \" + (V - 1));\r\n }", "public int getNextUnvisitedNeighbor (int v){\n for (int j=0; j<nVerts; j++) {\n if (adjMat[v][j] == 1 && vertextList[j].wasVisited == false) \n return j\n return -1; // none found\n }\n }", "@Override\r\n\tprotected void collectDisappearingPotential(V v) {\r\n\t\tif (graph.outDegree(v) == 0) {\r\n\t\t\tif (isDisconnectedGraphOK()) {\r\n\t\t\t\tif (v instanceof TopicVertex) {\r\n\t\t\t\t\tpr_disappearing_potential += getCurrentValue(v);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// not necessary for hits-hub\r\n\t\t\t\t\t// disappearing_potential.hub += getCurrentValue(v);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Outdegree of \" + v\r\n\t\t\t\t\t\t+ \" must be > 0\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// not necessary for hits-hub\r\n\t\t// if (graph.inDegree(v) == 0) {\r\n\t\t// if (isDisconnectedGraphOK()) {\r\n\t\t// if (!(v instanceof TopicReferenceVertex)) {\r\n\t\t// disappearing_potential.authority += getCurrentValue(v);\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// throw new IllegalArgumentException(\"Indegree of \" + v\r\n\t\t// + \" must be > 0\");\r\n\t\t// }\r\n\t\t// }\r\n\t}", "private void validate(int v, int V) {\n\t if (v < 0 || v >= V)\n\t throw new IndexOutOfBoundsException(\"vertex \" + v + \" is not between 0 and \" + (V-1));\n\t }", "public int length(final int v, final int w) {\n\n validateVertex(v);\n validateVertex(w);\n\n final BreadthFirstDirectedPaths bfdvObj = new BreadthFirstDirectedPaths(digraphObj, v);\n final BreadthFirstDirectedPaths bfdwObj = new BreadthFirstDirectedPaths(digraphObj, w);\n\n int infinity = Integer.MAX_VALUE;\n \n for (int vertex = 0; vertex < digraphObj.V(); vertex++) {\n if (bfdvObj.hasPathTo(vertex) && bfdwObj.hasPathTo(vertex)) {\n final int dist = bfdvObj.distTo(vertex) + bfdwObj.distTo(vertex);\n if (dist <= infinity) {\n infinity = dist;\n }\n }\n }\n\n return (infinity == Integer.MAX_VALUE) ? -1 : infinity;\n }", "public int length(int v, int w) {\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i) && bfsV.distTo(i) + bfsW.distTo(i) < min) {\n min = bfsV.distTo(i) + bfsW.distTo(i);\n }\n }\n return min == Integer.MAX_VALUE ? -1 : min;\n }", "public int length(int v, int w) {\n\t\tBreadthFirstDirectedPaths bfsv = new BreadthFirstDirectedPaths(G, v);\n\t\tBreadthFirstDirectedPaths bfsw = new BreadthFirstDirectedPaths(G, w);\n\t\tint dv, dw, dsap = INFINITY;\n\t\tfor(int vertex = 0; vertex < G.V(); vertex++) {\n\t\t\tdv = bfsv.distTo(vertex);\n\t\t\tdw = bfsw.distTo(vertex);\n\t\t\tif (dv != INFINITY && dw != INFINITY && (dv + dw < dsap)) {\n\t\t\t\tdsap = dv + dw;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn (dsap == INFINITY) ? -1 : dsap;\n\t}", "public int length(int v, int w) throws java.lang.NullPointerException, java.lang.IndexOutOfBoundsException \n\t {\n\t\t if(null==mGraph) throw new java.lang.NullPointerException(\"Null graph in SAP\");\n\t\t if ( (v<0 || v >= mGraph.V()) || (w<0 || w >= mGraph.V()) ) throw new java.lang.IndexOutOfBoundsException(\"index out of band\");\n\t\t \n\t\t Bag<Integer> vBag = new Bag<Integer>();\n\t\t Bag<Integer> wBag = new Bag<Integer>();\n\t\t vBag.add(v);\n\t\t wBag.add(w);\n\t\t return getAncestors(vBag,wBag).mDistance;\n\t }", "public int inDegree(N v) {\n return getInEdges(v).size();\n }", "public double distTo(int v){\n\t\tvalidateVertex(v);\n\t\treturn distTo[v];\n\t}", "private void validate(int v) {\n int upperBound = G.V() - 1;\n if (v < 0 || v > upperBound) {\n String errMsg = String.format(\"Need vertex v; 0 <= v <= %d; got %d\",\n upperBound, v);\n throw new IndexOutOfBoundsException(errMsg);\n }\n }", "public int length(int v, int w) {\n if (v < 0 || v >= digraph.V() || w < 0 || w >= digraph.V())\n throw new IllegalArgumentException(\"Null argument\");\n int candidate = Integer.MAX_VALUE;\n ancestor = Integer.MAX_VALUE;\n bfsV = new BreadthFirstDirectedPathsFast(digraph, v);\n bfsW = new BreadthFirstDirectedPathsFast(digraph, w);\n for (int i = 0; i < digraph.V(); ++i) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n int distV = bfsV.distTo(i);\n int distW = bfsW.distTo(i);\n if (distV + distW < candidate) {\n candidate = distV + distW;\n ancestor = i;\n }\n }\n }\n return candidate == Integer.MAX_VALUE ? -1 : candidate;\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i) && bfsV.distTo(i) + bfsW.distTo(i) < min) {\n min = bfsV.distTo(i) + bfsW.distTo(i);\n }\n }\n return min == Integer.MAX_VALUE ? -1 : min;\n }", "public Edge getResidualEdge () {\r\n return new Edge(from,to,(capacity - flow));\r\n }", "public int length(int v, int w) {\n\n if (v < 0 || v >= dg.V() || w < 0 || w >= dg.V())\n throw new IllegalArgumentException(\"vertex is not between 0 and \" + (dg.V() - 1));\n\n// ancestor(v,w);\n\n // use bfs to find the path and the shortest distance from v to every vertices in the graph\n // use two arrays, one record the last vertex, edgeTo[]. Another record the distance, distTo[].\n BreadthFirstDirectedPaths bfs1 = new BreadthFirstDirectedPaths(dg, v);\n BreadthFirstDirectedPaths bfs2 = new BreadthFirstDirectedPaths(dg, w);\n\n int ancestor = ancestor(v, w);\n\n if (ancestor == -1) {\n return -1;\n } else {\n return bfs1.distTo(ancestor) + bfs2.distTo(ancestor);\n }\n\n }", "public int flow(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.flow(e);\n\t\t}\n\t\treturn 0;\n\t}", "public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }", "public int degreeOf(V vertex);", "public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }", "public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }", "public V removeVertex(V v);", "public void EliminarVertice(int v) {\n\t\tNodoGrafo aux = origen;\n\t\tif (origen.nodo == v) \n\t\t\torigen = origen.sigNodo;\t\t\t\n\t\twhile (aux != null){\n\t\t\t// remueve de aux todas las aristas hacia v\n\t\t\tthis.EliminarAristaNodo(aux, v);\n\t\t\tif (aux.sigNodo!= null && aux.sigNodo.nodo == v) {\n\t\t\t\t// Si el siguiente nodo de aux es v , lo elimina\n\t\t\t\taux.sigNodo = aux.sigNodo.sigNodo;\n\t\t\t}\n\t\t\taux = aux.sigNodo;\n\t\t}\t\t\n\t}", "void DFS(int v) {\n\t\t\tboolean visited[] = new boolean[number_of_vertices];\n\t\t\t\n\t\t\t//in case that the vertex are not connected, I need to make DFS for all\n\t\t\t//available vertex and checking before if they are not visited\n\t\t\tfor(int i = 0 ; i < number_of_vertices; i++) {\n\t\t\t\tif(visited[i] == false)\n\t\t\t\t\tDFSUtil(v, visited);\n\t\t\t}\n\t\t}", "@Override\r\n\tprotected double update(V v) {\r\n\t\tcollectDisappearingPotential(v);\r\n\r\n\t\tint incident_count = 0;\r\n\t\tdouble v_input = 0;\r\n\t\tdouble v_auth = 0;\r\n\t\tdouble v_hub = 0;\r\n\t\tif (v instanceof TopicCategoryVertex) {\r\n\t\t\tfor (E e : graph.getInEdges(v)) {\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tv_auth += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (alpha > 0) {\r\n\t\t\t\tv_auth = hitsCoeff * v_auth * (1 - alpha) + getVertexPrior(v)\r\n\t\t\t\t\t\t* alpha;\r\n\t\t\t}\r\n\t\t\tsetOutputValue(v, v_auth);\r\n\t\t\treturn Math.abs(getCurrentValue(v) - v_auth);\r\n\t\t} else {\r\n\t\t\tfor (E e : graph.getInEdges(v)) {\r\n\t\t\t\t// For hypergraphs, this divides the potential coming from w\r\n\t\t\t\t// by the number of vertices in the connecting edge e.\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tv_input += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (E e : graph.getOutEdges(v)) {\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tif (w instanceof TopicCategoryVertex)\r\n\t\t\t\t\t\t\tv_hub += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdouble new_value = hitsCoeff * v_hub + (1 - hitsCoeff) * v_input;\r\n\t\t\tif (alpha > 0) {\r\n\t\t\t\tnew_value = new_value * alpha + getVertexPrior(v) * (1 - alpha);\r\n\t\t\t}\r\n\t\t\tsetOutputValue(v, new_value);\r\n\t\t\treturn Math.abs(getCurrentValue(v) - new_value);\r\n\t\t}\r\n\t}", "public int getDegree(V vertex);", "int getDegree(V v);", "Color generateColor(Vertex v) {\n if (v.x == width - 1 && v.y == height - 1) {\n return Color.magenta;\n }\n else if (v.path) {\n return Color.blue;\n }\n else if (v.x == 0 && v.y == 0) {\n return Color.green;\n }\n else if (v.visited) {\n return Color.cyan;\n }\n else {\n return Color.gray;\n }\n }", "@Override\n\tpublic double calcMinCostFlow(Graph graph) {\n\t\treturn 0;\n\t}", "public Collection<V> getOtherVertices(V v);", "public int getNext(int v)\r\n {\r\n for(int j=vertexList[v].possibleVisit+1; j<nVerts; j++)\r\n if(adjMat[v][j]==1 && vertexList[j].wasVisited==false)\r\n return j;\r\n return -1;\r\n }", "public int getColor(Vertex v);", "public Iterable<FlowEdge> adj(int v) {\n return adj[v];\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n\t\tif (v == null || w == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tBreadthFirstDirectedPaths bfsv = new BreadthFirstDirectedPaths(G, v);\n\t\tBreadthFirstDirectedPaths bfsw = new BreadthFirstDirectedPaths(G, w);\n\t\tint dv, dw, dsap = INFINITY;\n\t\tfor(int vertex = 0; vertex < G.V(); vertex++) {\n\t\t\tdv = bfsv.distTo(vertex);\n\t\t\tdw = bfsw.distTo(vertex);\n\t\t\tif (dv != INFINITY && dw != INFINITY && (dv + dw < dsap)) {\n\t\t\t\tdsap = dv + dw;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn (dsap == INFINITY) ? -1 : dsap;\n\t}", "private static double fds_h(Vec v) { return 2*ASTMad.mad(new Frame(v), null, 1.4826)*Math.pow(v.length(),-1./3.); }", "private NodoGrafo Vert2Nodo(int v) {\n\t\tNodoGrafo aux = origen;\n\t\twhile (aux != null && aux.nodo != v)\n\t\t\taux = aux.sigNodo;\t\t\n\t\treturn aux;\n\t}", "void contractEdges(DynamicGraph G, Integer u, Integer v ){\n G.removeEdges(u, v);\n // for all vertices w adj to v\n for (Integer w: G.adjacent(v)){\n // addEdge(u, w);\n G.addEdge(u, w);\n }\n // removeVertex(v); decrement V.\n G.removeVertex(v);\n /*System.out.println(\"After contracting edge u: \"+ u +\" v: \"+ v);\n System.out.println(G);*/\n }", "public int getvertex() {\n\t\treturn this.v;\n\t}", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "public Set<V> findCyclesContainingVertex(V v)\n {\n Set<V> set = new LinkedHashSet<>();\n execute(set, v);\n\n return set;\n }", "public Arestas primeiroListaAdj (int v) {\n this.pos[v] = -1; return this.proxAdj (v);\n }", "boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}", "public int length(int v, int w){\n\t BreadthFirstDirectedPaths BFSv =new BreadthFirstDirectedPaths(D,v);\n\t BreadthFirstDirectedPaths BFSw =new BreadthFirstDirectedPaths(D,w);\n\t \n\t int distance = Integer.MAX_VALUE;\n\t \n\t for (int vertex = 0 ; vertex < D.V();vertex++)\n\t\t if ((BFSv.hasPathTo(vertex))\n\t\t\t\t &&(BFSw.hasPathTo(vertex))\n\t\t\t\t &&(BFSv.distTo(vertex)+BFSw.distTo(vertex))<distance)\n\t\t {\n\t\t\t distance = BFSv.distTo(vertex)+BFSw.distTo(vertex);\n\t\t }\n\t if (distance != Integer.MAX_VALUE)\n\t\t return distance;\n\t else\n\t\t return -1;\n }", "private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }", "void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }", "public void out_vertex(Site v) {\r\n\t\tif (triangulate == 0 & plot == 0 & debug == 0) {\r\n\t\t\tSystem.err.printf(\"v %f %f\\n\", v.coord.x, v.coord.y);\r\n\t\t}\r\n\r\n\t\tif (debug == 1) {\r\n\t\t\tSystem.err.printf(\"vertex(%d) at %f %f\\n\", v.sitenbr, v.coord.x,\r\n\t\t\t\t\tv.coord.y);\r\n\t\t}\r\n\t}", "public int length(int v, int w) {\n if (!isValid(v, w)) {\n throw new IndexOutOfBoundsException();\n }\n\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n\n int shortestPath = -1;\n Deque<Integer> ancestors = new ArrayDeque<>();\n\n for (int i = 0; i < this.digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n ancestors.push(i);\n }\n }\n\n for (Integer integer : ancestors) {\n int path = bfsV.distTo(integer) + bfsW.distTo(integer);\n if (shortestPath == -1 || path < shortestPath) {\n shortestPath = path;\n }\n }\n return shortestPath;\n }", "public int numVertices() { return numV; }", "public Collection<Vertex> adjacentVertices(Vertex v) {\n Vertex parameterVertex = new Vertex(v.getLabel());\n if(!myGraph.containsKey(parameterVertex)){\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n\n //create a copy of the passed in vertex to restrict any reference\n //to interals of this class\n Collection<Vertex> adjVertices = new ArrayList<Vertex>();\n\n Iterator<Edge> edges = myGraph.get(parameterVertex).iterator();\n while(edges.hasNext()) {\n adjVertices.add(edges.next().getDestination());\n }\n return adjVertices;\n }", "private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }", "private void relax(Edge e, int v) {\r\n int w = e.other(v);\r\n if (distTo[w] > distTo[v] + e.weight()) {\r\n distTo[w] = distTo[v] + e.weight();\r\n edgeTo[w] = e;\r\n if(nWays[v]>0)\r\n \tnWays[w]= nWays[v];\t\t\t//posibles caminos desde origen...\r\n else\r\n \tnWays[w]=1;\r\n if (pq.contains(w)) pq.decreaseKey(w, distTo[w]);\r\n else pq.insert(w, distTo[w]);\r\n }else if(distTo[w] == distTo[v] + e.weight()){\r\n \tnWays[w] += nWays[v];\r\n \t/* if(nWays[v]>1)\r\n \tnWays[w]=nWays[w]*nWays[v];\r\n \t else\r\n \t\t nWays[w]++;*/\r\n }\r\n }", "@Override\r\n\tpublic Iterable<Integer> pathTo(int v) {\r\n\t\tif (!hasPathTo(v)) return null;\r\n\r\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\twhile(v != -1) {\r\n\t\t\tlist.add(v);\r\n\t\t\tv = edgeTo[v];\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public int length(int v, int w) {\r\n if (v < 0 || w < 0 || v >= G.V() || w >= G.V())\r\n throw new IndexOutOfBoundsException();\r\n BreadthFirstDirectedPaths bfdp1 = new BreadthFirstDirectedPaths(G, v);\r\n BreadthFirstDirectedPaths bfdp2 = new BreadthFirstDirectedPaths(G, w);\r\n int shortestDist = Integer.MAX_VALUE;\r\n for (int i = 0; i < G.V(); i++) {\r\n if (bfdp1.hasPathTo(i) && bfdp2.hasPathTo(i)) {\r\n shortestDist = (shortestDist <= bfdp1.distTo(i) + bfdp2.distTo(i)) ? shortestDist : bfdp1.distTo(i) + bfdp2.distTo(i);\r\n }\r\n }\r\n return (shortestDist == Integer.MAX_VALUE) ? -1: shortestDist;\r\n }", "void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }", "private void propagate(int v) {\n\t\tNode node = heap[v];\n\t\tif (node.pendingVal != null) {\n\t\t\tchange(heap[2 * v], node.pendingVal);\n\t\t\tchange(heap[2 * v + 1], node.pendingVal);\n\t\t\tnode.pendingVal = null; // unset the pending propagation value\n\t\t}\n\t}", "public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);", "public static void dfs(int a, Vertex [] v){\n assert !v[a].visited;\n\n v[a].visited = true;\n\n // traverse over all the outgoing edges\n\n for(int b : v[a].edges){\n v[b].d = Math.max(v[b].d , v[a].d + 1);\n v[b].in --;\n\n if(v[b].in == 0 && !v[b].visited){\n dfs(b,v);\n }\n }\n\n\n }", "public double getEdgeFlow() {\n\t\treturn this.flow;\r\n\t}", "List<V> getAdjacentVertexList(V v);", "private void modifyFringe(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tgetEdge(getVertex(w).getParent(), w).setSelected(false);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.promote(vertex);\n\t}", "public Path dfs(Graph G, int v) {\r\n Path result = new Path();\r\n \tcount++;\r\n marked[v] = true;\r\n Iterator<Integer> it = G.getAdjList(v).iterator();\r\n while(it.hasNext()){\r\n \tint w = it.next();\r\n if (!marked[w]) {\r\n \t\t result.addPath(new Edge(v,w));\r\n result.append(dfs(G, w));\r\n \t}\r\n \t//System.out.print(v + \" \"+ w + \"\\n\");\r\n }\r\n return result;\r\n }", "private void Visitar(Vertice v, int p) {\n\t\t\n\t\tv.setVisited(true);\n\t\tv.setPredecessor(p);\n\t\t\n\t\tLinkedList<ListaAdjacencia> L = v.getAdjList();\n\t\t\n\t\tfor (ListaAdjacencia node : L) {\n\t\t\tint n = node.getverticeNumero();\n\t\t\tif (!vertices[n].getVisited()) {\n\t\t\t\tVisitar(vertices[n], v.getIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int length(int v, int w){\n shortestPath(v,w);\n return minPath;\n }", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "private Double distanceToLine(Vector v, PointD p)\r\n\t{\r\n\t\tPointD nearestPoint = getNearestPointOnLine(v,p);\t\t\r\n\t\t\r\n\t\tdouble x1 = nearestPoint.getX();\r\n\t\tdouble y1 = nearestPoint.getY();\r\n\t\t\r\n\t\tdouble t;\r\n\t\tif(v.getX()>v.getY())//if one component is close to zero, use other one\r\n\t\t\tt = (x1 - v.getTail().getX()) / v.getX();\r\n\t\telse\r\n\t\t\tt = (y1 - v.getTail().getY()) / v.getY();\r\n\t\t\r\n\t\tif(t < 0 || t > 1)//then calculated point is not in line segment\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn Math.sqrt((p.getX() - x1)*(p.getX() - x1) + (p.getY() - y1)*(p.getY() - y1));\r\n\t}", "private double calculaz(double v) { //funcion de densidad de probabilidad normal\n double N = Math.exp(-Math.pow(v, 2) / 2) / Math.sqrt(2 * Math.PI);\n return N;\n }", "private void extrapolation(HashMap<Long,Double> extraV){\n double g = 0;\n double h = 0;\n double newV = 0;\n for (long i=0; i<n; i++) {\n g = (oldv.get(i)-extraV.get(i));\n g = g*g;//compute g\n h = v.get(i) - 2*oldv.get(i) + extraV.get(i);\n newV = v.get(i) - g/h;\n if(g >= 1e-8 && h >= 1e-8){\n v.put(i, newV);\n }\n }\n }", "private int[] shortest(int w, int v) {\n int[] res = new int[2];\n DeluxeBFS wBFS = new DeluxeBFS(G, w);\n DeluxeBFS vBFS = new DeluxeBFS(G, v);\n boolean[] wMarked = wBFS.getMarked();\n boolean[] vMarked = vBFS.getMarked();\n int minDis = Integer.MAX_VALUE;\n int anc = Integer.MAX_VALUE;\n \n for (int i = 0; i < wMarked.length; i++) {\n if (wMarked[i] && vMarked[i]) {\n int dis = wBFS.distTo(i) + vBFS.distTo(i);\n if (dis < minDis) {\n minDis = dis;\n anc = i;\n }\n }\n }\n if (minDis == Integer.MAX_VALUE) {\n res[0] = -1;\n res[1] = -1;\n return res;\n } else {\n res[0] = minDis;\n res[1] = anc;\n return res;\n }\n }", "public void dfs(int v) {\n marked[v] = true;\n onStack[v] = true;\n for (DirectedEdge e : G.incident(v)) {\n int w = e.to();\n if (hasCycle())\n return;\n else if (!marked[w]) {\n parent[w] = v;\n dfs(w);\n } else if (onStack[w]) {\n cycle = new Stack<>();\n cycle.push(w);\n for (int u = v; u != w; u = parent[u])\n cycle.push(u);\n cycle.push(w);\n return;\n }\n }\n onStack[v] = false;\n reversePost.push(v);\n }", "public E getParentEdge(V vertex);", "private static BigInteger connectedGraphs(\n final int v, final int e) {\n if (v == 0) {\n return ZERO;\n }\n if (v == 1) {\n // Fast exit #1: single-vertex\n return e == 0 ? ONE : ZERO;\n }\n final int allE = v * (v - 1) >> 1;\n if (e == allE) {\n // Fast exit #2: complete graph (the only result)\n return ONE;\n }\n final int key = v << 16 | e;\n if (CONN_GRAPHS_CACHE.containsKey(key)) {\n return CONN_GRAPHS_CACHE.get(key);\n }\n BigInteger result;\n if (e == v - 1) {\n // Fast exit #3: trees -> apply Cayley's formula\n result = BigInteger.valueOf(v).pow(v - 2);\n } else if (e > allE - (v - 1)) {\n // Fast exit #4: e > edges required to build a (v-1)-vertex\n // complete graph -> will definitely form connected graphs\n // in all cases, so just calculate allGraphs()\n result = allGraphs(v, e);\n } else {\n /*\n * In all other cases, we'll have to remove\n * partially-connected graphs from all graphs.\n *\n * We can define a partially-connected graph as a graph\n * with 2 sub-graphs A and B with no edges between them.\n * In addition, we require one of the sub-graphs (say, A)\n * to hold the following properties:\n * 1. A must be connected: this implies that the number\n * of possible patterns for A could be counted\n * by calling connectedGraphs().\n * 2. A must contain at least one fixed vertex:\n * this property - combined with 1. -\n * implies that A would not be over-counted.\n *\n * Under the definitions above, the number of\n * partially-connected graphs to be removed will be:\n *\n * (Combinations of vertices to be added from B to A) *\n * (number of possible A's, by connectedGraphs()) *\n * (number of possible B's, by allGraphs())\n * added up iteratively through v - 1 vertices\n * (one must be fixed in A) and all possible distributions\n * of the e edges through A and B\n */\n result = allGraphs(v, e);\n for (int vA = 1; vA < v; vA++) {\n // Combinations of vertices to be added from B to A\n final BigInteger aComb = nChooseR(v - 1, vA - 1);\n final int allEA = vA * (vA - 1) >> 1;\n // Maximum number of edges which could be added to A\n final int maxEA = allEA < e ? allEA : e;\n for (int eA = vA - 1; eA < maxEA + 1; eA++) {\n result = result.subtract(aComb\n // Number of possible A's\n .multiply(connectedGraphs(vA, eA))\n // Number of possible B's\n .multiply(allGraphs(v - vA, e - eA)));\n }\n }\n }\n CONN_GRAPHS_CACHE.put(key, result);\n return result;\n }", "public int ancestor(final int v, final int w) {\n\n validateVertex(v);\n validateVertex(w);\n\n if (v == w) {\n return v;\n }\n\n final BreadthFirstDirectedPaths bfdvObj = new BreadthFirstDirectedPaths(digraphObj, v);\n final BreadthFirstDirectedPaths bfdwObj = new BreadthFirstDirectedPaths(digraphObj, w);\n \n int infinity = Integer.MAX_VALUE;\n int ances = -1;\n\n for (int vertex = 0; vertex < digraphObj.V(); vertex++) {\n if (bfdvObj.hasPathTo(vertex) && bfdwObj.hasPathTo(vertex)) {\n final int dist = bfdvObj.distTo(vertex) + bfdwObj.distTo(vertex);\n if (dist <= infinity) {\n infinity = dist;\n ances = vertex;\n }\n }\n }\n\n return ances;\n }", "void visit(Graph.Vertex u, Graph.Vertex v) {\n\t\tDFSVertex bv = getVertex(v);\n\t\tbv.seen = true;\n\t\tbv.parent = u;\n\t\tbv.distance = distance(u) + 1;\n\t}", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n if (!isValid(v, w)) {\n throw new IndexOutOfBoundsException();\n }\n\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n\n int shortestPath = -1;\n Deque<Integer> ancestors = new ArrayDeque<>();\n\n for (int i = 0; i < this.digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n ancestors.push(i);\n }\n }\n\n for (Integer integer : ancestors) {\n int path = bfsV.distTo(integer) + bfsW.distTo(integer);\n if (shortestPath == -1 || path < shortestPath) {\n shortestPath = path;\n }\n }\n return shortestPath;\n }", "public int length(int v, int w) {\n BreadthFirstDirectedPaths bfdpv = new BreadthFirstDirectedPaths(g, v);\n BreadthFirstDirectedPaths bfdpw = new BreadthFirstDirectedPaths(g, w);\n int anc = -1;\n int minLen = Integer.MAX_VALUE;\n for (int x = 0; x < g.V(); x++) {\n if (bfdpv.hasPathTo(x) && bfdpw.hasPathTo(x)) {\n int len = bfdpv.distTo(x) + bfdpw.distTo(x);\n if (len < minLen) {\n minLen = len;\n anc = x;\n }\n }\n }\n if (anc == -1) minLen = -1;\n return minLen;\n }", "public FlowNetwork(int V) {\n this.V = V-1;\n adj = (List<FlowEdge>[]) new List[V];\n for (int v=0; v < V; v++)\n adj[v] = new ArrayList<>();\n }", "private Paths sap(int v, int w) {\n validate(v);\n validate(w);\n BreadthFirstDirectedPaths fromV = new BreadthFirstDirectedPaths(this.G, v);\n BreadthFirstDirectedPaths fromW = new BreadthFirstDirectedPaths(this.G, w);\n return processPaths(fromV, fromW);\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n\n validateIterableVertices(v);\n validateIterableVertices(w);\n // use bfs to find the path and the shortest distance from v to every vertices in the graph\n // use two arrays, one record the last vertex, edgeTo[]. Another record the distance, distTo[].\n BreadthFirstDirectedPaths bfs1 = new BreadthFirstDirectedPaths(dg, v);\n BreadthFirstDirectedPaths bfs2 = new BreadthFirstDirectedPaths(dg, w);\n\n int ancestor = ancestor(v, w);\n\n if (ancestor == -1) {\n return -1;\n } else {\n return bfs1.distTo(ancestor) + bfs2.distTo(ancestor);\n }\n\n }", "Vertex getOtherVertex(Vertex v) {\n\t\t\tif(v.equals(_one)) return _two;\n\t\t\telse if(v.equals(_two)) return _one;\n\t\t\telse return null;\n\t\t}", "public int succ(int v, int i) {\n\t\treturn graph[v][i];\n\t}", "public final boolean execute(final Vertex v) {\r\n\t\t\r\n\t\t\tEdge e = v.getEdge(src);\r\n\t\t\tweightSum += e.getWeight();\r\n\t\t\r\n\t\t\treturn true;\r\n\t\t}", "public int length(int v, int w) {\n inBound(v);\n inBound(w);\n\n Queue<ColoredNode> Q = new LinkedList<>();\n lengths[v] = lengths[w] = 0;\n colored[v] = color++;\n Q.add(new ColoredNode(colored[v], v));\n\n if (color - 1 == colored[w]) {\n ancestor = v;\n return 0;\n }\n\n colored[w] = color++;\n Q.add(new ColoredNode(colored[w], w));\n\n return BFS(Q);\n }", "Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}", "public Iterable<Integer> pathTo(int v)\n {\n if (!hasPathTo(v)) return null;\n Stack<Integer> path = new Stack<Integer>();\n for (int x = v; x != s; x = edgeTo[x])\n path.push(x);\n path.push(s);\n return path;\n }", "double getWeight(V v, V w);", "public Arestas proxAdj (int v) {\n this.pos[v] ++;\n while ((this.pos[v] < this.numVertices) && \n (this.mat[v][this.pos[v]] == 0)) this.pos[v]++;\n if (this.pos[v] == this.numVertices) return null;\n else return new Arestas (v, this.pos[v], this.mat[v][this.pos[v]]);\n }", "private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "float getVoltageStepIncrementOutOfPhase();", "public V getParent(V vertex);", "public int length(int v, int w) {\n return (distance == Integer.MAX_VALUE) ? -1 : distance;\n }" ]
[ "0.8137413", "0.6472538", "0.62812835", "0.62068105", "0.6151983", "0.6125281", "0.61048317", "0.5921011", "0.59192944", "0.58672154", "0.5862589", "0.58622", "0.5800586", "0.5798421", "0.57399607", "0.57080144", "0.5671706", "0.56627846", "0.5655465", "0.5647749", "0.56412923", "0.5603316", "0.55502963", "0.55500305", "0.5519049", "0.55149305", "0.54861045", "0.548436", "0.5479272", "0.5475507", "0.5441806", "0.5440598", "0.54173297", "0.54164696", "0.5409763", "0.539263", "0.53921974", "0.5382688", "0.5376062", "0.53711826", "0.5365481", "0.53653604", "0.53463244", "0.53357893", "0.5331175", "0.5329669", "0.5324886", "0.53183633", "0.53014773", "0.5291029", "0.52903944", "0.52858615", "0.5282002", "0.5277958", "0.5260825", "0.52580744", "0.52515304", "0.52494705", "0.52412045", "0.5240609", "0.52326274", "0.5231484", "0.52229166", "0.5219853", "0.5213535", "0.52091223", "0.5208228", "0.52042246", "0.51923335", "0.5187409", "0.5184448", "0.5171794", "0.51671124", "0.51630944", "0.51553047", "0.51499236", "0.5149835", "0.5146781", "0.51417965", "0.5122785", "0.5121313", "0.51198006", "0.5119248", "0.51172215", "0.5108962", "0.51016647", "0.50993407", "0.5099188", "0.50751233", "0.50693095", "0.50674194", "0.5064965", "0.5064013", "0.50566506", "0.5056513", "0.5053895", "0.50503063", "0.50480455", "0.504578", "0.50427526" ]
0.81833553
0
return excess flow at vertex v
private boolean isFeasible(FlowNetwork G, int s, int t) { double EPSILON = 1E-11; // check that capacity constraints are satisfied for (int v = 0; v < G.V(); v++) { for (FlowEdge e : G.adj(v)) { if (e.flow() < -EPSILON || e.flow() > e.capacity() + EPSILON) { System.err.println("Edge does not satisfy capacity constraints: " + e); return false; } } } // check that net flow into a vertex equals zero, except at source and sink if (Math.abs(value + excess(G, s)) > EPSILON) { System.err.println("Excess at source = " + excess(G, s)); System.err.println("Max flow = " + value); return false; } if (Math.abs(value - excess(G, t)) > EPSILON) { System.err.println("Excess at sink = " + excess(G, t)); System.err.println("Max flow = " + value); return false; } for (int v = 0; v < G.V(); v++) { if (v == s || v == t) continue; else if (Math.abs(excess(G, v)) > EPSILON) { System.err.println("Net flow out of " + v + " doesn't equal zero"); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double excess(FlowNetwork G, int v) {\n\t double excess = 0.0;\n\t for (FlowEdge e : G.adj(v)) {\n\t if (v == e.from()) excess -= e.flow();\n\t else excess += e.flow();\n\t }\n\t return excess;\n\t }", "private double excess(FlowNetwork G, int v) {\r\n double excess = 0.0;\r\n for (FlowEdge e : G.adj(v)) {\r\n if (v == e.from())\r\n excess -= e.flow();\r\n else\r\n excess += e.flow();\r\n }\r\n return excess;\r\n }", "public int outdegree(int v) {\r\n validateVertex(v);\r\n return adj[v].size();\r\n }", "public double residualCapacity(int vertex)\n {\n if (vertex == v)\n return flow; // 正向流量\n else if (vertex == w)\n return capacity() - flow;// 剩余流量\n else\n throw new InconsistentEdgeException();\n }", "public int outdegree(int v) {\n return adj[v].size();\n }", "public int indegree(int v) {\r\n validateVertex(v);\r\n return indegree[v];\r\n }", "private static int nonIsolatedVertex(Graph G) {\n for (int v = 0; v < G.V(); v++)\n if (G.degree(v) > 0)\n return v;\n return -1;\n }", "private static void spreadVirus(int v){\n Queue<Integer> queue = new LinkedList<>();\n queue.add(v);\n while(!queue.isEmpty()){\n int temp = queue.poll();\n isVisited[temp]=true;\n for(int i = 1; i<adj[temp].length;i++){\n if(isVisited[i]==false && adj[temp][i]==1){\n queue.add(i);\n isVisited[i]=true;\n maxContamination++;\n }\n }\n }\n }", "public int outDegree(N v) {\n return getOutEdges(v).size();\n }", "private void validateVertex(int v) {\r\n\t if (v < 0 || v >= V)\r\n\t throw new IndexOutOfBoundsException(\"vertex \" + v + \" is not between 0 and \" + (V-1));\r\n\t }", "int getShortestDistance(V vertex);", "private void validate(int v) {\r\n if (v < 0 || v >= V)\r\n throw new IllegalArgumentException(\r\n \"vertex \" + v + \" is not between 0 and \" + (V - 1));\r\n }", "public int getNextUnvisitedNeighbor (int v){\n for (int j=0; j<nVerts; j++) {\n if (adjMat[v][j] == 1 && vertextList[j].wasVisited == false) \n return j\n return -1; // none found\n }\n }", "@Override\r\n\tprotected void collectDisappearingPotential(V v) {\r\n\t\tif (graph.outDegree(v) == 0) {\r\n\t\t\tif (isDisconnectedGraphOK()) {\r\n\t\t\t\tif (v instanceof TopicVertex) {\r\n\t\t\t\t\tpr_disappearing_potential += getCurrentValue(v);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// not necessary for hits-hub\r\n\t\t\t\t\t// disappearing_potential.hub += getCurrentValue(v);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Outdegree of \" + v\r\n\t\t\t\t\t\t+ \" must be > 0\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t// not necessary for hits-hub\r\n\t\t// if (graph.inDegree(v) == 0) {\r\n\t\t// if (isDisconnectedGraphOK()) {\r\n\t\t// if (!(v instanceof TopicReferenceVertex)) {\r\n\t\t// disappearing_potential.authority += getCurrentValue(v);\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// throw new IllegalArgumentException(\"Indegree of \" + v\r\n\t\t// + \" must be > 0\");\r\n\t\t// }\r\n\t\t// }\r\n\t}", "private void validate(int v, int V) {\n\t if (v < 0 || v >= V)\n\t throw new IndexOutOfBoundsException(\"vertex \" + v + \" is not between 0 and \" + (V-1));\n\t }", "public int length(final int v, final int w) {\n\n validateVertex(v);\n validateVertex(w);\n\n final BreadthFirstDirectedPaths bfdvObj = new BreadthFirstDirectedPaths(digraphObj, v);\n final BreadthFirstDirectedPaths bfdwObj = new BreadthFirstDirectedPaths(digraphObj, w);\n\n int infinity = Integer.MAX_VALUE;\n \n for (int vertex = 0; vertex < digraphObj.V(); vertex++) {\n if (bfdvObj.hasPathTo(vertex) && bfdwObj.hasPathTo(vertex)) {\n final int dist = bfdvObj.distTo(vertex) + bfdwObj.distTo(vertex);\n if (dist <= infinity) {\n infinity = dist;\n }\n }\n }\n\n return (infinity == Integer.MAX_VALUE) ? -1 : infinity;\n }", "public int length(int v, int w) {\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i) && bfsV.distTo(i) + bfsW.distTo(i) < min) {\n min = bfsV.distTo(i) + bfsW.distTo(i);\n }\n }\n return min == Integer.MAX_VALUE ? -1 : min;\n }", "public int length(int v, int w) {\n\t\tBreadthFirstDirectedPaths bfsv = new BreadthFirstDirectedPaths(G, v);\n\t\tBreadthFirstDirectedPaths bfsw = new BreadthFirstDirectedPaths(G, w);\n\t\tint dv, dw, dsap = INFINITY;\n\t\tfor(int vertex = 0; vertex < G.V(); vertex++) {\n\t\t\tdv = bfsv.distTo(vertex);\n\t\t\tdw = bfsw.distTo(vertex);\n\t\t\tif (dv != INFINITY && dw != INFINITY && (dv + dw < dsap)) {\n\t\t\t\tdsap = dv + dw;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn (dsap == INFINITY) ? -1 : dsap;\n\t}", "public int length(int v, int w) throws java.lang.NullPointerException, java.lang.IndexOutOfBoundsException \n\t {\n\t\t if(null==mGraph) throw new java.lang.NullPointerException(\"Null graph in SAP\");\n\t\t if ( (v<0 || v >= mGraph.V()) || (w<0 || w >= mGraph.V()) ) throw new java.lang.IndexOutOfBoundsException(\"index out of band\");\n\t\t \n\t\t Bag<Integer> vBag = new Bag<Integer>();\n\t\t Bag<Integer> wBag = new Bag<Integer>();\n\t\t vBag.add(v);\n\t\t wBag.add(w);\n\t\t return getAncestors(vBag,wBag).mDistance;\n\t }", "public int inDegree(N v) {\n return getInEdges(v).size();\n }", "public double distTo(int v){\n\t\tvalidateVertex(v);\n\t\treturn distTo[v];\n\t}", "private void validate(int v) {\n int upperBound = G.V() - 1;\n if (v < 0 || v > upperBound) {\n String errMsg = String.format(\"Need vertex v; 0 <= v <= %d; got %d\",\n upperBound, v);\n throw new IndexOutOfBoundsException(errMsg);\n }\n }", "public int length(int v, int w) {\n if (v < 0 || v >= digraph.V() || w < 0 || w >= digraph.V())\n throw new IllegalArgumentException(\"Null argument\");\n int candidate = Integer.MAX_VALUE;\n ancestor = Integer.MAX_VALUE;\n bfsV = new BreadthFirstDirectedPathsFast(digraph, v);\n bfsW = new BreadthFirstDirectedPathsFast(digraph, w);\n for (int i = 0; i < digraph.V(); ++i) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n int distV = bfsV.distTo(i);\n int distW = bfsW.distTo(i);\n if (distV + distW < candidate) {\n candidate = distV + distW;\n ancestor = i;\n }\n }\n }\n return candidate == Integer.MAX_VALUE ? -1 : candidate;\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n int min = Integer.MAX_VALUE;\n for (int i = 0; i < digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i) && bfsV.distTo(i) + bfsW.distTo(i) < min) {\n min = bfsV.distTo(i) + bfsW.distTo(i);\n }\n }\n return min == Integer.MAX_VALUE ? -1 : min;\n }", "public Edge getResidualEdge () {\r\n return new Edge(from,to,(capacity - flow));\r\n }", "public int length(int v, int w) {\n\n if (v < 0 || v >= dg.V() || w < 0 || w >= dg.V())\n throw new IllegalArgumentException(\"vertex is not between 0 and \" + (dg.V() - 1));\n\n// ancestor(v,w);\n\n // use bfs to find the path and the shortest distance from v to every vertices in the graph\n // use two arrays, one record the last vertex, edgeTo[]. Another record the distance, distTo[].\n BreadthFirstDirectedPaths bfs1 = new BreadthFirstDirectedPaths(dg, v);\n BreadthFirstDirectedPaths bfs2 = new BreadthFirstDirectedPaths(dg, w);\n\n int ancestor = ancestor(v, w);\n\n if (ancestor == -1) {\n return -1;\n } else {\n return bfs1.distTo(ancestor) + bfs2.distTo(ancestor);\n }\n\n }", "public int flow(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.flow(e);\n\t\t}\n\t\treturn 0;\n\t}", "public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }", "public int degreeOf(V vertex);", "public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }", "public int other(int vertex) {\n if (vertex == v) return w;\n else if (vertex == w) return v;\n else throw new IllegalArgumentException(\"Illegal endpoint\");\n }", "public V removeVertex(V v);", "public void EliminarVertice(int v) {\n\t\tNodoGrafo aux = origen;\n\t\tif (origen.nodo == v) \n\t\t\torigen = origen.sigNodo;\t\t\t\n\t\twhile (aux != null){\n\t\t\t// remueve de aux todas las aristas hacia v\n\t\t\tthis.EliminarAristaNodo(aux, v);\n\t\t\tif (aux.sigNodo!= null && aux.sigNodo.nodo == v) {\n\t\t\t\t// Si el siguiente nodo de aux es v , lo elimina\n\t\t\t\taux.sigNodo = aux.sigNodo.sigNodo;\n\t\t\t}\n\t\t\taux = aux.sigNodo;\n\t\t}\t\t\n\t}", "void DFS(int v) {\n\t\t\tboolean visited[] = new boolean[number_of_vertices];\n\t\t\t\n\t\t\t//in case that the vertex are not connected, I need to make DFS for all\n\t\t\t//available vertex and checking before if they are not visited\n\t\t\tfor(int i = 0 ; i < number_of_vertices; i++) {\n\t\t\t\tif(visited[i] == false)\n\t\t\t\t\tDFSUtil(v, visited);\n\t\t\t}\n\t\t}", "@Override\r\n\tprotected double update(V v) {\r\n\t\tcollectDisappearingPotential(v);\r\n\r\n\t\tint incident_count = 0;\r\n\t\tdouble v_input = 0;\r\n\t\tdouble v_auth = 0;\r\n\t\tdouble v_hub = 0;\r\n\t\tif (v instanceof TopicCategoryVertex) {\r\n\t\t\tfor (E e : graph.getInEdges(v)) {\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tv_auth += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (alpha > 0) {\r\n\t\t\t\tv_auth = hitsCoeff * v_auth * (1 - alpha) + getVertexPrior(v)\r\n\t\t\t\t\t\t* alpha;\r\n\t\t\t}\r\n\t\t\tsetOutputValue(v, v_auth);\r\n\t\t\treturn Math.abs(getCurrentValue(v) - v_auth);\r\n\t\t} else {\r\n\t\t\tfor (E e : graph.getInEdges(v)) {\r\n\t\t\t\t// For hypergraphs, this divides the potential coming from w\r\n\t\t\t\t// by the number of vertices in the connecting edge e.\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tv_input += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (E e : graph.getOutEdges(v)) {\r\n\t\t\t\tincident_count = getAdjustedIncidentCount(e);\r\n\t\t\t\tfor (V w : graph.getIncidentVertices(e)) {\r\n\t\t\t\t\tif (!w.equals(v) || hyperedges_are_self_loops)\r\n\t\t\t\t\t\tif (w instanceof TopicCategoryVertex)\r\n\t\t\t\t\t\t\tv_hub += (getCurrentValue(w)\r\n\t\t\t\t\t\t\t\t\t* getEdgeWeight(w, e).doubleValue() / incident_count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdouble new_value = hitsCoeff * v_hub + (1 - hitsCoeff) * v_input;\r\n\t\t\tif (alpha > 0) {\r\n\t\t\t\tnew_value = new_value * alpha + getVertexPrior(v) * (1 - alpha);\r\n\t\t\t}\r\n\t\t\tsetOutputValue(v, new_value);\r\n\t\t\treturn Math.abs(getCurrentValue(v) - new_value);\r\n\t\t}\r\n\t}", "public int getDegree(V vertex);", "int getDegree(V v);", "Color generateColor(Vertex v) {\n if (v.x == width - 1 && v.y == height - 1) {\n return Color.magenta;\n }\n else if (v.path) {\n return Color.blue;\n }\n else if (v.x == 0 && v.y == 0) {\n return Color.green;\n }\n else if (v.visited) {\n return Color.cyan;\n }\n else {\n return Color.gray;\n }\n }", "@Override\n\tpublic double calcMinCostFlow(Graph graph) {\n\t\treturn 0;\n\t}", "public Collection<V> getOtherVertices(V v);", "public int getNext(int v)\r\n {\r\n for(int j=vertexList[v].possibleVisit+1; j<nVerts; j++)\r\n if(adjMat[v][j]==1 && vertexList[j].wasVisited==false)\r\n return j;\r\n return -1;\r\n }", "public int getColor(Vertex v);", "public Iterable<FlowEdge> adj(int v) {\n return adj[v];\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n\t\tif (v == null || w == null)\n\t\t\tthrow new IllegalArgumentException();\n\t\tBreadthFirstDirectedPaths bfsv = new BreadthFirstDirectedPaths(G, v);\n\t\tBreadthFirstDirectedPaths bfsw = new BreadthFirstDirectedPaths(G, w);\n\t\tint dv, dw, dsap = INFINITY;\n\t\tfor(int vertex = 0; vertex < G.V(); vertex++) {\n\t\t\tdv = bfsv.distTo(vertex);\n\t\t\tdw = bfsw.distTo(vertex);\n\t\t\tif (dv != INFINITY && dw != INFINITY && (dv + dw < dsap)) {\n\t\t\t\tdsap = dv + dw;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn (dsap == INFINITY) ? -1 : dsap;\n\t}", "private static double fds_h(Vec v) { return 2*ASTMad.mad(new Frame(v), null, 1.4826)*Math.pow(v.length(),-1./3.); }", "private NodoGrafo Vert2Nodo(int v) {\n\t\tNodoGrafo aux = origen;\n\t\twhile (aux != null && aux.nodo != v)\n\t\t\taux = aux.sigNodo;\t\t\n\t\treturn aux;\n\t}", "void contractEdges(DynamicGraph G, Integer u, Integer v ){\n G.removeEdges(u, v);\n // for all vertices w adj to v\n for (Integer w: G.adjacent(v)){\n // addEdge(u, w);\n G.addEdge(u, w);\n }\n // removeVertex(v); decrement V.\n G.removeVertex(v);\n /*System.out.println(\"After contracting edge u: \"+ u +\" v: \"+ v);\n System.out.println(G);*/\n }", "public int getvertex() {\n\t\treturn this.v;\n\t}", "public Iterable<DirectedEdge> pathTo(int v){\n\t\tvalidateVertex(v);\n\t\tif(!hasPathTo(v)) return null;\n\n\t\tLinkedStack<DirectedEdge> stack=new LinkedStack<>();\n\t\twhile(edgeTo[v]!=null){\n\t\t\tstack.push(edgeTo[v]);\n\t\t\tv=edgeTo[v].from();\n\t\t}\n\t\treturn stack;\n\t}", "public Set<V> findCyclesContainingVertex(V v)\n {\n Set<V> set = new LinkedHashSet<>();\n execute(set, v);\n\n return set;\n }", "public Arestas primeiroListaAdj (int v) {\n this.pos[v] = -1; return this.proxAdj (v);\n }", "boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}", "public int length(int v, int w){\n\t BreadthFirstDirectedPaths BFSv =new BreadthFirstDirectedPaths(D,v);\n\t BreadthFirstDirectedPaths BFSw =new BreadthFirstDirectedPaths(D,w);\n\t \n\t int distance = Integer.MAX_VALUE;\n\t \n\t for (int vertex = 0 ; vertex < D.V();vertex++)\n\t\t if ((BFSv.hasPathTo(vertex))\n\t\t\t\t &&(BFSw.hasPathTo(vertex))\n\t\t\t\t &&(BFSv.distTo(vertex)+BFSw.distTo(vertex))<distance)\n\t\t {\n\t\t\t distance = BFSv.distTo(vertex)+BFSw.distTo(vertex);\n\t\t }\n\t if (distance != Integer.MAX_VALUE)\n\t\t return distance;\n\t else\n\t\t return -1;\n }", "private void traverseHelper(Graph<VLabel, ELabel>.Vertex v) {\n PriorityQueue<Graph<VLabel, ELabel>.Vertex> fringe =\n new PriorityQueue<Graph<VLabel,\n ELabel>.Vertex>(_graph.vertexSize(), _comparator);\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n visit(curV);\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n if (!_marked.contains(e.getV(curV))) {\n preVisit(e, curV);\n fringe.add(e.getV(curV));\n }\n }\n }\n } catch (StopException e) {\n _finalVertex = curV;\n return;\n }\n }\n }", "void query(int u, int v) {\n int lca = lca2(u, v, spar, dep);\n// out.println(query_up(u, lca) + \" dv\");\n// out.println(query_up(v, lca) + \" ds\");\n int ans = query_up(u, lca) + query_up(v, lca); // One part of path\n out.println(ans);\n// if (temp > ans) ans = temp; // take the maximum of both paths\n// printf(\"%d\\n\", ans);\n }", "public void out_vertex(Site v) {\r\n\t\tif (triangulate == 0 & plot == 0 & debug == 0) {\r\n\t\t\tSystem.err.printf(\"v %f %f\\n\", v.coord.x, v.coord.y);\r\n\t\t}\r\n\r\n\t\tif (debug == 1) {\r\n\t\t\tSystem.err.printf(\"vertex(%d) at %f %f\\n\", v.sitenbr, v.coord.x,\r\n\t\t\t\t\tv.coord.y);\r\n\t\t}\r\n\t}", "public int length(int v, int w) {\n if (!isValid(v, w)) {\n throw new IndexOutOfBoundsException();\n }\n\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n\n int shortestPath = -1;\n Deque<Integer> ancestors = new ArrayDeque<>();\n\n for (int i = 0; i < this.digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n ancestors.push(i);\n }\n }\n\n for (Integer integer : ancestors) {\n int path = bfsV.distTo(integer) + bfsW.distTo(integer);\n if (shortestPath == -1 || path < shortestPath) {\n shortestPath = path;\n }\n }\n return shortestPath;\n }", "public int numVertices() { return numV; }", "public Collection<Vertex> adjacentVertices(Vertex v) {\n Vertex parameterVertex = new Vertex(v.getLabel());\n if(!myGraph.containsKey(parameterVertex)){\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n\n //create a copy of the passed in vertex to restrict any reference\n //to interals of this class\n Collection<Vertex> adjVertices = new ArrayList<Vertex>();\n\n Iterator<Edge> edges = myGraph.get(parameterVertex).iterator();\n while(edges.hasNext()) {\n adjVertices.add(edges.next().getDestination());\n }\n return adjVertices;\n }", "private void breadthHelper(Graph<VLabel, ELabel>.Vertex v) {\n LinkedList<Graph<VLabel, ELabel>.Vertex> fringe =\n new LinkedList<Graph<VLabel, ELabel>.Vertex>();\n fringe.add(v);\n while (fringe.size() > 0) {\n Graph<VLabel, ELabel>.Vertex curV = fringe.poll();\n try {\n if (!_marked.contains(curV)) {\n _marked.add(curV);\n try {\n visit(curV);\n } catch (RejectException rExc) {\n fringe.add(curV);\n continue;\n }\n for (Graph<VLabel, ELabel>.Edge e: _graph.outEdges(curV)) {\n Graph<VLabel, ELabel>.Vertex child = e.getV(curV);\n if (!_marked.contains(child)) {\n try {\n preVisit(e, curV);\n fringe.add(child);\n } catch (RejectException rExc) {\n int unused = 0;\n }\n }\n }\n fringe.add(curV);\n } else {\n postVisit(curV);\n while (fringe.remove(curV)) {\n continue;\n }\n }\n } catch (StopException sExc) {\n _finalVertex = curV;\n return;\n }\n }\n }", "private void relax(Edge e, int v) {\r\n int w = e.other(v);\r\n if (distTo[w] > distTo[v] + e.weight()) {\r\n distTo[w] = distTo[v] + e.weight();\r\n edgeTo[w] = e;\r\n if(nWays[v]>0)\r\n \tnWays[w]= nWays[v];\t\t\t//posibles caminos desde origen...\r\n else\r\n \tnWays[w]=1;\r\n if (pq.contains(w)) pq.decreaseKey(w, distTo[w]);\r\n else pq.insert(w, distTo[w]);\r\n }else if(distTo[w] == distTo[v] + e.weight()){\r\n \tnWays[w] += nWays[v];\r\n \t/* if(nWays[v]>1)\r\n \tnWays[w]=nWays[w]*nWays[v];\r\n \t else\r\n \t\t nWays[w]++;*/\r\n }\r\n }", "@Override\r\n\tpublic Iterable<Integer> pathTo(int v) {\r\n\t\tif (!hasPathTo(v)) return null;\r\n\r\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\r\n\t\twhile(v != -1) {\r\n\t\t\tlist.add(v);\r\n\t\t\tv = edgeTo[v];\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public int length(int v, int w) {\r\n if (v < 0 || w < 0 || v >= G.V() || w >= G.V())\r\n throw new IndexOutOfBoundsException();\r\n BreadthFirstDirectedPaths bfdp1 = new BreadthFirstDirectedPaths(G, v);\r\n BreadthFirstDirectedPaths bfdp2 = new BreadthFirstDirectedPaths(G, w);\r\n int shortestDist = Integer.MAX_VALUE;\r\n for (int i = 0; i < G.V(); i++) {\r\n if (bfdp1.hasPathTo(i) && bfdp2.hasPathTo(i)) {\r\n shortestDist = (shortestDist <= bfdp1.distTo(i) + bfdp2.distTo(i)) ? shortestDist : bfdp1.distTo(i) + bfdp2.distTo(i);\r\n }\r\n }\r\n return (shortestDist == Integer.MAX_VALUE) ? -1: shortestDist;\r\n }", "void DFS(int v) {\n // Mark all the vertices as not visited(set as\n // false by default in java)\n boolean visited[] = new boolean[V];\n\n // Call the recursive helper function to print DFS traversal\n DFSUtil(v, visited);\n }", "private void propagate(int v) {\n\t\tNode node = heap[v];\n\t\tif (node.pendingVal != null) {\n\t\t\tchange(heap[2 * v], node.pendingVal);\n\t\t\tchange(heap[2 * v + 1], node.pendingVal);\n\t\t\tnode.pendingVal = null; // unset the pending propagation value\n\t\t}\n\t}", "public AbstractWeightedGraph<V,E>.FlowGraph maximumFlow(V source, V sink);", "public static void dfs(int a, Vertex [] v){\n assert !v[a].visited;\n\n v[a].visited = true;\n\n // traverse over all the outgoing edges\n\n for(int b : v[a].edges){\n v[b].d = Math.max(v[b].d , v[a].d + 1);\n v[b].in --;\n\n if(v[b].in == 0 && !v[b].visited){\n dfs(b,v);\n }\n }\n\n\n }", "public double getEdgeFlow() {\n\t\treturn this.flow;\r\n\t}", "List<V> getAdjacentVertexList(V v);", "private void modifyFringe(int v, int w) {\n\t\tgetEdge(v, w).setSelected(true);\n\t\tgetEdge(getVertex(w).getParent(), w).setSelected(false);\n\t\tdouble cost = newCost(v, w);\n\t\tGreedyVertex vertex = getVertex(w);\n\t\tvertex.setParent(v);\n\t\tvertex.setCost(cost);\n\t\tp.promote(vertex);\n\t}", "public Path dfs(Graph G, int v) {\r\n Path result = new Path();\r\n \tcount++;\r\n marked[v] = true;\r\n Iterator<Integer> it = G.getAdjList(v).iterator();\r\n while(it.hasNext()){\r\n \tint w = it.next();\r\n if (!marked[w]) {\r\n \t\t result.addPath(new Edge(v,w));\r\n result.append(dfs(G, w));\r\n \t}\r\n \t//System.out.print(v + \" \"+ w + \"\\n\");\r\n }\r\n return result;\r\n }", "private void Visitar(Vertice v, int p) {\n\t\t\n\t\tv.setVisited(true);\n\t\tv.setPredecessor(p);\n\t\t\n\t\tLinkedList<ListaAdjacencia> L = v.getAdjList();\n\t\t\n\t\tfor (ListaAdjacencia node : L) {\n\t\t\tint n = node.getverticeNumero();\n\t\t\tif (!vertices[n].getVisited()) {\n\t\t\t\tVisitar(vertices[n], v.getIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int length(int v, int w){\n shortestPath(v,w);\n return minPath;\n }", "public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }", "private Double distanceToLine(Vector v, PointD p)\r\n\t{\r\n\t\tPointD nearestPoint = getNearestPointOnLine(v,p);\t\t\r\n\t\t\r\n\t\tdouble x1 = nearestPoint.getX();\r\n\t\tdouble y1 = nearestPoint.getY();\r\n\t\t\r\n\t\tdouble t;\r\n\t\tif(v.getX()>v.getY())//if one component is close to zero, use other one\r\n\t\t\tt = (x1 - v.getTail().getX()) / v.getX();\r\n\t\telse\r\n\t\t\tt = (y1 - v.getTail().getY()) / v.getY();\r\n\t\t\r\n\t\tif(t < 0 || t > 1)//then calculated point is not in line segment\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn Math.sqrt((p.getX() - x1)*(p.getX() - x1) + (p.getY() - y1)*(p.getY() - y1));\r\n\t}", "private double calculaz(double v) { //funcion de densidad de probabilidad normal\n double N = Math.exp(-Math.pow(v, 2) / 2) / Math.sqrt(2 * Math.PI);\n return N;\n }", "private void extrapolation(HashMap<Long,Double> extraV){\n double g = 0;\n double h = 0;\n double newV = 0;\n for (long i=0; i<n; i++) {\n g = (oldv.get(i)-extraV.get(i));\n g = g*g;//compute g\n h = v.get(i) - 2*oldv.get(i) + extraV.get(i);\n newV = v.get(i) - g/h;\n if(g >= 1e-8 && h >= 1e-8){\n v.put(i, newV);\n }\n }\n }", "private int[] shortest(int w, int v) {\n int[] res = new int[2];\n DeluxeBFS wBFS = new DeluxeBFS(G, w);\n DeluxeBFS vBFS = new DeluxeBFS(G, v);\n boolean[] wMarked = wBFS.getMarked();\n boolean[] vMarked = vBFS.getMarked();\n int minDis = Integer.MAX_VALUE;\n int anc = Integer.MAX_VALUE;\n \n for (int i = 0; i < wMarked.length; i++) {\n if (wMarked[i] && vMarked[i]) {\n int dis = wBFS.distTo(i) + vBFS.distTo(i);\n if (dis < minDis) {\n minDis = dis;\n anc = i;\n }\n }\n }\n if (minDis == Integer.MAX_VALUE) {\n res[0] = -1;\n res[1] = -1;\n return res;\n } else {\n res[0] = minDis;\n res[1] = anc;\n return res;\n }\n }", "public void dfs(int v) {\n marked[v] = true;\n onStack[v] = true;\n for (DirectedEdge e : G.incident(v)) {\n int w = e.to();\n if (hasCycle())\n return;\n else if (!marked[w]) {\n parent[w] = v;\n dfs(w);\n } else if (onStack[w]) {\n cycle = new Stack<>();\n cycle.push(w);\n for (int u = v; u != w; u = parent[u])\n cycle.push(u);\n cycle.push(w);\n return;\n }\n }\n onStack[v] = false;\n reversePost.push(v);\n }", "public E getParentEdge(V vertex);", "private static BigInteger connectedGraphs(\n final int v, final int e) {\n if (v == 0) {\n return ZERO;\n }\n if (v == 1) {\n // Fast exit #1: single-vertex\n return e == 0 ? ONE : ZERO;\n }\n final int allE = v * (v - 1) >> 1;\n if (e == allE) {\n // Fast exit #2: complete graph (the only result)\n return ONE;\n }\n final int key = v << 16 | e;\n if (CONN_GRAPHS_CACHE.containsKey(key)) {\n return CONN_GRAPHS_CACHE.get(key);\n }\n BigInteger result;\n if (e == v - 1) {\n // Fast exit #3: trees -> apply Cayley's formula\n result = BigInteger.valueOf(v).pow(v - 2);\n } else if (e > allE - (v - 1)) {\n // Fast exit #4: e > edges required to build a (v-1)-vertex\n // complete graph -> will definitely form connected graphs\n // in all cases, so just calculate allGraphs()\n result = allGraphs(v, e);\n } else {\n /*\n * In all other cases, we'll have to remove\n * partially-connected graphs from all graphs.\n *\n * We can define a partially-connected graph as a graph\n * with 2 sub-graphs A and B with no edges between them.\n * In addition, we require one of the sub-graphs (say, A)\n * to hold the following properties:\n * 1. A must be connected: this implies that the number\n * of possible patterns for A could be counted\n * by calling connectedGraphs().\n * 2. A must contain at least one fixed vertex:\n * this property - combined with 1. -\n * implies that A would not be over-counted.\n *\n * Under the definitions above, the number of\n * partially-connected graphs to be removed will be:\n *\n * (Combinations of vertices to be added from B to A) *\n * (number of possible A's, by connectedGraphs()) *\n * (number of possible B's, by allGraphs())\n * added up iteratively through v - 1 vertices\n * (one must be fixed in A) and all possible distributions\n * of the e edges through A and B\n */\n result = allGraphs(v, e);\n for (int vA = 1; vA < v; vA++) {\n // Combinations of vertices to be added from B to A\n final BigInteger aComb = nChooseR(v - 1, vA - 1);\n final int allEA = vA * (vA - 1) >> 1;\n // Maximum number of edges which could be added to A\n final int maxEA = allEA < e ? allEA : e;\n for (int eA = vA - 1; eA < maxEA + 1; eA++) {\n result = result.subtract(aComb\n // Number of possible A's\n .multiply(connectedGraphs(vA, eA))\n // Number of possible B's\n .multiply(allGraphs(v - vA, e - eA)));\n }\n }\n }\n CONN_GRAPHS_CACHE.put(key, result);\n return result;\n }", "public int ancestor(final int v, final int w) {\n\n validateVertex(v);\n validateVertex(w);\n\n if (v == w) {\n return v;\n }\n\n final BreadthFirstDirectedPaths bfdvObj = new BreadthFirstDirectedPaths(digraphObj, v);\n final BreadthFirstDirectedPaths bfdwObj = new BreadthFirstDirectedPaths(digraphObj, w);\n \n int infinity = Integer.MAX_VALUE;\n int ances = -1;\n\n for (int vertex = 0; vertex < digraphObj.V(); vertex++) {\n if (bfdvObj.hasPathTo(vertex) && bfdwObj.hasPathTo(vertex)) {\n final int dist = bfdvObj.distTo(vertex) + bfdwObj.distTo(vertex);\n if (dist <= infinity) {\n infinity = dist;\n ances = vertex;\n }\n }\n }\n\n return ances;\n }", "void visit(Graph.Vertex u, Graph.Vertex v) {\n\t\tDFSVertex bv = getVertex(v);\n\t\tbv.seen = true;\n\t\tbv.parent = u;\n\t\tbv.distance = distance(u) + 1;\n\t}", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n if (!isValid(v, w)) {\n throw new IndexOutOfBoundsException();\n }\n\n BreadthFirstDirectedPaths bfsV = new BreadthFirstDirectedPaths(digraph, v);\n BreadthFirstDirectedPaths bfsW = new BreadthFirstDirectedPaths(digraph, w);\n\n int shortestPath = -1;\n Deque<Integer> ancestors = new ArrayDeque<>();\n\n for (int i = 0; i < this.digraph.V(); i++) {\n if (bfsV.hasPathTo(i) && bfsW.hasPathTo(i)) {\n ancestors.push(i);\n }\n }\n\n for (Integer integer : ancestors) {\n int path = bfsV.distTo(integer) + bfsW.distTo(integer);\n if (shortestPath == -1 || path < shortestPath) {\n shortestPath = path;\n }\n }\n return shortestPath;\n }", "public int length(int v, int w) {\n BreadthFirstDirectedPaths bfdpv = new BreadthFirstDirectedPaths(g, v);\n BreadthFirstDirectedPaths bfdpw = new BreadthFirstDirectedPaths(g, w);\n int anc = -1;\n int minLen = Integer.MAX_VALUE;\n for (int x = 0; x < g.V(); x++) {\n if (bfdpv.hasPathTo(x) && bfdpw.hasPathTo(x)) {\n int len = bfdpv.distTo(x) + bfdpw.distTo(x);\n if (len < minLen) {\n minLen = len;\n anc = x;\n }\n }\n }\n if (anc == -1) minLen = -1;\n return minLen;\n }", "public FlowNetwork(int V) {\n this.V = V-1;\n adj = (List<FlowEdge>[]) new List[V];\n for (int v=0; v < V; v++)\n adj[v] = new ArrayList<>();\n }", "private Paths sap(int v, int w) {\n validate(v);\n validate(w);\n BreadthFirstDirectedPaths fromV = new BreadthFirstDirectedPaths(this.G, v);\n BreadthFirstDirectedPaths fromW = new BreadthFirstDirectedPaths(this.G, w);\n return processPaths(fromV, fromW);\n }", "public int length(Iterable<Integer> v, Iterable<Integer> w) {\n\n validateIterableVertices(v);\n validateIterableVertices(w);\n // use bfs to find the path and the shortest distance from v to every vertices in the graph\n // use two arrays, one record the last vertex, edgeTo[]. Another record the distance, distTo[].\n BreadthFirstDirectedPaths bfs1 = new BreadthFirstDirectedPaths(dg, v);\n BreadthFirstDirectedPaths bfs2 = new BreadthFirstDirectedPaths(dg, w);\n\n int ancestor = ancestor(v, w);\n\n if (ancestor == -1) {\n return -1;\n } else {\n return bfs1.distTo(ancestor) + bfs2.distTo(ancestor);\n }\n\n }", "Vertex getOtherVertex(Vertex v) {\n\t\t\tif(v.equals(_one)) return _two;\n\t\t\telse if(v.equals(_two)) return _one;\n\t\t\telse return null;\n\t\t}", "public int succ(int v, int i) {\n\t\treturn graph[v][i];\n\t}", "public final boolean execute(final Vertex v) {\r\n\t\t\r\n\t\t\tEdge e = v.getEdge(src);\r\n\t\t\tweightSum += e.getWeight();\r\n\t\t\r\n\t\t\treturn true;\r\n\t\t}", "public int length(int v, int w) {\n inBound(v);\n inBound(w);\n\n Queue<ColoredNode> Q = new LinkedList<>();\n lengths[v] = lengths[w] = 0;\n colored[v] = color++;\n Q.add(new ColoredNode(colored[v], v));\n\n if (color - 1 == colored[w]) {\n ancestor = v;\n return 0;\n }\n\n colored[w] = color++;\n Q.add(new ColoredNode(colored[w], w));\n\n return BFS(Q);\n }", "Iterable<DirectedEdge> pathTo(int v)\n\t{\n\t\tStack<DirectedEdge> path=new Stack<>();\n\t\tfor(DirectedEdge e=edgeTo[v]; e!=null; e=edgeTo[e.from()])\n\t\t{\n\t\t\tpath.push(e);\n\t\t}\n\t\treturn path;\n\t}", "public Iterable<Integer> pathTo(int v)\n {\n if (!hasPathTo(v)) return null;\n Stack<Integer> path = new Stack<Integer>();\n for (int x = v; x != s; x = edgeTo[x])\n path.push(x);\n path.push(s);\n return path;\n }", "double getWeight(V v, V w);", "public Arestas proxAdj (int v) {\n this.pos[v] ++;\n while ((this.pos[v] < this.numVertices) && \n (this.mat[v][this.pos[v]] == 0)) this.pos[v]++;\n if (this.pos[v] == this.numVertices) return null;\n else return new Arestas (v, this.pos[v], this.mat[v][this.pos[v]]);\n }", "private double f(double v, double s) {\n\t\treturn equation(v) - s;\r\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "float getVoltageStepIncrementOutOfPhase();", "public V getParent(V vertex);", "public int length(int v, int w) {\n return (distance == Integer.MAX_VALUE) ? -1 : distance;\n }" ]
[ "0.81833553", "0.8137413", "0.6472538", "0.62812835", "0.62068105", "0.6151983", "0.6125281", "0.61048317", "0.5921011", "0.59192944", "0.58672154", "0.5862589", "0.58622", "0.5800586", "0.5798421", "0.57399607", "0.57080144", "0.5671706", "0.56627846", "0.5655465", "0.5647749", "0.56412923", "0.5603316", "0.55502963", "0.55500305", "0.5519049", "0.55149305", "0.54861045", "0.548436", "0.5479272", "0.5475507", "0.5441806", "0.5440598", "0.54173297", "0.54164696", "0.5409763", "0.539263", "0.53921974", "0.5382688", "0.5376062", "0.53711826", "0.5365481", "0.53653604", "0.53463244", "0.53357893", "0.5331175", "0.5329669", "0.5324886", "0.53183633", "0.53014773", "0.5291029", "0.52903944", "0.52858615", "0.5282002", "0.5277958", "0.5260825", "0.52580744", "0.52515304", "0.52494705", "0.52412045", "0.5240609", "0.52326274", "0.5231484", "0.52229166", "0.5219853", "0.5213535", "0.52091223", "0.5208228", "0.52042246", "0.51923335", "0.5187409", "0.5184448", "0.5171794", "0.51671124", "0.51630944", "0.51553047", "0.51499236", "0.5149835", "0.5146781", "0.51417965", "0.5122785", "0.5121313", "0.51198006", "0.5119248", "0.51172215", "0.5108962", "0.51016647", "0.50993407", "0.5099188", "0.50751233", "0.50693095", "0.50674194", "0.5064965", "0.5064013", "0.50566506", "0.5056513", "0.5053895", "0.50503063", "0.50480455", "0.504578", "0.50427526" ]
0.0
-1
Rolls five dice and averages the results.
int midFavoringRandom(int upperBound) { int runningTotal = 0; int rolls = 3; for (int i = 0; i < rolls; i++) { int result = random.nextInt(upperBound); runningTotal += result; } int mean = (int) Math.round((double) runningTotal / rolls); return mean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int diceRoll() {\n Random roller = new Random();//Create a random number generator\r\n return roller.nextInt(6) + 1;//Generate a number between 0-5 and add 1 to it\r\n }", "public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}", "public void Roll() // Roll() method\n {\n // Roll the dice by setting each of the dice to be\n // \ta random number between 1 and 6.\n die1Rand = (int)(Math.random()*6) + 1;\n die2Rand = (int)(Math.random()*6) + 1;\n }", "public static int rollDice(){\n return (int)(Math.random()*6) + 1;\n // Math.random returns a double number >=0.0 and <1.0\n }", "int RollDice ()\n {\n\tint roll = (int) (Math.random () * 6) + 1;\n\treturn roll;\n }", "public static int rollDice()\n\t{\n\t\tint roll = (int)(Math.random()*6)+1;\n\t\t\n\t\treturn roll;\n\n\t}", "public int rollDice() {\n\t\td1 = (int)rand.nextInt(6)+1;\n\t\td2 = (int)rand.nextInt(6)+1;\n\t\treturn d1+d2;\n\t}", "public static void roll()\n {\n Random no = new Random();\n Integer dice = no.nextInt(7);\n System.out.println(dice);\n }", "public int roll() {\n if(!debug)\n this.result = random.nextInt(6) + 1;\n else{\n scanner = new Scanner(showInputDialog(\"Enter dice value (1-6):\"));\n try{int res = scanner.nextInt()%7;\n this.result = res!=0? res:6;\n }\n catch(NoSuchElementException ne){this.result=6;} \n }\n return this.result;\n }", "public int roll_the_dice() {\n Random r = new Random();\n int number = r.nextInt(6) + 1;\n\n return number;\n }", "void rollDice();", "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }", "public void roll()\r\n\t{\r\n\t\tthis.value = rnd.nextInt(6) + 1;\r\n\t}", "public int rollDice();", "public int roll() {\n int result = ThreadLocalRandom.current().nextInt(SIDES+1) + 1;// standard 1-7\n if(result == 7){ //LoadedDie 6 occurs twice as often\n return 6;\n } else{\n return result;\n }\n }", "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "public static int diceRoll(){\n Random rd = new Random();\n int dice1, dice2;\n\n dice1 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 1\n dice2 = rd.nextInt(6) + 1; //assigns random integer between 1 and 6 inclusive to dice 2\n\n System.out.println(\"You rolled \" + dice1 + \" + \" + dice2 + \" = \" + (dice1+dice2)); //print result\n\n return dice1 + dice2; //returns sum of dice rolls\n\n }", "public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }", "public int roll(int dices){\n int faces[] = new int[dices];\n int total = 0;\n Dice dice = new Dice();\n for(int i = 0; i < dices; i++){\n faces[i] = (dice.rand.nextInt(6) + 1);\n }\n for(int i = 0; i < faces.length-1; i++){\n if(faces[i] != faces[i+1]){\n this.isDouble = false;\n break;\n }\n else{\n this.isDouble = true;\n }\n }\n if(this.isDouble == true){\n this.twiceCounter++;\n }\n for(int i = 1; i < faces.length+1; i++){\n System.out.print(\"The \" + i + \". dice: \" + faces[i-1] + \" \");\n total += faces[i-1];\n }\n System.out.println(\" and the sum is \" + total);\n\n return total;\n }", "public int roll() {\n return random.nextInt(6) + 1;\n }", "@Override\r\n\tpublic int rollDice() {\n\t\treturn 0;\r\n\t}", "public boolean rollTheDice() {\n\t\tboolean result;\n\t\tint randomDiceRoll = (int)(Math.random() * 6) + 1;\n\t\tif(randomDiceRoll>=5) {\n\t\t\tresult=true;\n\t\t}\n\t\telse {\n\t\t\tresult=false;\n\t\t}\n\t\treturn result;\n\t}", "public void roll()\r\n\t{\r\n\t\tRandom rand = new Random();\r\n\r\n\t\trollNumber = rand.nextInt(numOfSides) + 1;\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] totals = new int[11];\r\n\t\tint dice;\r\n\t\tint diceTwo;\r\n\t\tint total;\r\n\r\n\t\t\r\n\r\n\t\tfor (int i = 0; i < 10000; i++) {\r\n\t\t\tdice = (int) (Math.random() * 6) + 1;\r\n\t\t\tdiceTwo = (int) (Math.random() * 6) + 1;\r\n\t\t\ttotal = dice + diceTwo; \r\n\t\t\tif (total == 2) {\r\n\r\n\t\t\t\ttotals[0]++;\r\n\t\t\t}\r\n\r\n\t\t\telse if (total == 3) {\r\n\r\n\t\t\t\ttotals[1]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 4) {\r\n\r\n\t\t\t\ttotals[2]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 5) {\r\n\r\n\t\t\t\ttotals[3]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 6) {\r\n\r\n\t\t\t\ttotals[4]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 7) {\r\n\r\n\t\t\t\ttotals[5]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 8) {\r\n\r\n\t\t\t\ttotals[6]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 9) {\r\n\r\n\t\t\t\ttotals[7]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 10) {\r\n\r\n\t\t\t\ttotals[8]++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse if (total == 11) {\r\n\r\n\t\t\t\ttotals[9]++;\r\n\t\t\t}\r\n\t\t\telse if (total == 12) {\r\n\r\n\t\t\t\ttotals[10]++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Total - Number of Rolls\");\r\n\t\tSystem.out.println(\"2 \" + totals[0] );\r\n\t\tSystem.out.println(\"3 \" + totals[1] );\r\n\t\tSystem.out.println(\"4 \" + totals[2] );\r\n\t\tSystem.out.println(\"5 \" + totals[3] );\r\n\t\tSystem.out.println(\"6 \" + totals[4] );\r\n\t\tSystem.out.println(\"7 \" + totals[5] );\r\n\t\tSystem.out.println(\"8 \" + totals[6] );\r\n\t\tSystem.out.println(\"9 \" + totals[7] );\r\n\t\tSystem.out.println(\"10 \" + totals[8] );\r\n\t\tSystem.out.println(\"11 \" + totals[9] );\r\n\t\tSystem.out.println(\"12 \" + totals[10] );\r\n\t}", "public static int diceRoll() {\n\t\t\n\t\t//the outcome of the die is stored as an integer and returned\n\t\t\n\t\tint diceNumber = (int)((6 * (Math.random())) + 1);\n\t\treturn diceNumber;\n\t}", "public int roll3D6()\n {\n Random random1 = new Random();\n int r = random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n r += random1.nextInt(6) +1;\n return r;\n }", "public void rollStats() {\n\t\tRandom roll = new Random();\n\t\tint rolled;\n\t\tint sign;\n\t\t\n\t\t\n\t\trolled = roll.nextInt(4);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetMaxHealth(getMaxHealth() + rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t} else {\n\t\t\tsetMaxHealth(getMaxHealth() - rolled*(getDifficulty()+5/5));\n\t\t\tsetHealth(getMaxHealth());\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetAttack(getAttack() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetAttack(getAttack() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetDefense(getDefense() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetDefense(getDefense() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t\trolled = roll.nextInt(2);\n\t\tsign = roll.nextInt(2);\n\t\tif (sign == 0) {\n\t\t\tsetSpeed(getSpeed() + rolled*(getDifficulty()+5/5));\n\t\t} else {\n\t\t\tsetSpeed(getSpeed() - rolled*(getDifficulty()+5/5));\n\t\t}\n\t\t\n\t}", "public int rollDie() {\n\t\treturn (int) (Math.random()*6)+1;\n\t}", "public void rollDie(){\r\n\t\tthis.score = score + die.roll();\r\n\t}", "private int rollDie() {\r\n final SecureRandom random = new SecureRandom();\r\n return random.nextInt(6 - 1) + 1;\r\n }", "public ArrayList<Dice> rollAllDice()\n {\n ArrayList<Dice> array = getDiceArray();\n for(Dice dice : array)\n {\n if(dice.getReroll())\n {\n dice.rollDice();\n dice.setReroll(false, \"\"); //resets all reroll flags to false\n }\n }\n \n return array;\n }", "public int rollDice()\n{\n int die1, die2, sum; \n\n // pick random die values\n die1 = 1 + ( int ) ( Math.random() * 6 );\n die2 = 1 + ( int ) ( Math.random() * 6 );\n\n sum = die1 + die2; // sum die values\n\n // display results\n die1Field.setText( Integer.toString( die1 ) );\n die2Field.setText( Integer.toString( die2 ) );\n sumField.setText( Integer.toString( sum ) );\n\n return sum; // return sum of dice\n\n\n}", "public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}", "private void otherRolls() {\n\t\t// program tells that player should select dices to re-roll.\n\t\tdisplay.printMessage(\"Select the dice you wish to re-roll and click \"\n\t\t\t\t+ '\\\"' + \"Roll Again\" + '\\\"');\n\t\t// program will wait until player clicks \"roll again\" button.\n\t\tdisplay.waitForPlayerToSelectDice();\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tif (display.isDieSelected(i) == true) {\n\t\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\t\tdiceResults[i] = dice;\n\t\t\t}\n\t\t}\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "public void roll(){\n currentValue = rand.nextInt(6)+1;\n }", "public int rollDice(){\r\n\t\tString playerResponse;\r\n\t\tplayerResponse=JOptionPane.showInputDialog(name+\". \"+\"Type anything to roll\");\r\n\t\t//System.out.println(name+\"'s response: \"+playerResponse);\r\n\t\tdice1=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdice2=(int)(Math.random() * ((6 - 1) + 1)) + 1;\r\n\t\tdicetotal=dice1+dice2;\r\n\t\tnumTurns++;\r\n\t\treturn dicetotal;\r\n\t}", "public abstract int rollDice();", "private int diceRoll(int sides) {\n return (int) ((Math.random() * sides) + 1);\n }", "public int tossDice(){\n\t\tRandom r = new Random();\n\t\tdiceValue = r.nextInt(6)+1;\n\t\tdiceTossed = true;\n\t\treturn diceValue;\n\t}", "public void roll() {\n\t\tthis.currentValue = ThreadLocalRandom.current().nextInt(1, this.numSides + 1);\n\t}", "public void throwDice() {\n\n Random r = new Random();\n\n if (color == DiceColor.NEUTRAL) {\n this.value = 0;\n } else {\n this.value = 1 + r.nextInt(6);\n }\n\n }", "public static void main(String[] args) {\n CDice dice = new CDice();\n dice.init(1, 2, 3, 4, 5, 6);\n int random = dice.roll();\n System.out.println(\"dice roll side number: \"+random);\n }", "private void rollDice(){\n int rollNumber=rng.nextInt(6)+1;\n //int rollNumber=5;\n switch(rollNumber) {\n case 1:\n dice_picture.setImageResource(R.drawable.one);\n break;\n case 2:\n dice_picture.setImageResource(R.drawable.two);\n break;\n case 3:\n dice_picture.setImageResource(R.drawable.three);\n break;\n case 4:\n dice_picture.setImageResource(R.drawable.four);\n break;\n case 5:\n dice_picture.setImageResource(R.drawable.five);\n break;\n case 6:\n dice_picture.setImageResource(R.drawable.six);\n break;\n default:\n }\n\n move(rollNumber);\n }", "public static int rollDie() {\n int n = ThreadLocalRandom.current().nextInt(1, 7);\n return n;\n }", "public static int rollFairDie(){\n\t\t\n\t\tdouble rand = Math.random();\n\t\tint roll = (int) (rand * 6); // [0,5] what above code does.\n\t\treturn roll + 1;\n\t}", "public int roll() {\n this.assuerNN_random();\n //Roll once\n int result = random.nextInt(this.sides)+1;\n //TODO Save the roll somewhere\n\n //Return the roll\n return result;\n }", "public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }", "public static void main(String[] args) {\n\t\tRandom ricoDude = new Random();\r\n\t\tint x = ricoDude.nextInt(20) + 1;\r\n\t\t// the dice will have arange of 0-5 to make it 1-6 , + 1 to the end of it\r\n\t\t\r\n\t\tSystem.out.println(\"You rolled a: \" + x);\r\n\t\tint a = 1, b= 2,k;\r\n\t\tk = a + b + a++ + b++;\r\n\t\tSystem.out.println(k);\r\n\t\t\r\n\t}", "public void reRoll() {\n this.result = this.roll();\n this.isSix = this.result == 6;\n }", "public void rollDice() {\n try {\n if (numOfDices != Integer.parseInt(numOfDicesText.getText().toString())) {\n init();\n }\n }\n catch (Exception e) {\n System.out.println(e);\n numOfDicesText.setText(\"1\");\n init();\n }\n int rolledNumber;\n for (int i = 0; i < numOfDices; i++) {\n rolledNumber = dices.get(i).roll();\n textViews.get(i).setText(\"Dice \" + (i+1) + \" rolled a \" + rolledNumber);\n imageViews.get(i).setImageBitmap(DiceImages.getImage(rolledNumber));\n }\n }", "private void firstRoll(int playerName) {\n\t\t// we randomly get six integers, from one to six, and we do it N_DICE\n\t\t// times and every time we write our random integer in the array.\n\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\tint dice = rgen.nextInt(1, 6);\n\t\t\tdiceResults[i] = dice;\n\t\t}\n\t\t// program will tell witch players turn it is.\n\t\tdisplay.printMessage(playerNames[playerName - 1]\n\t\t\t\t+ \"'s turn! Click the \" + '\\\"' + \"Roll Dice\" + '\\\"'\n\t\t\t\t+ \" button to roll the dice.\");\n\t\t// program will wait until player clicks \"roll dice\" button.\n\t\tdisplay.waitForPlayerToClickRoll(playerName);\n\t\t// program will display dice, that depends on our randomly taken\n\t\t// integers.\n\t\tdisplay.displayDice(diceResults);\n\t}", "public int throwDice() {\n //create new random number between 1 and 6\n int nr = ThreadLocalRandom.current().nextInt(1, 6 + 1);\n //throw the number\n throwDice(nr);\n //return number\n return nr;\n }", "public void roll() {\n\t\tthis.faceValue = (int)(NUM_SIDES*Math.random()) + 1;\n\t}", "public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }", "public void rollAllDices() {\n for(int i = 0; i < dicesList.size(); i++) {\n dicesList.get(i).roll();\n }\n }", "void roll(int noOfPins);", "public int roll() {\n Random r;\n if (hasSeed) {\n r = new Random();\n }\n else {\n r = new Random();\n }\n prevRoll = r.nextInt(range) + 1;\n return prevRoll;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint dice1, dice2;\n\t\tint sum;\n\t\t\n\t\twhile (true)\n\t\t{\n\t\t\tdice1 = (int)(Math.random()*6) +1;\n\t\t\tdice2 = (int)(Math.random()*6) +1;\n\t\t\tsum = dice1 + dice2;\n\t\t\t\n\t\t\tif (sum == 5)\n\t\t\t{break;}\n\t\t\t\n\t\t\tSystem.out.printf(\"Roll the dice! Now we've got %d, %d. The summation is %d.\\n\", dice1, dice2, sum);\n\t\t}\n\t\n\t\tSystem.out.printf(\"Roll the dice! Now we've got %d, %d. The summation is %d.\\n\", dice1, dice2, sum);\n\t\tSystem.out.println(\"Now we have 5, and it's completed.\");\n\t}", "public static int diceRoll() {\n int max = 20;\n int min = 1;\n int range = max - min + 1;\n int rand = (int) (Math.random() * range) + min;\n return rand;\n }", "public int setRollResult(int diceAmount, int diceSides) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < diceAmount; i++) {\n\t\t\tresult += diceBag.rollDice(diceSides);\n\t\t}\n\t\treturn result;\n\t}", "public void throwDice()\n {\n System.out.println( name + \"'s Turn \" + (turnNumber + 1) + \" Results for Round \" + round + \": \");\n turnScores[turnNumber] = 0;\n System.out.print(\"Dice Throws: \");\n for (int diceNumber = 0; diceNumber < diceThrows[turnNumber].length; diceNumber++)\n {\n int diceThrow = r.nextInt(6) + 1;\n diceThrows[turnNumber][diceNumber] = diceThrow;\n turnScores[turnNumber] += diceThrow;\n totalScore += diceThrow;\n System.out.print(diceThrows[turnNumber][diceNumber] + \" \");\n }\n System.out.print(\" Score This Turn: \" + turnScores[turnNumber] + \" \");\n System.out.println(\" \" + name + \"'s Running Total Score: \" + totalScore + \"\\n\");\n \n turnNumber++;\n }", "public int roll()\n {\n int r = (int)(Math.random() * sides) + 1;\n return r;\n }", "public int roll(){\r\n myFaceValue = (int)(Math.random() * myNumSides) + 1;\r\n return myFaceValue;\r\n }", "@Override\n public void run() {\n n =r.nextInt(6)+1;\n rollDieFace(n);\n }", "static int roll() {\n\t\tRandom rand = new Random();\t\t\t\t//get large random number\n\t\tint num2 = rand.nextInt();\t\t\t\t//convert from long to int\n\t\treturn Math.abs(num2%6)+1;\t\t\t\t//num between 1 and 6\n\t}", "private void diceSum(int dice, int desiredSum) {\r\n\t\tdiceSumHelper(dice, desiredSum, 0, new ArrayList<Integer>());\r\n\t\tSystem.out.println(calls);\r\n\t}", "int roll();", "public static void main(String[] args) {\n\t\tRandom coiso = new Random();\n\t\tList<Integer> stats = new ArrayList<Integer>();\n\t\tList<Integer> rolls = new ArrayList<Integer>();\n\t\tint soma = 0;\n\t\t\n\t\t\n\t\t/*for (int i=0;i<10;i++)\n\t\t\tSystem.out.println(1+coiso.nextInt(19));*/\n\t\tfor (int j=0;j<6;j++) {\n\t\t\tfor (int s=0;s<4;s++) {\n\t\t\t\trolls.add(1+coiso.nextInt(6));\n\t\t\t}\n\t\t\trolls.sort(new Comparator<Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\trolls.remove(0);\n\t\t\tfor (int v=0;v<3;v++)\n\t\t\t\tsoma += rolls.get(v);\n\t\t\tstats.add(soma);\n\t\t\trolls.clear();\n\t\t\tsoma=0;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(stats);\n\t\tfor (int i=0;i<6;i++)\n\t\t\tsoma+=stats.get(i);\n\t\tSystem.out.println(soma);\n\n\t}", "public Dice(int numberOfDice) {\r\n for (int i = 0; i < numberOfDice; i++) {\r\n dice.add(rollDie());\r\n }\r\n sortDice();\r\n }", "public void throwDice() {\r\n\t\tfor( DiceGroup diceGroup:dice.values() ) {\r\n\t\t\tdiceGroup.throwDice(); //.setResult( (int) Math.random()*die.getSize() + 1);\r\n\t\t}\r\n\t}", "public void roll ()\n {\n //sets faceValue to an int between 1 - numFaces (both inclusive)\n faceValue = (int)(Math.random() * numFaces + 1);\n }", "public int throwDice() {\n Double randNumber = 1 + Math.random() * 5;\n this.face = randNumber.intValue();\n return this.face;\n }", "public void setPlayerRoll10()\r\n {\r\n \r\n roll1 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE10 + LOWEST_DIE_VALUE10);\r\n }", "public String throwDice() {\n if (timesThrown < 3) {\n for (Die die : dice) {\n if (timesThrown == 0) {\n die.setChosen(false);\n }\n if (die.getChosen() == false) {\n int random = (int) (Math.random() * 6 + 1);\n die.setValue(random);\n }\n }\n return writeTimesThrown();\n }\n return null;\n }", "public int getDice(){\n\t\treturn diceValue;\n\t\t\n\t}", "private void rollDie() {\n if (mTimer != null) {\n mTimer.cancel();\n }\n mTimer = new CountDownTimer(1000, 100) {\n public void onTick(long millisUntilFinished) {\n die.roll();\n showDice();\n }\n public void onFinish() {\n afterRoll();\n }\n }.start();\n }", "public int diceValue()\r\n\t{\r\n\t\treturn rollNumber;\r\n\t}", "public int roll() {\n Random random = new Random();\n faceValue = random.nextInt(sides)+1;\n return faceValue;\n }", "public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }", "public void rollDice(int pIndex) {\n this.pIndex = pIndex;\n this.result = this.roll();\n this.isSix = this.result == 6;\n resetCoordinates();\n this.tickCounter=0;\n this.vel=1;\n this.diceRollCount++;\n }", "public int diceSum(Die[] dice) {\n int sum = 0;\n for (Die d : dice) {\n sum += d.getFace();\n }\n return sum;\n }", "public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }", "@Test\n public void testDiceThrown() {\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 3, 4);\n game.nextTurn();\n testDie(game.diceThrown(), 5, 6);\n game.nextTurn();\n testDie(game.diceThrown(), 1, 2);\n game.nextTurn();\n\n }", "public int randomWithRange(){\n\r\n\t\tint[] diceRolls = new int[4];//roll four 6-sided dices\r\n\t\tint range;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {\r\n\t\t\t//add each dice i rolled into an array\r\n\t\t\trange = 6;\r\n\t\t\tdiceRolls[i] = (int)(Math.random() * range) + 1;//assign a number btw 1-6\r\n\t\t}\r\n\t\tint smallest=diceRolls[0];\r\n\t\tfor(int i = 1; i<diceRolls.length; i++) {//will check for the smallest rolled dice\r\n\t\t\tif(diceRolls[i]<smallest) \r\n\t\t\t\tsmallest=diceRolls[i];\t\t\r\n\t\t}\r\n\t\tint sum=0;\r\n\t\tfor(int i = 0; i<diceRolls.length;i++) {//adds up all the sum\r\n\t\t\tsum = sum+diceRolls[i];\r\n\t\t}\r\n\t\treturn sum-smallest;//subtract by the smallest dice from the sum\r\n\t}", "public void throwDices() throws DiceException {\n /**generator of random numbers(in this case integer numbers >1)*/\n Random generator = new Random();\n /**mode of logic*/\n String mode = this.getMode();\n\n if (!mode.equals(\"sum\") && !mode.equals(\"max\")) {\n throw new DiceException(\"Wrong throw mode!!! Third argument should be 'max' or 'sum'!\");\n } else if (this.getNumOfDices() < 1) {\n throw new DiceException(\"Wrong numeber of dices!!! Number of dices should equals 1 or more!\");\n } else if (this.getNumOfWalls() < 4) {\n throw new DiceException(\"Wrong numeber of walls!!! Number of walls should equals 4 or more!\");\n } else {\n if (mode.equals(\"sum\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n result += (generator.nextInt(this.getNumOfWalls()) + 1);\n }\n } else if (mode.equals(\"max\")) {\n for (int i = 0; i < this.getNumOfDices(); i++) {\n int buff = (generator.nextInt(this.getNumOfWalls()) + 1);\n if (this.result < buff) {\n this.result = buff;\n }\n }\n }\n }\n }", "public static void main(String[] args){\n if(args.length>0){\r\n //Create an array here in which all values stored are zero\r\n int[] valueOfRolls={0,0,0,0,0,0};\r\n //Convert input to int\r\n int amountOfRolls=Integer.parseInt(args[0]);\r\n //loop to control the spins, rolls by the amount of rolls user typed in\r\n for(int i=0; i<amountOfRolls;i++){\r\n //print the number for each random spin\r\n \tint randomSpin=(int)(Math.random()*6)+1;\r\n valueOfRolls[randomSpin-1]++;\r\n \r\n }\r\n //gets each value in the array and prints them out\r\n \r\n for(int i=0; i<6; i++){\r\n System.out.println( (i+1)+ \" was thrown \"+ valueOfRolls[i]+\" times.\");\r\n }\r\n }\r\n //executed if the user just types in \"java DiceTester\" in the command prompt\r\n else{\r\n System.out.print(\"Usage: java DiceTester [number of throws]\");\r\n }\r\n }", "public void roll() { \n this.value = (int)(Math.random() * this.faces()) + 1; \n }", "void rollNumber(int d1, int d2);", "public void rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }", "public int rollDice(int amount) {\r\n int randomNum = ThreadLocalRandom.current().nextInt(1, amount + 1);\r\n return randomNum;\r\n }", "public int attackRoll(){\r\n\t\treturn (int) (Math.random() * 100);\r\n\t}", "public int generateRoll() {\n\t\tint something = (int) (Math.random() * 100) + 1;\n\t\tif (something <= 80) {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2 - 1;\n\t\t\treturn roll;\n\t\t} else {\n\t\t\tint allNumRoll = (int) (Math.random() * getNumSides()) + 1;\n\t\t\tint roll = allNumRoll * 2;\t\t\n\t\t\treturn roll;\n\t\t}\n\t}", "private static byte roll6SidedDie() {\n\t\tint test = (int)Math.floor(Math.random() * 6) + 1;\n\t\tbyte roll = (byte)test;\n\t\treturn roll;\n\t}", "public Integer aiAction() {\r\n\t\t//if the first dice is less then six, throw the second dice \r\n\t\t//if the both throws > 10 the ai has lost, and will return 0\r\n\t\t//if the first dice == 7, return first dice\r\n\t\tInteger totalSum = 0;\r\n\t\tRandom aiRandom = new Random();\r\n\t\tInteger firstDice = aiRandom.nextInt(7) + 1;\r\n\t\tSystem.out.println(\"First dice: \" + (totalSum += firstDice));\r\n\t\tif (firstDice < 6) {\r\n\t\t\tInteger secondDice = aiRandom.nextInt(7) + 1;\r\n\t\t\tSystem.out.println(\"Second dice value is: \" + secondDice);\r\n\t\t\tSystem.out.println(\"Sum of both throws: \" + (totalSum += secondDice));\r\n\t\t\tif(totalSum > 10){\r\n\t\t\t\treturn 0;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn totalSum;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Ai scored :\" + (firstDice));\r\n\t\t\treturn firstDice;\r\n\t\t}\r\n\r\n\t}", "public int roll() {\n\t\treturn 3;\n\t}", "public void roll() {\n int number = new Random().nextInt(MAXIMUM_FACE_NUMBER);\n FaceValue faceValue = FaceValue.values()[number];\n setFaceValue(faceValue);\n }", "public void roll() {\n if(!frozen) {\n this.value = ((int)(Math.random() * numSides + 1));\n }\n }", "static public void showDice(List<Die> dice) {\n System.out.println(\"----Your Hand----\");\n for (var die : dice) {\n System.out.print(die.getNumberOnDie() + \" \");\n }\n System.out.println(\"\\n\");\n }", "public void rollCall() {\n System.out.println(\"Calling roll for all the animals...\\n\");\n for (int i = 0; i < zoo.length; i++){\n zoo[i].makeNoise();\n }\n System.out.println();\n }", "private void roll() {\n value = (int) (Math.random() * MAXVALUE) + 1;\n }" ]
[ "0.72710156", "0.70403624", "0.7008027", "0.69787043", "0.68828595", "0.6879834", "0.6867632", "0.67913365", "0.6786266", "0.67701405", "0.67664105", "0.6737066", "0.67357063", "0.67094713", "0.6654379", "0.6607481", "0.6582625", "0.6564212", "0.6534358", "0.65245014", "0.6492983", "0.6476683", "0.6442838", "0.63811135", "0.63703305", "0.63697463", "0.6323107", "0.63043517", "0.629656", "0.6290379", "0.62880504", "0.6287985", "0.62771416", "0.62756157", "0.62733114", "0.6267091", "0.6230837", "0.6174023", "0.613867", "0.61327106", "0.6129502", "0.61233234", "0.6106215", "0.60992825", "0.60895646", "0.6078732", "0.60729307", "0.60724676", "0.60673517", "0.6064323", "0.6059207", "0.60580635", "0.60557514", "0.6039773", "0.6034934", "0.6012087", "0.6004758", "0.60033524", "0.5992309", "0.5969179", "0.5954518", "0.5928739", "0.59092945", "0.5895733", "0.5880234", "0.5876026", "0.5874511", "0.5857995", "0.58327043", "0.58296156", "0.58159316", "0.57978725", "0.57839626", "0.5765742", "0.5762518", "0.5756315", "0.57543534", "0.57414544", "0.5734533", "0.57322127", "0.5716681", "0.57143784", "0.5676047", "0.5664537", "0.5647637", "0.56387985", "0.5637794", "0.5633414", "0.5624436", "0.5600983", "0.560011", "0.5590464", "0.5583938", "0.5573821", "0.5564951", "0.5560871", "0.5554546", "0.5549199", "0.554643", "0.5513718", "0.55054355" ]
0.0
-1
Builds a semirandom new aquarium string.
public String build() { List<String> fishes = new ArrayList<String>(); int fishTypeCount = random.nextInt(Chars.FISH_TYPES.size()) + 1; if (fishTypeCount == Chars.FISH_TYPES.size()) { fishes.addAll(Chars.FISH_TYPES); } else { while (fishes.size() < fishTypeCount) { String fishType = random.oneOf(Chars.FISH_TYPES); if (!fishes.contains(fishType)) { fishes.add(fishType); } } } // A rare swimmer should show up about once every 8 tweets. if (random.nextInt(8) == 5) { fishes.add(random.oneOf(Chars.RARE_SWIMMER_TYPES)); } // There will be about 8 tweets a day. Something should be special about // many of them but not all of them. Only once a week should something // exceedingly rare show up. 8 tweets * 7 days = 56 tweets per week boolean exceedinglyRareBottomTime = (random.nextInt(56) == 37); // A rare bottom dweller should show up about once every 8 tweets. boolean rareBottomDwellerTime = (random.nextInt(8) == 2); int maxLineLength = 10; List<String> bottom = new ArrayList<String>(); if (rareBottomDwellerTime) { bottom.add(random.oneOf(Chars.RARE_BOTTOM_DWELLERS)); } if (exceedinglyRareBottomTime) { bottom.add(random.oneOf(Chars.EXCEEDINGLY_RARE_JUNK)); } int plantCount = midFavoringRandom(maxLineLength - bottom.size() - 1); if (plantCount < 1) { plantCount = 1; } for (int i = 0; i < plantCount; i++) { bottom.add(random.oneOf(Chars.PLANT_TYPES)); } while (bottom.size() < maxLineLength) { bottom.add(Chars.IDEOGRAPHIC_SPACE); } random.shuffle(bottom); String bottomLine = String.join("", bottom); // For each swimmer line, choose a random number of fish, then random small whitespace // in front of some. int swimLineCount = 5; List<List<String>> swimLines = new ArrayList<List<String>>(); int previousSwimmerCount = 0; for (int s = 0; s < swimLineCount; s++) { List<String> swimLine = new ArrayList<String>(); // Lines should tend to have similar swimmer densities. How crowded in general is // this aquarium? int maxPerLine = random.nextInt((int) Math.round((maxLineLength * 0.6))) + 1; int swimmerCount = midFavoringRandom(maxPerLine); // At least one swimmer on first line so first lines aren't trimmed. if (previousSwimmerCount == 0 && swimmerCount == 0) { swimmerCount++; } for (int i = 0; i < swimmerCount; i++) { swimLine.add(getSmallPersonalSpace() + random.oneOf(fishes)); } while (swimLine.size() < maxLineLength) { swimLine.add(Chars.IDEOGRAPHIC_SPACE); } random.shuffle(swimLine); swimLines.add(swimLine); previousSwimmerCount = swimmerCount; } StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < swimLines.size(); i++) { List<String> swimLine = swimLines.get(i); stringBuilder.append(String.join("", swimLine)).append("\n"); } stringBuilder.append(bottomLine); return stringBuilder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }", "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }", "String getNewRandomTag() {\n\t\tbyte t[] = new byte[tagLength];\n\t\tfor (int i = 0; i < tagLength; i++) {\n\t\t\tt[i] = (byte) rand('a', 'z');\n\t\t}\n\t\treturn new String(t);\n\t}", "public static String rndString() {\r\n char[] c = RBytes.rndCharArray();\r\n return new String(c);\r\n\r\n }", "public static String generateRandomNonce() {\n Random r = new Random();\n StringBuffer n = new StringBuffer();\n for (int i = 0; i < r.nextInt(8) + 2; i++) {\n n.append(r.nextInt(26) + 'a');\n }\n return n.toString();\n }", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "private static String generateRandomString(int size) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size / 2; i++) sb.append((char) (64 + r.nextInt(26)));\n return sb.toString();\n }", "public static String buildTestString(int length, Random random) {\n char[] chars = new char[length];\n for (int i = 0; i < length; i++) {\n chars[i] = (char) random.nextInt();\n }\n return new String(chars);\n }", "public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }", "private String newCode(int length) {\n Random rnd = new SecureRandom();\n StringBuilder code = new StringBuilder(length);\n do {\n code.setLength(0);\n while (code.length() < length) {\n if (rnd.nextBoolean()) { // append a new letter or digit?\n char letter = (char) ('a' + rnd.nextInt(26));\n code.append(rnd.nextBoolean() ? Character.toUpperCase(letter) : letter);\n } else {\n code.append(rnd.nextInt(10));\n }\n }\n } while (exists(code.toString()));\n return code.toString();\n }", "static String getRandomString(int n){\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index = (int)(alphabet.length() * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(alphabet.charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "private String getRandomString() {\n\t\tStringBuilder salt = new StringBuilder();\n\t\tRandom rnd = new Random();\n\t\twhile (salt.length() <= 5) {\n\t\t\tint index = (int) (rnd.nextFloat() * SALTCHARS.length());\n\t\t\tsalt.append(SALTCHARS.charAt(index));\n\t\t}\n\t\tString saltStr = salt.toString();\n\t\treturn saltStr;\n\t}", "private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}", "public static String getRandom_mid(long sid) {\n\t\tint id = -(new Random().nextInt(2000000000));\r\n\t\treturn id +\"_\"+ sid;\r\n\t}", "public String createPassword() {\n while (i < length){\n temp += abc.charAt(random.nextInt(26));\n i++;\n }\n\n this.password = this.temp;\n this.temp = \"\";\n this.i = 0;\n return password;\n }", "public static String randomStringGenerator(int len)\n {\n \t int lLimit = 97; \n \t int rLimit = 122; \n \t int targetStringLength =len;\n \t Random random = new Random();\n String generatedString = random.ints(lLimit, rLimit + 1)\n \t .limit(targetStringLength)\n \t .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)\n \t .toString();\n return generatedString;\n }", "public static String randomString() {\n\t\tint leftLimit = 97; // letter 'a'\n\t\tint rightLimit = 122; // letter 'z'\n\t\tint targetStringLength = 10;\n\t\tRandom random = new Random();\n\n\t\treturn random.ints(leftLimit, rightLimit + 1).limit(targetStringLength)\n\t\t\t\t.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append).toString();\n\t}", "public String makeNonce()\n\t{\n\t\tbyte[] data = new byte[NONCE_SIZE];\n\t\trandom.nextBytes(data);\n\n\t\treturn encoder.encode(data);\n\t}", "public static String createUniqueKey() {\r\n\r\n\t\tint iRnd;\r\n\t\tlong lSeed = System.currentTimeMillis();\r\n\t\tRandom oRnd = new Random(lSeed);\r\n\t\tString sHex;\r\n\t\tStringBuffer sUUID = new StringBuffer(32);\r\n\t\tbyte[] localIPAddr = new byte[4];\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// 8 characters Code IP address of this machine\r\n\t\t\tlocalIPAddr = InetAddress.getLocalHost().getAddress();\r\n\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[0]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[1]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[2]) & 255]);\r\n\t\t\tsUUID.append(byteToStr[((int) localIPAddr[3]) & 255]);\r\n\t\t}\r\n\t\tcatch (UnknownHostException e) {\r\n\t\t\t// Use localhost by default\r\n\t\t\tsUUID.append(\"7F000000\");\r\n\t\t}\r\n\r\n\t\t// Append a seed value based on current system date\r\n\t\tsUUID.append(Long.toHexString(lSeed));\r\n\r\n\t\t// 6 characters - an incremental sequence\r\n\t\tsUUID.append(Integer.toHexString(iSequence.incrementAndGet()));\r\n\r\n\t\tiSequence.compareAndSet(16777000, 1048576);\r\n\r\n\t\tdo {\r\n\t\t\tiRnd = oRnd.nextInt();\r\n\t\t\tif (iRnd>0) iRnd = -iRnd;\r\n\t\t\tsHex = Integer.toHexString(iRnd);\r\n\t\t} while (0==iRnd);\r\n\r\n\t\t// Finally append a random number\r\n\t\tsUUID.append(sHex);\r\n\r\n\t\treturn sUUID.substring(0, 32);\r\n\t}", "public static String randomQuote() {\n\t\tint i = (int) (Math.random() * quotes.length);\n\t\treturn quotes[i];\n\t}", "private String generateRandomId(){\n\n //creates a new Random object\n Random rnd = new Random();\n\n //creates a char array that is made of all the alphabet (lower key + upper key) plus all the digits.\n char[] characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\".toCharArray();\n\n //creates the initial, empty id string\n String id = \"\";\n\n /*Do this 20 times:\n * randomize a number from 0 to the length of the char array, characters\n * add the id string the character from the index of the randomized number*/\n for (int i = 0; i < 20; i++){\n id += characters[rnd.nextInt(characters.length)];\n }\n\n //return the 20 random chars long string\n return id;\n\n }", "private String newPassword() {\n\t\tchar[] vet = new char[10];\n\t\tfor(int i=0; i<10; i++) {\n\t\t\tvet[i] = randomChar();\n\t\t}\n\t\treturn new String(vet);\n\t}", "public static String randomIdentifier() {\r\n\t\tfinal String lexicon = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n\t\tfinal java.util.Random rand = new java.util.Random();\r\n\t\t// consider using a Map<String,Boolean> to say whether the identifier is\r\n\t\t// being used or not\r\n\t\tfinal Set<String> identifiers = new HashSet<String>();\r\n\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\twhile (builder.toString().length() == 0) {\r\n\t\t\tint length = rand.nextInt(5) + 5;\r\n\t\t\tfor (int i = 0; i < length; i++)\r\n\t\t\t\tbuilder.append(lexicon.charAt(rand.nextInt(lexicon.length())));\r\n\t\t\tif (identifiers.contains(builder.toString()))\r\n\t\t\t\tbuilder = new StringBuilder();\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public String generateGUID() {\n Random randomGenerator = new Random();\n String hash = DigestUtils.shaHex(HASH_FORMAT.format(new Date())\n + randomGenerator.nextInt());\n return hash.substring(0, GUID_LEN);\n }", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public static String create()\n\t{\n\t\treturn new String(B64Code.encode(createBytes()));\n\t}", "public static String getRandomString() {\n \tif (random == null)\n \t\trandom = new Random();\n \treturn new BigInteger(1000, random).toString(32);\n }", "private byte[] randomByteArray() throws UnsupportedEncodingException {\n int len = sr.nextInt(maxlen);\n @StringBuilder@ sb = new @StringBuilder@(len);\n\n for (int i = 0; i < len; i++)\n sb.append((char) sr.nextInt(128));\n return sb.toString().getBytes(\"UTF-8\");\n }", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "static public String generateAString(String s) {\n String result;\n result = generate(s);\n if (result != null) {\n currentString = result;\n }\n return result;\n }", "private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\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 String randomString() {\n return new BigInteger(130, random).toString(32);\n }", "private static String createRandomString(int minLen, int maxLen, Random random) {\n int len = (minLen == maxLen) ? minLen : (random.nextInt(maxLen - minLen) + minLen);\n StringBuilder sb = new StringBuilder(len);\n while (sb.length() < len) {\n sb.append(CHARACTERS[random.nextInt(CHARACTERS.length)]);\n }\n return sb.toString();\n }", "public static synchronized String generate(String str)\n\t{\n\t\tif (!TextUtils.isEmpty(str))\n\t\t{\n\t\t\tbyte[] md5 = getMD5(str.getBytes());\n\t\t\tif (md5 != null && md5.length > 0)\n\t\t\t{\n\t\t\t\tBigInteger bi = new BigInteger(md5).abs();\n\t\t\t\treturn bi.toString(RADIX);\n\t\t\t}\n\t\t\treturn str.replaceAll(\"[^a-zA-Z0-9]\", \"\");\n\t\t}\n\t\treturn null;\n\t}", "public static String generateRandomString(int length) {\n String CHAR = \"ABCDEF\";\n String NUMBER = \"0123456789\";\n\n String DATA_FOR_RANDOM_STRING = CHAR + NUMBER;\n SecureRandom random = new SecureRandom();\n\n if (length < 1) throw new IllegalArgumentException();\n\n StringBuilder sb = new StringBuilder(length);\n\n for (int i = 0; i < length; i++) {\n // 0-62 (exclusive), random returns 0-61\n int rndCharAt = random.nextInt(DATA_FOR_RANDOM_STRING.length());\n char rndChar = DATA_FOR_RANDOM_STRING.charAt(rndCharAt);\n\n sb.append(rndChar);\n }\n\n return sb.toString();\n }", "public static String randomeString() {\n\t\t\tString generatedString = RandomStringUtils.randomAlphabetic(8);\n\t\t\tSystem.out.println(generatedString);\n\t\t\treturn generatedString;\n\t\t\t\n\t\t}", "public static synchronized String generateUniqueToken(int length) {\n\n byte random[] = new byte[length];\n Random randomGenerator = new Random();\n StringBuffer buffer = new StringBuffer();\n\n randomGenerator.nextBytes(random);\n\n for (int j = 0; j < random.length; j++)\n {\n byte b1 = (byte) ((random[j] & 0xf0) >> 4);\n byte b2 = (byte) (random[j] & 0x0f);\n if (b1 < 10)\n buffer.append((char) ('0' + b1));\n else\n buffer.append((char) ('A' + (b1 - 10)));\n if (b2 < 10)\n buffer.append((char) ('0' + b2));\n else\n buffer.append((char) ('A' + (b2 - 10)));\n }\n\n return (buffer.toString());\n }", "private String generateNonce() {\n // Get the time of day and run MD5 over it.\n Date date = new Date();\n long time = date.getTime();\n Random rand = new Random();\n long pad = rand.nextLong();\n // String nonceString = (new Long(time)).toString()\n // + (new Long(pad)).toString();\n String nonceString = Long.valueOf(time).toString()\n + Long.valueOf(pad).toString();\n byte mdbytes[] = messageDigest.digest(nonceString.getBytes());\n // Convert the mdbytes array into a hex string.\n return toHexString(mdbytes);\n }", "protected static String generateString(int length) {\n String characters = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n Random rnd = new Random(System.nanoTime());\n char[] text = new char[length];\n for (int i = 0; i < length; i++) {\n text[i] = characters.charAt(rnd.nextInt(characters.length()));\n }\n return new String(text);\n }", "private String generateRandomString(int length) {\n\n StringBuilder stringBuilder = new StringBuilder(length);\n int index = -1;\n while (stringBuilder.length() < length) {\n index = mRandom.nextInt(TEST_CHAR_SET_AS_STRING.length());\n stringBuilder.append(TEST_CHAR_SET_AS_STRING.charAt(index));\n }\n return stringBuilder.toString();\n }", "private String generateRandomHexString(){\n return Long.toHexString(Double.doubleToLongBits(Math.random()));\n }", "public String generateMP() {\n\t\t\tString characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*()-_=+[{]}\\\\|;:\\'\\\",<.>/?\";\n\t\t\tString pwd = RandomStringUtils.random(15, 0, 0, false, false, characters.toCharArray(), new SecureRandom());\n\t\t\treturn pwd;\n\t\t}", "void genKey(){\n Random rand = new Random();\n int key_length = 16;\n String key_alpha = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n StringBuilder sb = new StringBuilder(key_length);\n for(int i = 0; i < key_length; i++){\n int j = rand.nextInt(key_alpha.length());\n char c = key_alpha.charAt(j);\n sb.append(c);\n }\n this.key = sb.toString();\n }", "public static String makeRandomID() {\n UUID uuid = UUID.randomUUID();\n return uuid.toString();\n }", "public String createPassword() {\n String alphabet= \"abcdefghijklmnopqrstuvwxyz\";\n int count=0;\n String randomPass=\"\";\n while (count<this.length){\n randomPass+=alphabet.charAt(this.randomNumber.nextInt(alphabet.length()-1));\n count++;\n }\n return randomPass;\n }", "private static String randomString(int length) {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint index = randInt(0, ALPHA_NUMERIC_STRING.length() - 1);\n\t\t\tbuilder.append(ALPHA_NUMERIC_STRING.charAt(index));\n\t\t}\n\t\treturn builder.toString();\n\t}", "public static synchronized String generateSessionId() {\n\n\t\tRandom random = new SecureRandom(); // 取随机数发生器, 默认是SecureRandom\n\t\tbyte bytes[] = new byte[SESSION_ID_BYTES];\n\t\trandom.nextBytes(bytes); // 产生16字节的byte\n\t\tbytes = getDigest().digest(bytes); // 取摘要,默认是\"MD5\"算法\n\t\t// Render the result as a String of hexadecimal digits\n\n\t\tStringBuffer result = new StringBuffer();\n\t\tfor (int i = 0; i < bytes.length; i++) { // 转化为16进制字符串\n\n\t\t\tbyte b1 = (byte) ((bytes[i] & 0xf0) >> 4);\n\t\t\tbyte b2 = (byte) (bytes[i] & 0x0f);\n\t\t\tif (b1 < 10)\n\t\t\t\tresult.append((char) ('0' + b1));\n\t\t\telse\n\t\t\t\tresult.append((char) ('A' + (b1 - 10)));\n\t\t\tif (b2 < 10)\n\t\t\t\tresult.append((char) ('0' + b2));\n\t\t\telse\n\t\t\t\tresult.append((char) ('A' + (b2 - 10)));\n\t\t}\n\n\t\treturn (result.toString());\n\t}", "abstract Truerandomness newInstance();", "static String getSaltString() {\n String SALTCHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n StringBuilder salt = new StringBuilder();\n Random rnd = new Random();\n while (salt.length() < 18) { // length of the random string.\n int index = (int) (rnd.nextFloat() * SALTCHARS.length());\n salt.append(SALTCHARS.charAt(index));\n }\n String saltStr = salt.toString();\n return saltStr;\n }", "private String createSalt()\r\n {\r\n SecureRandom random = new SecureRandom();\r\n byte bytes[] = new byte[20];\r\n random.nextBytes(bytes);\r\n StringBuilder sb = new StringBuilder();\r\n\r\n for (int i = 0; i < bytes.length; i++)\r\n {\r\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n\r\n String salt = sb.toString();\r\n return salt;\r\n }", "private String getToken() {\n\t\tString numbers = \"0123456789\";\n\t\tRandom rndm_method = new Random();\n String OTP = \"\";\n for (int i = 0; i < 4; i++)\n {\n \tOTP = OTP+numbers.charAt(rndm_method.nextInt(numbers.length()));\n \n }\n return OTP;\n\t}", "public static String getRandomString(int n) \r\n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\n + \"0123456789\"\r\n + \"abcdefghijklmnopqrstuvxyz\"; \r\n \r\n // create StringBuffer size of AlphaNumericString \r\n StringBuilder sb = new StringBuilder(n); \r\n \r\n for (int i = 0; i < n; i++) { \r\n \r\n // generate a random number between \r\n // 0 to AlphaNumericString variable length \r\n int index \r\n = (int)(AlphaNumericString.length() \r\n * Math.random()); \r\n \r\n // add Character one by one in end of sb \r\n sb.append(AlphaNumericString \r\n .charAt(index)); \r\n } \r\n \r\n return sb.toString(); \r\n }", "public StringBuilder generateNewKey(int length) {\n\t\tStringBuilder k = new StringBuilder();\n\t\tif (length < 64) {\n\t\t\tlength = 64;\n\t\t}\n\t\tint pv = -1;\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tint v = pv;\n\t\t\twhile (v == pv) {\n\t\t\t\tv = ZRandomize.getRandomInt(0,99999999);\n\t\t\t}\n\t\t\tk.append(v);\n\t\t\tif (k.length()>=length) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (k.length()>length) {\n\t\t\tk.delete(length,k.length());\n\t\t}\n\t\treturn k;\n\t}", "public String generateRandomString(){\n \n StringBuffer randStr = new StringBuffer();\n for(int i=0; i<RANDOM_STRING_LENGTH; i++){\n int number = getRandomNumber();\n char ch = CHAR_LIST.charAt(number);\n randStr.append(ch);\n }\n return randStr.toString();\n }", "@Override\n public Question generate() {\n return new Question(\"Why do Canadians prefer their jokes in hexadecimal?\",\n \"Because 7 8 9 A!\");\n }", "public RandomString(int length) {\n\t\tthis(length, new SecureRandom());\n\t}", "public static String generateString(int count) {\r\n String ALPHA_NUMERIC_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n StringBuilder builder = new StringBuilder();\r\n while (count-- != 0) {\r\n int character = (int) (Math.random() * ALPHA_NUMERIC_STRING.length());\r\n builder.append(ALPHA_NUMERIC_STRING.charAt(character));\r\n }\r\n return builder.toString();\r\n }", "private String generateSecretKey(){\n SecureRandom random = new SecureRandom();\n byte[] bytes = new byte[20];\n\n random.nextBytes(bytes);\n Base32 base32 = new Base32();\n return base32.encodeToString(bytes);\n }", "public synchronized static final String generateRandomString(int n) {\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyz1234567890\".toCharArray();\n\t\tSecureRandom random = new SecureRandom();\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsb.append(chars[random.nextInt(chars.length)]);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String rndString(int length) {\r\n char[] c = RBytes.rndCharArray(length);\r\n return new String(c);\r\n\r\n }", "private static String getNonceStr() {\r\n\t\tRandom random = new Random();\r\n\t\treturn MD5Util.MD5Encode(String.valueOf(random.nextInt(10000)), \"GBK\");\r\n\t}", "public static String generateAnagrams(String str) {\r\n\t\tint length = str.length();\r\n\t\tchar[] charArray = str.toCharArray();\r\n\t\tList<Character> charList = new ArrayList<>();\r\n\t\tStringBuilder strBuilder = new StringBuilder(length);\r\n\r\n\t\tfor (int i = 0; i < length; i++) {\r\n\t\t\tcharList.add(charArray[i]);\r\n\t\t}\r\n\r\n\t\tCollections.shuffle(charList);\r\n\t\tfor (char chr : charList) {\r\n\t\t\tstrBuilder.append(chr);\r\n\t\t}\r\n\r\n\t\treturn strBuilder.toString();\r\n\t}", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "public static String generateRandomStrWithWhiteSpace(int length) {\r\n\t\tString str = KaneUtil.generateRamdomString(length);\r\n\t\tStringBuilder strBuilder = new StringBuilder(str);\r\n\r\n\t\tfor (int i = 0; i < random.nextInt(length - 1) + 1; i++) {\r\n\t\t\tint index = random.nextInt(length);\r\n\t\t\tstrBuilder.replace(index, index, \" \");\r\n\t\t}\r\n\r\n\t\treturn strBuilder.toString();\r\n\t}", "public String build();", "public String build();", "public String generateToken(String username) {\n\t\tString token = username;\n\t\tLong l = Math.round(Math.random()*9);\n\t\ttoken = token + l.toString();\n\t\treturn token;\n\t}", "private String generateRandomString(Random r, final int len) {\n byte[] bytes = new byte[len];\n for (int i = 0; i < len; i++) {\n bytes[i] = (byte)(r.nextInt(92) + 32);\n }\n return new String(bytes);\n }", "private String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\"; \n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "byte[] generateMasterSecret(String type, byte[]secret, int[]clientRandom, int[]serverRandom) throws NoSuchAlgorithmException, IOException{\n byte[] part1 = md5andshaprocessing(\"AA\", secret, clientRandom, serverRandom);\r\n byte[] part2 = md5andshaprocessing(\"BB\", secret, clientRandom, serverRandom);\r\n byte[] part3 = md5andshaprocessing(\"CCC\", secret, clientRandom, serverRandom);\r\n \r\n /* using ByteArrayOutputStream to concatenate the 3 parts */\r\n \r\n baos.write(part1);\r\n baos.write(part2);\r\n baos.write(part3);\r\n \r\n byte[] result = baos.toByteArray();\r\n\r\n System.out.println(\"The \" + type + \" is indeed 48 bytes: \" + result.length);\r\n System.out.println(type + \" to string: \" + Base64.getEncoder().encodeToString(result) + \"\\n\");\r\n \r\n baos.reset();\r\n \r\n return result;\r\n }", "public static String getRandomBigChar(int length) {\n\t\tString ALPHABET = \"ABCDEFGHIJKLMOPQRSTUVWXYZ\";\n\t\tfinal SecureRandom RANDOM = new SecureRandom();\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(ALPHABET.charAt(RANDOM.nextInt(ALPHABET.length())));\n\n\t\treturn sb.toString();\n\t}", "static String getAlphaNumericString(int n) \n {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\"; \n \n // create StringBuffer size of AlphaNumericString \n StringBuilder sb = new StringBuilder(n); \n \n for (int i = 0; i < n; i++) { \n \n // generate a random number between \n // 0 to AlphaNumericString variable length \n int index \n = (int)(AlphaNumericString.length() \n * Math.random()); \n \n // add Character one by one in end of sb \n sb.append(AlphaNumericString \n .charAt(index)); \n } \n \n return sb.toString(); \n }", "public static String getRandomString(int length, boolean easyReadOnly)\r\n {\r\n if (easyReadOnly)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric3[Math.abs(bytes[i]%m_alphanumeric3.length)]);\r\n }\r\n return sb.toString();\r\n }\r\n else\r\n return getRandomString(length); \r\n }", "public String generateOTP() {\n String values = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"; //characters to use in password\n Random random = new Random();\n char[] password = new char[6]; //setting password size to 6\n IntStream.range(0, password.length).forEach(i -> password[i] = values.charAt(random.nextInt(values.length())));\n return String.valueOf(password);\n }", "public static String getNonce(int size){\r\n\t\tStringBuilder builder = new StringBuilder(size);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\r\n\t\t}\r\n\r\n\t\treturn builder.toString();\r\n\t}", "@Override\r\n\tpublic String randString(int n) {\n\t\tString base=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n\t\treturn randString(n, base);\r\n\t}", "public static synchronized String getRandomPassword() {\n\t\t StringBuilder password = new StringBuilder();\n\t\t int j = 0;\n\t\t for (int i = 0; i < MINLENGTHOFPASSWORD; i++) {\n\t\t \t//System.out.println(\"J is \"+j);\n\t\t password.append(getRandomPasswordCharacters(j));\n\t\t j++;\n\t\t \n\t\t if (j == 4) {\n\t\t j = 0;\n\t\t }\n\t\t }\n\t\t return password.toString();\n\t\t}", "private static String palindromeGenerator(int n) {\n\t\tif (n <= 0) return \"\";\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (n % 2 == 1) sb.append((char)(randomGenerator.nextInt(25) + 'a'));\n\t\twhile (sb.length() < n) {\n\t\t\tchar temp = (char)(randomGenerator.nextInt(25) + 'a');\n\t\t\tsb.insert(0, temp);\n\t\t\tsb.append(temp);\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static String randomString() {\n return PodamUtil.manufacture(String.class);\n }", "String generateMash(String input);", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "public final synchronized String next() {\n // Increment and capture.\n seq += inc;\n if (seq >= maxSeq) {\n randomizePrefix();\n resetSequential();\n }\n\n // Copy prefix\n char[] b = new char[totalLen];\n System.arraycopy(pre, 0, b, 0, preLen);\n\n // copy in the seq in base36.\n int i = b.length;\n for (long l = seq; i > preLen; l /= base) {\n i--;\n b[i] = digits[(int) (l % base)];\n }\n return new String(b);\n }", "String createUniqueID(String n){\n String uniqueID =UUID.randomUUID().toString();\n return n + uniqueID;\n }", "public static String getRandomAlphaNumericString(int n) {\n String AlphaNumericString = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n + \"0123456789\"\n + \"abcdefghijklmnopqrstuvxyz\";\n\n // create StringBuffer size of AlphaNumericString\n StringBuilder sb = new StringBuilder(n);\n\n for (int i = 0; i < n; i++) {\n\n // generate a random number between\n // 0 to AlphaNumericString variable length\n int index\n = (int)(AlphaNumericString.length()\n * Math.random());\n\n // add Character one by one in end of sb\n sb.append(AlphaNumericString\n .charAt(index));\n }\n\n return sb.toString();\n }", "public static String getNewSalt() {\n // Don't use Random!\n SecureRandom random = null;\n try {\n random = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n // NIST recommends minimum 4 bytes. We use 8.\n byte[] salt = new byte[8];\n random.nextBytes(salt);\n return Base64.getEncoder().encodeToString(salt);\n }", "private String randomNonEmptyString() {\n while (true) {\n final String s = TestUtil.randomUnicodeString(random()).trim();\n if (s.length() != 0 && s.indexOf('\\u0000') == -1) {\n return s;\n }\n }\n }", "String createSessionId(long seedTerm);", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "public String generate(int length) {\r\n\t\tString chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\r\n\t\tString pass = \"\";\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tint i = (int) Math.floor(Math.random() * 62);\r\n\t\t\tpass += chars.charAt(i);\r\n\t\t}\r\n\r\n\t\treturn pass;\r\n\t}", "public String nextString()\n {\n for (int index = 0; index < buf.length; ++index)\n {\n buf[index] = symbols[random.nextInt(symbols.length)];\n }\n return new String(buf);\n }", "public static String urlSafeRandomToken() {\n SecureRandom random = new SecureRandom();\n byte bytes[] = new byte[20];\n random.nextBytes(bytes);\n Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();\n String token = encoder.encodeToString(bytes);\n return token;\n }", "public static String getRandomString(int length)\r\n {\r\n if (length <= 0) length = 8;\r\n byte[] bytes = new byte[length];\r\n random.nextBytes(bytes);\r\n StringBuffer sb = new StringBuffer(length);\r\n for (int i = 0; i < length; i++)\r\n {\r\n sb.append(m_alphanumeric[Math.abs(bytes[i]%36)]);\r\n }\r\n return sb.toString();\r\n }", "@NonNull\n public static String random(int length) {\n String uuid = UUIDUtils.random();\n return uuid.substring(0, Math.min(length, uuid.length()));\n }", "@Override\r\n\tpublic String randString(int n, String base) {\n\t\tint bLength = base.length();\r\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tRandom r = new Random();\r\n\t\tint index;\r\n\t\tfor(int i=0; i<n; i++)\r\n\t\t{\r\n\t\t\tindex = r.nextInt(bLength);\r\n\t\t\tsb.append(base.charAt(index));\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}" ]
[ "0.62171334", "0.6190906", "0.6142049", "0.6060203", "0.60310525", "0.5962984", "0.59628874", "0.58932084", "0.5875119", "0.58711106", "0.58371925", "0.5823261", "0.5822493", "0.5787232", "0.5772065", "0.5746267", "0.57336855", "0.5680231", "0.56794125", "0.5674323", "0.56728417", "0.56675965", "0.5666406", "0.5653897", "0.5597848", "0.5593589", "0.5585203", "0.5567151", "0.5562339", "0.5551843", "0.55481297", "0.55477417", "0.5544741", "0.55317813", "0.552948", "0.5524377", "0.55142915", "0.5508728", "0.55027944", "0.5502318", "0.5489452", "0.5483891", "0.5478301", "0.54723495", "0.54719186", "0.54696304", "0.54677945", "0.5467687", "0.54624987", "0.54436487", "0.54332817", "0.54212534", "0.54147005", "0.5393975", "0.5388326", "0.53833", "0.5379366", "0.5378821", "0.5370778", "0.5370059", "0.536585", "0.5363097", "0.53550935", "0.5344314", "0.53430957", "0.53328234", "0.5327588", "0.5326561", "0.532254", "0.53216976", "0.5315424", "0.5314679", "0.5314679", "0.5303175", "0.5290419", "0.52829516", "0.5271701", "0.5269573", "0.5267866", "0.52665526", "0.52663803", "0.52633834", "0.52570486", "0.525476", "0.5243677", "0.5238944", "0.5233956", "0.5227269", "0.5219964", "0.52091724", "0.5209169", "0.52076215", "0.5206674", "0.5206313", "0.52036566", "0.52001256", "0.51916534", "0.51854426", "0.51831317", "0.5181297", "0.5174616" ]
0.0
-1
TODO Autogenerated method stub
@Override public Boolean loginAdmin(LoginAccessVo vo) throws Exception { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void logoutAdmin() throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override protected void onRestart() { super.onRestart(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public void surfaceCreated(SurfaceHolder holder) { Log.d(TAG,"surfaceCreated"); mSurfaceHolder = holder; initPlay(); play(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void surfaceDestroyed(SurfaceHolder holder) { mSurfaceHolder = null; stop(); }
{ "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
keep the notification visible a little while after moving the mouse, or until clicked
private void showNotification(Notification notification) { notification.setDelayMsec(2000); notification.show(Page.getCurrent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void showNotify () {\n if (timer != null) {\n timer.cancel ();\n }\n\n timer = new Timer ();\n timer.schedule (new updateTask (), 500, 500);\n cityMap.addMapListener (this);\n }", "private void showNotification() {\n }", "private void onNotificationClick(MouseEvent event) {\n\t\thide();\n\t\tevent.consume();\n\t}", "private void showNotification() {\n\n }", "public void mouseMoved(MouseEvent ex) {\r\n\t\t\t\tpatientL.setEnabled(true);\r\n\t\t\t\tpatientL.setVisible(true);\r\n\t\t\t\tvanish();\r\n\t\t\t}", "public void mouseMoved(MouseEvent ex) {\r\n\t\t\t\trequestL.setEnabled(true);\r\n\t\t\t\trequestL.setVisible(true);\r\n\t\t\t\tvanish();\r\n\t\t\t}", "void notifyVisibilityStatusIncrease(JDPoint p);", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tif(estadoAdjuntar){\r\n\t\t\t\t\testadoAdjuntar = false;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\testadoAdjuntar = true;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t}", "@OnClick(R.id.rly_tencent_mapview_message)\n public void ivTencentMapViewMessageOnclick(){\n if(isMessageHold) {\n rvTencentMapViewMessage.setVisibility(View.VISIBLE);\n rlyTencentMapViewCollect.setVisibility(View.GONE);\n isMessageHold = false;\n }else {\n rvTencentMapViewMessage.setVisibility(View.GONE);\n isMessageHold = true;\n }\n handler.postDelayed(runnable, 0);\n }", "public final void mouseClicked(MouseEvent evt) {\n\t\tif (evt.getY() < 30 && evt.getX() > 270) {\n\t\t\tsetVisible(false);\n\t\t\toffset = 0;\n\t\t\tdragged = false;\n\t\t} else {\n\t\t\tsynchronized (WAIT_LOCK) {\n\t\t\t\tWAIT_LOCK.notifyAll();\n\t\t\t}\n\t\t}\n\t}", "protected void showNotify() {\n try {\n myJump.systemStartThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "protected void hideNotify() {\n try {\n myJump.systemPauseThreads();\n } catch (Exception oe) {\n myJump.errorMsg(oe);\n }\n }", "private void notifyForbiddenTile(){\n\t\t\tJPanel pnl = EditorGUI.current;\n\t\t\tColor oldColor = pnl.getBackground();\n\t\t\t\n\t\t\tpnl.setBackground(new Color(240,125,125));\n\t\t\tnew Timer(delay, new ActionListener() {\t\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tpnl.setBackground(oldColor);\n\t\t\t\t\t((Timer) e.getSource()).stop();\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}", "@SuppressWarnings(\"unused\")\n public void setNotifyWhileDragging(boolean flag) {\n this.notifyWhileDragging = flag;\n }", "public void mo64136c() {\n if (mo64139e()) {\n ((IReadLaterFloatView) InstanceProvider.m107964b(IReadLaterFloatView.class)).setFloatViewVisible(true);\n ValueAnimator ofFloat = ValueAnimator.ofFloat((float) this.f41185a.getTop(), (float) (-this.f41188d));\n ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n /* class com.zhihu.android.app.p1011ad.pushad.$$Lambda$AbstractNotificationView$wXI6SvYUdl6E9e8C3K2h_AQOQfw */\n\n public final void onAnimationUpdate(ValueAnimator valueAnimator) {\n AbstractNotificationView.lambda$wXI6SvYUdl6E9e8C3K2h_AQOQfw(AbstractNotificationView.this, valueAnimator);\n }\n });\n ofFloat.addListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.app.p1011ad.pushad.AbstractNotificationView.C104832 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n AbstractNotificationView.this.f41185a.setVisibility(4);\n AbstractNotificationView.this.setVisibility(8);\n if (AbstractNotificationView.this.mo64135b() && (AbstractNotificationView.this.getContext() instanceof Activity)) {\n StatusBarUtil.m87236c((Activity) AbstractNotificationView.this.getContext());\n }\n if (AbstractNotificationView.this.f41195k != null) {\n AbstractNotificationView.this.f41195k.mo64153a(false);\n }\n }\n });\n ofFloat.setDuration(300L);\n ofFloat.start();\n this.f41196l = false;\n }\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void showNotification() {\n\t\t// What happens when the notification item is clicked\n\t\tIntent contentIntent = new Intent(this, MainActivity.class);\n\n\t\tPendingIntent pending = PendingIntent.getActivity(\n\t\t\t\tgetApplicationContext(), 0, contentIntent,\n\t\t\t\tandroid.content.Intent.FLAG_ACTIVITY_NEW_TASK);\n\n\t\tNotification nfc = new Notification(R.drawable.ic_launcher, null,\n\t\t\t\tSystem.currentTimeMillis());\n\t\tnfc.flags |= Notification.FLAG_ONGOING_EVENT;\n\n\t\tString contentText = getString(R.string.service_label);\n\n\t\tnfc.setLatestEventInfo(getApplicationContext(), contentText,\n\t\t\t\tcontentText, pending);\n\n\t\tmNM.notify(NOTIFICATION, nfc);\n\t\tSession.setNotificationVisible(true);\n\t}", "public final void handleHideNotificationPanel() {\n ValueAnimator ofFloat = ValueAnimator.ofFloat(1.0f, 0.0f);\n ofFloat.setDuration(300L);\n ofFloat.setInterpolator(new DecelerateInterpolator());\n ofFloat.addUpdateListener(new AppMiniWindowRowTouchHelper$handleHideNotificationPanel$$inlined$apply$lambda$1(this));\n ofFloat.addListener(new AppMiniWindowRowTouchHelper$handleHideNotificationPanel$$inlined$apply$lambda$2(this));\n ofFloat.start();\n }", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, \"Longitude is active\", System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, LongitudeActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, \"Longitude\", \"Tracking your location\", contentIntent);\n\n // Send the notification.\n notificationManager.notify(NOTIFICATION, notification);\n }", "public void windowIconified(WindowEvent e) {\r\n\t\t\t\t// pause the animation by setting the flag in the model.\r\n\t\t\t\tVariable.getVariable(Grapher2DConstants.Grapher2DAnimateFlag)\r\n\t\t\t\t\t\t.set(new BooleanValue(false));\r\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void mousePressed(MouseEvent arg0) {\n\t\t\t\tsetPanelColor(notificationsPanel);\n\t\t\t\tsidePanelInterface.setPanel(\"notificationsPanel\");\n\n\t\t\t}", "public void mouseMoved(MouseEvent ex) {\r\n\t\t\t\tchecker.setEnabled(true);\r\n\t\t\t\tchecker.setVisible(true);\r\n\t\t\t\tvanish();\r\n\t\t\t}", "public void youHaveBeenExcommunicated(){\n youHaveBeenExcommunicatedPane.setVisible(true);\n PauseTransition delay = new PauseTransition(Duration.seconds(3));\n delay.setOnFinished( event -> youHaveBeenExcommunicatedPane.setVisible(false) );\n delay.play();\n }", "private void deskPaneMouseMoved(java.awt.event.MouseEvent evt) {\n repaint();\n floater.setBounds(floater.getX(), floater.getY(), deskPane.getWidth(), floaterHeight);\n if (!floater.isVisible()) {\n floater.setVisible(evt.getY() < 10);\n } else {\n floater.setVisible(evt.getY() < floater.getHeight());\n }\n if (jToggleButton1.isSelected()) {\n floater.show();\n }\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tmHander.removeMessages(HIDEWINDOW);\n\t\tmHander.sendEmptyMessage(SHOW_WINDOW);\n\t\tmHander.sendEmptyMessageDelayed(HIDEWINDOW, 5000);\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public void addNotify(){\n super.addNotify();\n\n animator = new Thread(this);\n animator.start();\n }", "private void setNotificationViewed(Notification notification){\r\n\t\tnotification.setViewed(true);\r\n\t}", "private void showNotification() {\r\n\t\t// In this sample, we'll use the same text for the ticker and the\r\n\t\t// expanded notification\r\n\t\tCharSequence text = getText(R.string.local_service_started);\r\n\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.service_icon,\r\n\t\t\t\ttext, System.currentTimeMillis());\r\n\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tnew Intent(this, stopServiceJ.class), 0);\r\n\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, getText(R.string.service_name),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(R.string.local_service_started, notification);\r\n\t}", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = getText(R.string.local_service_started);\n\n // Set the icon, scrolling text and timestamp\n Notification notification = new Notification(R.drawable.icon, text,\n System.currentTimeMillis());\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, ServiceActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n notification.setLatestEventInfo(this, getText(R.string.local_service_label),\n text, contentIntent);\n\n // Send the notification.\n mNM.notify(NOTIFICATION, notification);\n }", "public void mouseClicked(MouseEvent evt) {\n synchronized (SplashWindow.this) {\n SplashWindow.this.paintCalled = true;\n SplashWindow.this.notifyAll();\n }\n dispose();\n }", "public void activate () {\n\t\tif (_timer!=null) {\n\t\t\treturn;\n\t\t}\n\t\t_timer = new Timer (\"tray-notifier\", true);\n\t\t\n\t\tfinal TimerTask task = \n\t\t\tnew TimerTask () {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tSwingUtilities.invokeLater (new Runnable () {\n\t\t\t\t\t\tpublic void run () {\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * @workaround invoca in modo asincrono la modifica tooltip\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tnotifyTray (_traySupport);\n\t\t\t\t\t\t}});\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\tif (_period<0) {\n\t\t\t_timer.schedule (task, _delay);\n\t\t} else {\n\t\t\t_timer.schedule (task, _delay, _period);\n\t\t}\n\t}", "public void handleTickReceived() {\n if (this.mVisible) {\n updateIndication();\n }\n }", "void notifyVisibilityStatusDecrease(JDPoint p);", "@Override\n public void upDate(Observable o) {\n if(relojito.obtenerHora().equals(hora)) \n this.setVisible(true);\n jLabel1.setText(mensaje);\n jLabel1.paintImmediately(jLabel1.getVisibleRect());;\n }", "public /* synthetic */ void mo17791xac558cd6() {\n NotificationPanelViewController notificationPanelViewController = NotificationPanelViewController.this;\n notificationPanelViewController.mHintAnimationRunning = false;\n notificationPanelViewController.mStatusBar.onHintFinished();\n }", "private void showNotification() {\n CharSequence text = \"Running\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, MainActivity.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n //.setSmallIcon(R.drawable.stat_sample) // the status icon\n .setTicker(text) // the status text\n //.setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"PodcastFTPService\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n mNM.notify(0, notification);\n }", "public void act() \n {\n mouse = Greenfoot.getMouseInfo();\n \n // Removes the achievement after its duration is over if its a popup (when it pops up during the game)\n if(popup){\n if(popupDuration == 0) getWorld().removeObject(this);\n else popupDuration--;\n }\n // Displays the decription of the achievement when the user hovers over it with the mouse\n else{\n if(Greenfoot.mouseMoved(this)) drawDescription();\n if(Greenfoot.mouseMoved(null) && !Greenfoot.mouseMoved(this)) drawMedal();\n }\n }", "public void menuClicked()\r\n {\r\n listening = true;\r\n\ta = b = null;\r\n\trepaint();\r\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tnew Notice();\n\t\t\t\tdispose(); // 해당 프레임만 사라짐\n\t\t\t}", "public void showNoNotifications(){\n noNotificationsTitle.setVisibility(View.VISIBLE);\n noNotificationsText.setVisibility(View.VISIBLE);\n noNotificationsImage.setVisibility(View.VISIBLE);\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\tif(estadoEmoticon){\r\n\t\t\t\t\t\testadoEmoticon = false;\r\n\t\t\t\t\t\tchatUI.getContenedorEmoticon().setVisible(true);\r\n\t\t\t\t\t\tcargarIconoX();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\testadoEmoticon = true;\r\n\t\t\t\t\t\tchatUI.getContenedorEmoticon().setVisible(false);\r\n\t\t\t\t\t\tcargarIconos();\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\t\t\r\n\t\t\t}", "public void update(){\n\t\tthis.setVisible(true);\n\t}", "@FXML\r\n private void displayPostion(MouseEvent event) {\r\n status.setText(\"X = \" + event.getX() + \". Y = \" + event.getY() + \".\");\r\n }", "private void makeGUIVisible(){\n gameState = GameState.LOAD;\n notifyObservers();\n }", "public void run() {\n int x = m.getCurrentMouse().getX();\n int y = m.getCurrentMouse().getY();\n int scrollX = view.getScroll().getHorizontalScrollBar().getValue();\n int scrollY = view.getScroll().getVerticalScrollBar().getValue();\n\n int clickX = x + scrollX - 40;\n\n int clickY = y + scrollY - 30;\n\n int fromTheTop = clickY / 21;\n int fromTheLeft = clickX / 21;\n\n\n Note n = model.getHighestPitch();\n\n for (int i = 0; i < fromTheTop; i++) {\n n = Note.prevNote(n);\n }\n this.model.setNoteToBeAdded(new Note(n.getPitchLetter(), n.getOctave(),\n fromTheLeft, fromTheLeft));\n\n view.setAllNotes(model.getMusic());\n view.setLength(model.getDuration());\n view.setTone(model.getTone(model.getNotes()));\n view.setTempo(model.getTempo());\n\n\n }", "public /* synthetic */ void mo17799x848b415e() {\n NotificationPanelViewController.this.mStackScrollerOverscrolling = false;\n NotificationPanelViewController.this.setOverScrolling(false);\n NotificationPanelViewController.this.updateQsState();\n }", "public void update() {\n\t\t\n\t\tVector size = new Vector(Main.frame.getContentPane().getWidth() + 64, 64 + 64);\n\t\tposition = new Vector(0, Main.frame.getContentPane().getHeight() - 40);\n\t\t\n\t\tRectangle rect = new Rectangle(position, size);\n\t\t\n\t\tif (rect.contains(Mouse.getVector())) {\n\t\t\troom.isMouseOverGUI = true;\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tTreePath pathForLocation = tree.getPathForRow(lastRow);\n\t\t\tif (pathForLocation == null)\n\t\t\t\treturn;\n\t\t\tObject lastPathComponent = pathForLocation.getLastPathComponent();\n\t\t\tif (lastPathComponent instanceof DefaultMutableTreeNode) {\n\t\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) lastPathComponent;\n\t\t\t\tIMNodeData nodeData = (IMNodeData) node.getUserObject();\n\t\t\t\tIMEventService eventHub = view.getContext().getSerivce(\n\t\t\t\t\t\tIMService.Type.EVENT);\n\t\t\t\tif (mEvnet.getID() == MouseEvent.MOUSE_ENTERED) {\n\t\t\t\t\tif (nodeData.getEntity() != null) {\n\t\t\t\t\t\tbounds.setLocation(bounds.x, bounds.y - scrollValue);\n\t\t\t\t\t\tIMEvent event = new IMEvent(\n\t\t\t\t\t\t\t\tIMEventType.SHOW_HOVER_INFOCARD_WINDOW);\n\t\t\t\t\t\tevent.setTarget(nodeData.getEntity());\n\t\t\t\t\t\tevent.putData(\"namedObject\", nodeData.getNamedObject());\n\t\t\t\t\t\tevent.putData(\"view\", view);\n\t\t\t\t\t\tevent.putData(\"nodeBounds\", bounds);\n\t\t\t\t\t\tevent.putData(\"comp\", MiddlePanel.this);\n\t\t\t\t\t\teventHub.broadcast(event);\n\n\t\t\t\t\t\tisShowing = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isShowing) {\n\t\t\t\t\t\thideEvent();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttimerService.killTimer(this);\n\t\t}", "private void showNotification() {\n // In this sample, we'll use the same text for the ticker and the expanded notification\n CharSequence text = \"Siguiendo el trayecto\";\n\n // The PendingIntent to launch our activity if the user selects this notification\n PendingIntent contentIntent = PendingIntent.getActivity(this, 0,\n new Intent(this, InformacionServicio.class), 0);\n\n // Set the info for the views that show in the notification panel.\n Notification notification = new Notification.Builder(this)\n .setSmallIcon(R.drawable.estrella_full) // the status icon\n .setTicker(text) // the status text\n .setWhen(System.currentTimeMillis()) // the time stamp\n .setContentTitle(\"Conductor Serv\") // the label of the entry\n .setContentText(text) // the contents of the entry\n .setContentIntent(contentIntent) // The intent to send when the entry is clicked\n .build();\n\n // Send the notification.\n //mNM.notify(55, notification);\n //startForeground(56,notification);\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)\n startMyOwnForeground();\n else\n startForeground(1, notification);\n\n }", "public void click() {\n this.lastActive = System.nanoTime();\n }", "public void mo64133a() {\n float f;\n if (!mo64139e()) {\n setVisibility(0);\n }\n ((IReadLaterFloatView) InstanceProvider.m107964b(IReadLaterFloatView.class)).setFloatViewVisible(false);\n float[] fArr = new float[2];\n if (this.f41196l) {\n f = (float) this.f41185a.getTop();\n } else {\n int i = this.f41188d;\n if (i == 0) {\n i = DisplayUtils.m87171b(getContext(), (float) this.f41193i);\n }\n f = (float) (-i);\n }\n fArr[0] = f;\n fArr[1] = (float) this.f41191g;\n ValueAnimator ofFloat = ValueAnimator.ofFloat(fArr);\n ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {\n /* class com.zhihu.android.app.p1011ad.pushad.$$Lambda$AbstractNotificationView$kK7LzkwRlcW_mdmTTuQsBcPOpc */\n\n public final void onAnimationUpdate(ValueAnimator valueAnimator) {\n AbstractNotificationView.m155975lambda$kK7LzkwRlcW_mdmTTuQsBcPOpc(AbstractNotificationView.this, valueAnimator);\n }\n });\n ofFloat.addListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.app.p1011ad.pushad.AbstractNotificationView.C104821 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n AbstractNotificationView.this.f41185a.setVisibility(0);\n }\n\n public void onAnimationEnd(Animator animator) {\n AbstractNotificationView abstractNotificationView = AbstractNotificationView.this;\n abstractNotificationView.f41189e = false;\n abstractNotificationView.mo64138d();\n }\n });\n ofFloat.setInterpolator(new OvershootInterpolator());\n ofFloat.setDuration(500L);\n if (!mo64139e()) {\n ofFloat.setStartDelay(500);\n }\n ofFloat.start();\n this.f41196l = true;\n }", "private void showForegroundControls(Class theActivity, String songName, int iconRes){\n PendingIntent pi = createActivityPendingIntent(theActivity);\n _currentNotification = new NotificationCompat.Builder(this)\n .setContentIntent(pi)\n .setSmallIcon(iconRes)\n .setTicker(songName)\n .setContentTitle(getApplicationInfo().loadLabel(getPackageManager()).toString())\n .setContentText(\"Playing: \" + songName)\n .build();\n _currentNotification.flags |= Notification.FLAG_ONGOING_EVENT;\n showNotification();\n }", "private void showNotification() {\n\t\t\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0, \n\t\t\t\t\t\tnew Intent(this, MainActivity.class), 0);\n\t\t\t\t\n\t\t// Use NotificationCompat.Builder to build the notification, display using mNM\n\t\tNotificationCompat.Builder mNotifyBuilder= new NotificationCompat.Builder(this)\n\t\t\t.setContentTitle(getText(R.string.notificationTitle))\n\t\t\t.setContentText(getText(R.string.notificationText))\n\t\t\t.setSmallIcon(R.drawable.ic_launcher)\n\t\t\t.setContentIntent(contentIntent);\n\t\t\n\t\tmNM.notify(notifyID, mNotifyBuilder.build());\n\t}", "@Override\r\n public void mouseDragged(MouseEvent e) {\n Rectangle r = c.getBounds();\r\n c.setBounds(e.getX() + (int) r.getX(), e.getY() + (int) r.getY(),\r\n c.getPreferredSize().width, c.getPreferredSize().height);\r\n Component p = c.getParent();\r\n if (p instanceof JComponent) {\r\n ((JComponent) p).paintImmediately(0, 0, c.getWidth(), c.getHeight());\r\n } else {\r\n p.repaint();\r\n }\r\n if (c instanceof ToggleImage) {\r\n if (this.tip == null) {\r\n this.tip = new JWindow();\r\n this.tip.getContentPane().add(this.pos);\r\n this.tip.pack();\r\n }\r\n ((JComponent) c).setToolTipText(Integer.toString((int) c.getBounds().getX()) + \",\"\r\n + Integer.toString((int) c.getBounds().getY()));\r\n this.pos.setText(Integer\r\n .toString((int) (c.getBounds().x + ((ToggleImage) c).getImageOffset().getX())) + \",\"\r\n + Integer\r\n .toString((int) (c.getBounds().getY()\r\n + ((ToggleImage) c).getImageOffset().getY())));\r\n this.tip.pack();\r\n this.tip.setVisible(true);\r\n this.pos.paintImmediately(0, 0, this.tip.getWidth(), this.tip.getHeight());\r\n }\r\n }", "private void showNotification(LBSBundle lbs,int status){\n\t\tScenario scenario = (Scenario) EntityPool.instance(\r\n\t\t\t\t).forId(lbs.getParentId(), lbs.getParentTag());\r\n\t\t\r\n\t\t\r\n\t\t// Set the icon, scrolling text and timestamp\r\n\t\tNotification notification = new Notification(R.drawable.compass25,\r\n\t\t\t\tscenario.getName(), System.currentTimeMillis());\r\n\t\tnotification.flags |= Notification.FLAG_AUTO_CANCEL;\r\n\t\tnotification.sound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\r\n\t\t// The PendingIntent to launch our activity if the user selects this\r\n\t\t// notification\r\n\t\tIntent intent = new Intent(this, TaskOverViewActivity.class);\r\n\t\tintent.setAction(TaskOverViewActivity.TASK_OVERVIEWBY_SCENARIO);\r\n\t\tintent.putExtra(TaskOverViewActivity.IN_SCENAIRO_ID, scenario.getId());\r\n\t\t//intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);\r\n\t\tPendingIntent contentIntent = PendingIntent.getActivity(this, 0,\r\n\t\t\t\tintent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n\t\tCharSequence text = getText(status);\r\n\t\t// Set the info for the views that show in the notification panel.\r\n\t\tnotification.setLatestEventInfo(this, scenario.getName(),\r\n\t\t\t\ttext, contentIntent);\r\n\r\n\t\t// Send the notification.\r\n\t\t// We use a layout id because it is a unique number. We use it later to\r\n\t\t// cancel.\r\n\t\tmNM.notify(\tstatus, notification);\r\n\t}", "void onHisNotify();", "private void ufoMotion() {\n leftToRightAnimation(ufo, 500);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!clickable)\n ufoMotion();\n }\n }, 1000);\n }", "@Override\n\tpublic void showNotify(Stage owner) {\n\t\tScreen current = Screen.getPrimary();\n\t\tRectangle2D bounds = current.getVisualBounds();\n\n\t\tsuper.show(owner, bounds.getWidth(), bounds.getHeight());\n\n\t\tdouble width = (bounds.getWidth() - getWidth()) - 10;\n\t\tdouble height = (bounds.getHeight() - getHeight()) - 10;\n\n\t\tsetX(width);\n\t\tsetY(height);\n\t}", "public void notifyGameOn() {\n this.myStatusString.setText(\"Game is On\");\n final LineBorder line = new LineBorder(Color.GREEN, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.GREEN);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE)); \n }", "public void mouseClicked(MouseEvent e) {\n if (playing) {\n Point p = e.getPoint();\n int col = (p.x - pixelTopX) / 30;\n int row = (p.y - pixelTopY) / 30;\n\n if (row >= 0 && col >= 0 && col < boardWidth && row < boardHeight) {\n if (SwingUtilities.isLeftMouseButton(e)) {\n if (isRightPressed) {\n if (minefield[row][col] instanceof SafeGrid) {\n SafeGrid currentGrid = (SafeGrid) minefield[row][col];\n if (checkFlagged(row, col, currentGrid.getSurrounding())) {\n reveal(row, col, true);\n }\n }\n } else {\n reveal(row, col, false);\n }\n\n } else if (SwingUtilities.isRightMouseButton(e)) {\n minesRemaining = minefield[row][col].mark(minesRemaining);\n }\n if (safeRemaining == 0) {\n gameEnd(true);\n }\n }\n repaint();\n }\n }", "public void mo84055a() {\n if (getVisibility() == 0) {\n animate().cancel();\n setLayerType(2, null);\n animate().alpha(0.0f).setListener(new Animator.AnimatorListener() {\n /* class com.zhihu.android.article.widget.ArticleFloatingTipsView.C172711 */\n\n public void onAnimationCancel(Animator animator) {\n }\n\n public void onAnimationRepeat(Animator animator) {\n }\n\n public void onAnimationStart(Animator animator) {\n }\n\n public void onAnimationEnd(Animator animator) {\n ArticleFloatingTipsView.this.setVisibility(4);\n ArticleFloatingTipsView.this.setLayerType(0, null);\n }\n }).start();\n }\n }", "protected void hideNotify () {\n if (timer != null) {\n timer.cancel ();\n timer = null;\n }\n\n cityMap.removeMapListener (this);\n }", "public void start() {\n\t\t setVisible(true);\n\t}", "private void canonMotion() {\n leftToRightAnimation(canon, 1000);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n if (!clickable)\n canonMotion();\n }\n }, 2000);\n }", "private void show() {\n\t\tdouble position = rootNode.getLayoutY();\n\n\t\tif (position >= -OFFSET && isPopping) {\n\t\t\trootNode.setLayoutY(position + SPEED);\n\t\t\tif (position + SPEED >= 40) {\n\t\t\t\tisPopping = false;\n\t\t\t}\n\n\t\t} else {\n\t\t\trootNode.setLayoutY(position - SPEED);\n\t\t\tif (position - SPEED <= -OFFSET) {\n\t\t\t\tcurrentPopUp = null;\n\t\t\t\trootNode.setLayoutY(-OFFSET);\n\t\t\t}\n\t\t}\n\t}", "public void addNotify()\n {\n super.addNotify();\n\t\n ib = createImage(width,height);\n ig = ib.getGraphics(); \n }", "private void floaterMouseClicked(java.awt.event.MouseEvent evt) {\n if (count == 0) {\n count = 1;\n last = System.currentTimeMillis();\n } else if (count == 1) {\n long news = System.currentTimeMillis();\n if (last - news < 1000) {\n lastbg = floater.getBackground();\n floater.setBackground(Color.lightGray);\n }\n }\n deskPane.setBackground(null);\n }", "public void mouseMoved(MouseEvent e) {\n\t\tupdateHud();\r\n\t}", "private void showNotification() {\n Intent intent = new Intent(this, MainActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);\n Notification notification = new NotificationCompat.Builder(getApplicationContext())\n .setContentIntent(PendingIntent.getActivity(this, 0, intent, 0))\n .setSmallIcon(R.drawable.ic_launcher)\n .setContentText(getText(R.string.local_service_running))\n .setContentTitle(getText(R.string.local_service_notification)).build();\n notificationManager.notify(NOTIFICATION, notification);\n }", "public void windowIconified(WindowEvent arg0) {\n //textArea1.append(\"Window is minimized\");\n\n }", "private void delayedHide(int delayMillis) {\n\n }", "public void showBalloonTip() {\n TimingUtils.showTimedBalloon(balloonTip , 3000);\n }", "@Override\r\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\r\n\r\n\t\t\tsynchronized (obj) {\r\n\t\t\tswitch (msg.what) {\r\n\t\t\tcase ITEM_BG:\r\n\t\t\t\t//setBackgroundResource(R.drawable.home_unfocused);\r\n\t\t\t\tsetUnfocusBg();\r\n\t\t\t\tmBtnState = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase ITEM_LONG_C:\r\n\t\t\t\tperformLongClick();\r\n\t\t\t\tmHasLongClickPressed = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase ITEM_SINGLE_C:\r\n\t\t\tLog.i(\"Yar\", \"1. windowManagerParams.x = \" + windowManagerParams.x);\r\n\t\t\t\tif (getVisibility() == View.VISIBLE && (windowManagerParams.x == 0 || (windowManagerParams.x >= RELATIVE_WIDTH && RELATIVE_WIDTH > 0))) \r\n\t\t\t\tperformClick();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ITEM_MOVE_S:\t\t\t////set the 'move' speed @Yar add\r\n\t\t\t\t\r\n\t\t\t\tLog.i(\"Yar\", \"1. visibale = \" + getVisibility());\r\n\t\t\t\tif (getVisibility() == View.VISIBLE) {\r\n\t\t\t\t\twindowManager.updateViewLayout(FloatView.this, windowManagerParams);\r\n\t\t\t\t}\r\n\t\t\t\tif (mWidth == 0) {\r\n\t\t\t\t\twindowManagerParams.x -= SPEED;\r\n\t\t\t\t} else {\r\n\t\t\t\t\twindowManagerParams.x += SPEED;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ((windowManagerParams.x < mWidth && windowManagerParams.x > 0)\r\n\t\t\t\t\t\t|| (mWidth == 0 && windowManagerParams.x > -SPEED)) {\r\n\t\t\t\t\t//mHandler.removeMessages(ITEM_MOVE_S);\r\n\t\t\t\t\tmHandler.sendEmptyMessageDelayed(ITEM_MOVE_S, SPEED_DELAY);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public void show() {\n\t\t// Useless if called in outside animation loop\n\t\tactive = true;\n\t}", "private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved\n \n /*Pon la bandera para saber que ya hubó un evento y no se desloguie*/\n bIdle = true;\n \n }", "private void formMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseMoved\n \n /*Pon la bandera para saber que ya hubó un evento y no se desloguie*/\n bIdle = true;\n \n }", "public void updateNotificationTranslucency() {\n float fadeoutAlpha = (!this.mClosingWithAlphaFadeOut || this.mExpandingFromHeadsUp || this.mHeadsUpManager.hasPinnedHeadsUp()) ? 1.0f : getFadeoutAlpha();\n if (this.mBarState == 1 && !this.mHintAnimationRunning && !this.mKeyguardBypassController.getBypassEnabled()) {\n fadeoutAlpha *= this.mClockPositionResult.clockAlpha;\n }\n this.mNotificationStackScroller.setAlpha(fadeoutAlpha);\n }", "public void highlight(){\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\n\t\t\t//if(!clicked){\t\n\t\t\t\t\n\t\t\t\tfirsttime=true;\n\t\t\t\tclicked=true;\n\t\t\t\tif(piece!=null){\n\t\t\t\t\txyMovment=piece.xyPossibleMovments(xPosition, yPosition);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void vanish() {\n\t\t\r\n\t\tlpanel.addMouseMotionListener(new MouseAdapter() {\r\n\t\t\tpublic void mouseMoved(MouseEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tchecker.setEnabled(false);\r\n\t\t\t\tchecker.setVisible(false);\r\n\t\t\t\trequestL.setEnabled(false);\r\n\t\t\t\trequestL.setVisible(false);\r\n\t\t\t\tpatientL.setEnabled(false);\r\n\t\t\t\tpatientL.setVisible(false);\r\n\t\t\t\treport.setEnabled(false);\r\n\t\t\t\treport.setVisible(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t}", "public void showAtBottomPending() {\n if(isKeyBoardOpen())\n showAtBottom();\n else\n pendingOpen = true;\n }", "public void run() {\n int x = m.getCurrentMouse().getX();\n int y = m.getCurrentMouse().getY();\n int scrollX = view.getScroll().getHorizontalScrollBar().getValue();\n int scrollY = view.getScroll().getVerticalScrollBar().getValue();\n\n int clickX = x + scrollX - 40;\n\n int clickY = y + scrollY - 30;\n\n\n int fromTheTop = clickY / 21;\n int fromTheLeft = clickX / 21;\n\n\n Note n = model.getHighestPitch();\n\n for (int i = 0; i < fromTheTop; i++) {\n n = Note.prevNote(n);\n }\n Note nd = new Note(n.getPitchLetter(), n.getOctave(), fromTheLeft, fromTheLeft);\n Note noteToBeSelected = this.model.getOverlappedNote(nd);\n this.model.setSelectedNote(noteToBeSelected);\n\n view.setAllNotes(model.getMusic());\n view.setLength(model.getDuration());\n view.setTone(model.getTone(model.getNotes()));\n view.setTempo(model.getTempo());\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tsuper.run();\n\t\t\t\t\twhile (isonshow) {\n\t\t\t\t\t\tfor (int i = 0; i<(0.0416*scrrenHeight); i++) {\n\t\t\t\t\t\t\t//Log.i(\"thread\", i+\"\");\n\t\t\t\t\t\t\tsc.scrollTo(0, i);\n\t\t\t\t\t\t\t//handler11.sendEmptyMessage(i);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsleep(20);\n\n\t\t\t\t\t\t\t\tif(!isonshow){\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}else{}\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\tfor (int i = 0; i < 20; i++) {\n\n\t\t\t\t\t\t\t\tsleep(40);\n\t\t\t\t\t\t\t\tif(!isonshow){\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}else{}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsc.scrollTo(0, 0);\n\n\t\t\t\t\t\thandler11.sendEmptyMessage(0);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsleep(80);\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}", "public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }", "public void showUnready();", "public void update() {\n\t\tint xa = 0, ya = 0; \n\t\tif(game.getPlayer().x < 0){\n\t\t\txa -= 2;\n\t\t}else if(game.getPlayer().x + 32 > game.getScreen().width){\n\t\t\txa += 2;\n\t\t}\n\t\tif(game.getPlayer().y < 0){\n\t\t\tya -= 2;\n\t\t}else if(game.getPlayer().y + 32 > game.getScreen().height){\n\t\t\tya +=2;\n\t\t}\n\t\t\n\t\tif (xa != 0 || ya!= 0) move(xa, ya);\n\t\t\n\t\t//detects if the mouse is clicking on the interface\n\t\t/*if(Mouse.getButton() == 1 && Mouse.getX() >= 0 && Mouse.getX() <= 1200 && Mouse.getY() > 525 && Mouse.getY() < 675) {\n\t\t\tclicked = true;\n\t\t} else {\n\t\t\tclicked = false;\n\t\t}*/\n\t\t\n\t\treturn;\n\t}", "private void showNotification() {\n\n Intent intent = new Intent(this, DashboardActivity.class);\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n stackBuilder.addParentStack(DashboardActivity.class);\n stackBuilder.addNextIntent(intent);\n\n final NotificationCompat.Builder builder = new NotificationCompat.Builder(this);\n\n builder.setSmallIcon(R.drawable.ic_gps);\n builder.setContentText(getText(R.string.local_service_started));\n builder.setContentTitle(getText(R.string.local_service_label));\n builder.setOngoing(true);\n builder.setContentIntent(stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT));\n\n final Notification notification = builder.build();\n\n // Send the notification.\n mNotificationManager.notify(NOTIFICATION, notification);\n }", "public void mouseEntered(MouseEvent arg0) {\r\n\t\tPoint pos = new Point(arg0.getX(), arg0.getY());\r\n\t\tSwingUtilities.convertPointToScreen(pos, owner);\r\n\t\tx = ((int) pos.getX() + 10);\r\n\t\ty = ((int) pos.getY() + 10);\r\n\r\n\t\t/*\r\n\t\t * ensure that it does not go off the screen if the coordinate of the\r\n\t\t * position exceeds the window size of the default screen it always\r\n\t\t * opens on the left. TODO fix the two screen to be not too strict.\r\n\t\t */\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tboolean exceed = false;\r\n\t\tif ((x + this.WIDTH_SC) > screenSize.getWidth()) {\r\n\t\t\tx = (x - 10 - this.WIDTH_SC);\r\n\t\t}\r\n\t\tif ((y + this.HEIGHT_SC) > screenSize.getHeight()) {\r\n\t\t\ty = (y - 10 - this.HEIGHT_SC);\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * wait for mouse to say ontop of the component for a while to ensure\r\n\t\t * that user really wanted to see to tooltip. Generates the sleeping\r\n\t\t * thread\r\n\t\t */\r\n\t\tt = new Thread(new Runnable() {\r\n\r\n\t\t\tpublic void run() {\r\n\t\t\t\tboolean cont = true; // indicating if thread was interrupted\r\n\r\n\t\t\t\t/* sleep */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1300);\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\tcont = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * if mouse stayed ontop of the component (mouse event is not\r\n\t\t\t\t * consumed) create toolTip popup.\r\n\t\t\t\t */\r\n\t\t\t\tif (cont && !helpActive) {\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpopup.remove(help);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpopup.setLocation(x, y);\r\n\t\t\t\t\tpopup.add(toolTip);\r\n\t\t\t\t\tpopup.pack();\r\n\t\t\t\t\tpopup.setVisible(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tt.start();\r\n\r\n\t\t/* keylistener can not be in thread */\r\n\t\tpopup.addKeyListener(this);\r\n\r\n\t}", "@Override\n public void nativeMouseMoved(NativeMouseEvent nme) {\n if (Var.timerStart) {\n txtMouse.setText(\"Mouse Moved: \" + nme.getX() + \", \" + nme.getY());\n\n }\n }", "@Override\r\n\tpublic boolean onTouch(View v, MotionEvent me) {\n\r\n\t\ttry {\r\n\t\t\tThread.sleep(50);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tswitch (me.getAction()) {\r\n\r\n//\t\tcase MotionEvent.ACTION_DOWN:\r\n//\t\t//\tx = me.getX();\r\n//\t\t//\ty = me.getY();\r\n//\t\t\tif(click){\r\n//\t\t\t\tclick = false;\r\n//\t\t\t}else{\r\n//\t\t\tclick = true;}\r\n//\t\t\tbreak;\r\n\r\n\t\tcase MotionEvent.ACTION_UP:\r\n\t\t\t//x = me.getX();\r\n\t\t\t//y = me.getY();\r\n\t\t\tbreak;\r\n\r\n\t\tcase MotionEvent.ACTION_MOVE:\r\n//\t\t\txf = me.getX() - (xc/2) ;\r\n//\t\t\tyf = me.getY() - (yc/2);\r\n//\t\t\t\r\n//\t\t\tSystem.out.println(\"X = \"+xf+\" Y = \"+yf);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public void windowIconified(WindowEvent arg0)\n {\n ti.setImageAutoSize(true);\n\n try\n {\n SystemTray.getSystemTray().add(ti);\n cms.setVisible(false);\n ti.addMouseListener(new MouseListener()\n {\n public void mouseClicked(MouseEvent arg0)\n {\n SystemTray.getSystemTray().remove(ti);\n cms.setVisible(true);\n cms.setState(JFrame.NORMAL);\n }\n public void mouseEntered(MouseEvent arg0)\n {\n // Unused\n }\n public void mouseExited(MouseEvent arg0)\n {\n // Unused\n }\n public void mousePressed(MouseEvent arg0)\n {\n // Unused\n }\n public void mouseReleased(MouseEvent arg0)\n {\n // Unused\n }\n });\n }\n catch (AWTException e)\n {\n e.printStackTrace();\n }\n }", "boolean notifyBegin();", "private void showInstructScreen() {\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 643 && Mouse.getX() <= 758 && Mouse.getY() <= (displayHeight - 494) && Mouse.getY() >= (displayHeight - 562))) {\n\t\t\t// draw instructions screen\n\t\t\tdrawScreen(sprite.get(\"instructScreen\"));\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t}", "private void animateInfoScreen(boolean appear) {\n timer = new Timer();\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n Platform.runLater(() -> {\n if (appear) {\n dragging = true;\n if (solarSystemInfo.getScaleY() < 1) {\n solarSystemInfo.setScaleY(solarSystemInfo.getScaleY() + 0.1);\n } else {\n solarSystemInfo.setScaleY(1);\n this.cancel();\n }\n } else {\n if (solarSystemInfo.getScaleY() > 0) {\n solarSystemInfo.setScaleY(solarSystemInfo.getScaleY() - 0.1);\n } else {\n solarSystemInfo.setScaleY(0);\n this.cancel();\n }\n }\n drawUniverse();\n });\n }\n }, 0, 10);\n }", "void showPreviousEventsLoadingWheel();", "void updateNotification() {\n\t\tif (isPlaying()) {\n\t\t\tmNotification.icon = R.drawable.ic_now_playing;\n\t\t} else if (isPaused()) {\n\t\t\tmNotification.icon = R.drawable.ic_pause_track;\n\t\t}\n\t\tNotificationManager nM = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tnM.notify(NOTIFICATION_ID, mNotification);\n\t}", "@Override\n public void run() {\n pg2.setVisibility(View.VISIBLE);\n }", "public void monitor() {\n moveTo(1.0, 10);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n getPos();\n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n getPos();\n try {\n Thread.sleep(500);\n } catch (InterruptedException ex) {\n }\n getPos();\n }", "private void showIfPendingPushNotification() {\n if (mIsActivityResumedFromSleep) {\n PushNotificationMessageHandler.getInstance(this).showPendingPushNotification();\n PushNotificationMessageHandler.getInstance(this).clearPushNotificationFromBar();\n }\n }", "public void show(int delayTime) {\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n switch (mType) {\n case TYPE_First:\n mNewbieGuide.addIndicateImg(R.mipmap.guide_right,\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity, 110))\n .addMessage(mActivity.getString(R.string.switch_map),\n ScreenUtils.dpToPx(mActivity, -40)\n ,ScreenUtils.dpToPx(mActivity, 130))\n .addIndicateImg(R.mipmap.guide_left,\n ScreenUtils.dpToPx(mActivity,60),\n ScreenUtils.dpToPx(mActivity,40))\n .addMessage(mActivity.getString(R.string.open_menu),\n ScreenUtils.dpToPx(mActivity,85),\n ScreenUtils.dpToPx(mActivity,60)).show();\n\n break;\n\n case TYPE_TWICE:\n mNewbieGuide.addIndicateImg(R.mipmap.guide_right2,\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity, -170))\n\n .addMessage(mActivity.getString(R.string.see_the_history),\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity,-185)).\n\n addIndicateImg(R.mipmap.guide_down,\n ScreenUtils.dpToPx(mActivity,-105),\n ScreenUtils.dpToPx(mActivity,-135))\n\n .addMessage(mActivity.getString(R.string.navigate_to_the_watch),\n ScreenUtils.dpToPx(mActivity,-115),\n ScreenUtils.dpToPx(mActivity,-160)).show();\n break;\n\n case TYPE_THIRD:\n mNewbieGuide.addIndicateImg(R.mipmap.guide_right2,\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity,-230))\n .addMessage(\"设置安全区域\",\n ScreenUtils.dpToPx(mActivity,-50),\n ScreenUtils.dpToPx(mActivity,-250))\n .addIndicateImg(R.mipmap.guide_down,\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity, -130))\n .addMessage(\"立即刷新位置\",\n ScreenUtils.dpToPx(mActivity, -50),\n ScreenUtils.dpToPx(mActivity,-155))\n .show();\n }\n }\n }, delayTime);\n }", "public void setTrayIcon()\n\t{\n\t\tImage image = new Image(display, PropertyManager.getInstance().getProperty(\"ICON_FOLDER\"));\n\t\tfinal Tray tray = display.getSystemTray();\n\n\t\tif (tray == null)\n\t\t{\n\t\t\tSystem.out.println(\"The system tray is not available\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal TrayItem item = new TrayItem(tray, SWT.NONE);\n\t\t\titem.setToolTipText(PropertyManager.getInstance().getProperty(\"SOFT_INFO\"));\n\n\t\t\tfinal Menu menu = new Menu(shell, SWT.POP_UP);\n\n\t\t\tMenuItem mi1 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi2 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi3 = new MenuItem(menu, SWT.PUSH);\n\t\t\tMenuItem mi4 = new MenuItem(menu, SWT.PUSH);\n\n\t\t\tmi1.setText(\"Show\");\n\t\t\tmi1.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi2.setText(\"Hide\");\n\t\t\tmi2.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi3.setText(\"Change Operator\");\n\t\t\tmi3.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tlogin = \"\";\n\t\t\t\t\tpassword = \"\";\n\t\t\t\t\tInputDialog opDialog = new InputDialog(shell, SWT.DIALOG_TRIM);\n\t\t\t\t\tshell.setEnabled(!shell.getEnabled());\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_WAIT));\n\t\t\t\t\tString credential = opDialog.createDialogArea();\n\t\t\t\t\tlogin = credential.substring(0, credential.indexOf(File.separator));\n\t\t\t\t\tpassword = credential.substring(credential.indexOf(File.separator));\n\t\t\t\t\tshell.setEnabled(true);\n\t\t\t\t\tshell.setCursor(new Cursor(display, SWT.CURSOR_ARROW));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmi4.setText(\"Close\");\n\t\t\tmi4.addListener(SWT.Selection, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tSystem.out.println(\"selection \" + event.widget);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.addListener(SWT.MenuDetect, new Listener()\n\t\t\t{\n\t\t\t\tpublic void handleEvent(Event event)\n\t\t\t\t{\n\t\t\t\t\tmenu.setVisible(true);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\titem.setImage(image);\n\t\t}\n\t}" ]
[ "0.66213685", "0.66192526", "0.660855", "0.6474639", "0.6460535", "0.64584136", "0.6376914", "0.63375264", "0.6334262", "0.6330135", "0.6282485", "0.6269357", "0.6231411", "0.62311476", "0.6229243", "0.62279904", "0.6226009", "0.6198557", "0.6169794", "0.61599785", "0.61246246", "0.6106948", "0.60602224", "0.603595", "0.6026578", "0.6024316", "0.6005984", "0.5998773", "0.5981715", "0.5962681", "0.5960728", "0.5929136", "0.59097236", "0.5877678", "0.58547693", "0.58283854", "0.58200246", "0.58148515", "0.5813866", "0.5800568", "0.57934505", "0.5777088", "0.5775933", "0.57697564", "0.57694787", "0.575987", "0.5756596", "0.5755778", "0.5747815", "0.572158", "0.5714156", "0.57135695", "0.57133836", "0.5712758", "0.56940335", "0.5685741", "0.56686425", "0.56681246", "0.56655604", "0.56610006", "0.5657218", "0.56533664", "0.56500417", "0.564579", "0.56450325", "0.563581", "0.56346095", "0.563233", "0.5629688", "0.5619557", "0.56191754", "0.5614181", "0.5613244", "0.5610738", "0.5603521", "0.5603521", "0.55976063", "0.5583877", "0.5579525", "0.55715704", "0.5556536", "0.5553035", "0.55472165", "0.5540342", "0.5540246", "0.5538631", "0.5538058", "0.5536841", "0.55363846", "0.5530799", "0.553064", "0.5526257", "0.55230945", "0.5513806", "0.5510467", "0.55096346", "0.5508047", "0.5506515", "0.5505366", "0.5502268" ]
0.6262687
12
Test of getConnection method, of class AddressDAO.
@Test public void testGetConnection() { System.out.println("getConnection"); Connection result = instance.getConnection(); assertTrue(result!=null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConstructorConnection() {\n assertEquals(connection, dao.getDatabaseConnection());\n }", "private static void getConnectionTest() {\n\t\ttry {\r\n\t\t\tConnection conn=CartDao.getConnection();\r\n\t\t\tif(conn==null) System.out.println(\"disconnect\");\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}", "@Test\n\tpublic void testGetConnection() throws SQLException\n\t{\n\t\tassertTrue(DatabaseGateway.getConnection() != null);\n\t}", "@Test\n public void testGetterSetterConnection() {\n UserDao userDao = new UserDao();\n userDao.setDatabaseConnection(connection);\n assertEquals(connection, userDao.getDatabaseConnection());\n }", "@Test\n public void testConnectToDb() {\n System.out.println(\"connectToDb\");\n ClienteDAO instance = new ClienteDAO();\n instance.connectToDb();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\n\t}", "public void testGetConnection() {\r\n \r\n }", "@Test\n\tpublic void testGetDbInstance(){\n\t\tConnection c = DatabaseConnect.getInstance();\n\t\tassertTrue(c != null);\t\n\t}", "@Before\r\n\tpublic void setUp() throws SQLException {\n\t\tconn = DBManager.getInstance().getConnection();\r\n\t}", "@Test\n public void testConnect() throws MainException {\n System.out.println(\"connect\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n Connection result = instance.connect();\n assertNotNull(result);\n boolean expResult = true;\n assertEquals(instance.isConnected(), expResult);\n }", "public void testConnection() {\n\t\ttry {\n\t\t\tinit();\n\n\t\t} catch (Exception e) {\n\t\t\tif (log.isDebugEnabled())\n\t\t\t\tlog.error(\"Erro teste Conexao \", e);\n\t\t\tthrow new ConnectorException(\"Falha no teste de conexao : \"\n\t\t\t\t\t+ e.getMessage() + \". Check os detalhes da conexao.\");\n\t\t}\n\t}", "@BeforeClass\n\tpublic static void setup() throws SQLException {\n\t\tconfig = new ConnectionConfig();\n\t\tconfig.setDataSource(Mockito.mock(DataSource.class));\n\t\t//mock connection\n\t\tConnection connection = Mockito.mock(Connection.class);\n\t\tMockito.when(config.getDataSource().getConnection()).thenReturn(connection);\n\t\tMockito.when(connection.isValid((int) TimeUnit.MILLISECONDS.toSeconds(config.getValidationTimeout()))).thenReturn(true);\n\t\t//create the connection pool\n\t\tpool = new ConnectionPoolImpl(config);\n\t}", "@Test\n\tpublic void testGetConnection() throws SQLException {\n\t\tint count = pool.idleConnectionsCount();\n\t\tConnection connection = pool.getConnection(config.getConnectionTimeout());\n\t\tAssert.assertEquals(((ConnectionItem) connection).state().get() , ConnectionItem.STATE_IN_USE);\n\t\tAssert.assertEquals(count - 1 , pool.idleConnectionsCount());\n\t}", "@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }", "private Connection getConnection() throws Exception {\n\n\t\tContext initCtx = new InitialContext();\n\t\tContext envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n\t\tDataSource ds = (DataSource) envCtx.lookup(\"jdbc/TestDB\");\n\n\t\treturn ds.getConnection();\n\t}", "@BeforeClass\n public static void connectionBeforeClass() {\n String host = \"localhost\";\n String dbname = \"atm\";\n String username = \"root\";\n String password = \"Kinoshka12\";\n\n try (JDBConnector connector = new ConnectorMariaDb(host, dbname, username, password)) {\n BankRepository bankService = new BankRepository(connector);\n connector.getConnection();\n UserRepository repoUser = new UserRepository(connector);\n IAccountRepository repoAccount = new AccountRepository(connector);\n IBank bank = new Bank(10, \"leumi\");\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void getConnection() {\n }", "abstract Connection getConnection() throws SQLException;", "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "public AppointmentDAOImpl() {\n this.conn = DBConnector.getConnection();\n }", "@Override\n\tpublic Connection getConnection() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Conectando ao MySQL. . .\");\n\t\t\treturn DriverManager.getConnection(\"jdbc:mysql://localhost/test\", \"root\", \"1234\");\n\t\t\t//O Driver Manager serve para registrar os Drivers dos Bancos de Dados\n\t\t} catch (SQLException e) { //CHECKED EXCEPTION - SQLEXCEPTION\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new RuntimeException(\"Impossível realizar a conexão com o Banco de Dados MySql!\", e);\n\t\t}\n\t}", "public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}", "private static void testConnection(Properties properties) throws ClassNotFoundException {\n Optional.ofNullable(properties.getProperty(\"oracle.net.tns_admin\"))\n .ifPresent(v -> System.setProperty(\"oracle.net.tns_admin\", v));\n String dbURL = Optional.ofNullable(properties.getProperty(\"url\"))\n .orElseThrow(() -> new IllegalArgumentException(\"missing url property\"));\n\n Class.forName(\"oracle.jdbc.OracleDriver\");\n\n Connection conn = null;\n Statement stmt = null;\n\n try {\n conn = establishConnection(properties, dbURL);\n\n stmt = conn.createStatement();\n\n Stopwatch stmtWatch = Stopwatch.createStarted();\n ResultSet rs = stmt.executeQuery(properties.getProperty(\"query\"));\n System.out.println(\"Executed statement took : \" + stmtWatch.stop());\n\n if (rs.next()) {\n System.out.println(rs.getString(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n if (stmt != null) try { stmt.close(); } catch (Exception e) {}\n if (conn != null) try { conn.close(); } catch (Exception e) {}\n }\n }", "public boolean testConnection()\r\n { \r\n try {\r\n myConn = DriverManager.getConnection(getconn + \"?user=\" + user + \"&password=\" + pass);\r\n //Connection successfully connected check sourced from Stack Overflow\r\n //Source: https://stackoverflow.com/questions/7764671/java-jdbc-connection-status\r\n if (!myConn.isClosed() || myConn != null)\r\n return true;\r\n return false;\r\n //End borrowed code\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n //Logger.getLogger(SQLConnector.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return false;\r\n }", "public abstract Connection getConnection();", "@Override\n public void openConnection() throws DAOManagerException {\n try {\n connection = ds.getConnection();\n //save autocommit value\n this.autoCommit = connection.getAutoCommit();\n } catch (SQLException e) {\n LOGGER.error(\"Can't get connection \", e);\n throw new DAOManagerException(e);\n }\n\n }", "private void makeConnection() {\n try {\n InitialContext ic = new InitialContext();\n DataSource ds = (DataSource) ic.lookup(dbName);\n\n con = ds.getConnection();\n } catch (Exception ex) {\n throw new EJBException(\"Unable to connect to database. \" + ex.getMessage());\n }\n }", "public boolean testConnection(){\n\t\tboolean connected = false;\n\t\ttry {\t\t\t\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tconnected = true;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t}\n\n\t\treturn connected;\n\t}", "private void getConnection() {\n con = this.dbc.getMySQLConnection();\n Logger.getLogger(SettingImplementation.class.getName()).log(Level.SEVERE, \"Connection Basic >>>>>\" + con);\n }", "public\n Connection getConnection();", "public abstract Connection getConnection(String user, String password) throws SQLException;", "private void getConnection() {\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tconn = DriverManager.getConnection(url, id, pw);\r\n\t\t\tSystem.out.println(\"[접속성공]\");\r\n\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"error: 드라이버 로딩 실패 -\" + e);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error:\" + e);\r\n\t\t}\r\n\r\n\t}", "protected static Connection getConnection() {\r\n\t\t\r\n\t\tSystem.out.print(\"CONSOLE -- ENTROU NA PACKAGE DATA ACCESS OBJECT: getConnection \\n\" ); \r\n\t\t\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\t\tconnection = DriverManager.getConnection(jdbcURL, jdbcUsername, jdbcPassword);\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\t\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn connection;\r\n\t\t\r\n\t}", "private Connection getConnection() throws SQLException{\n return DriverManager.getConnection(\"jdbc:h2:file:./target/db/testdb;MODE=MYSQL\", \"anonymous\", \"\");\n }", "private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }", "public Connection getConnection() throws DBAccessException;", "protected Connection getConnection() throws DAOException {\n\t\ttry {\n\t\t\treturn source.getConnection();\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t}", "@Test\r\n\tpublic void testChooseConnection() throws Exception {\n\t}", "public void testInformixAddressDAO1() throws Exception {\r\n try {\r\n this.removeConfigManagerNS();\r\n new InformixAddressDAO();\r\n fail(\"ConfigurationException expected\");\r\n } catch (ConfigurationException e) {\r\n //good\r\n this.initialConfigManager();\r\n }\r\n }", "private static Connection connect(String url) throws SQLException {\n\ttry {\r\n\t\tDatabaseUtil.loadDatabaseDriver(url);\r\n\t} catch (ClassNotFoundException e) {\r\n\t\tlog.error(\"Could not find JDBC driver class.\", e);\r\n\t\tthrow (SQLException) e.fillInStackTrace();\r\n\t}\r\n\r\n\t// Step 2: Establish the connection to the database.\r\n\tString username = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.username\");\r\n\tString password = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.password\");\r\n\tlog.debug(\"connecting to DATABASE: \" + OpenmrsConstants.DATABASE_NAME\r\n\t\t\t+ \" USERNAME: \" + username + \" URL: \" + url);\r\n\treturn DriverManager.getConnection(url, username, password);\r\n}", "public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "static Connection getDBConnection(){\r\n\t\t if(mainConnection != null)\r\n\t\t\t return mainConnection;\r\n\t\t \r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// loading Oracle Driver\r\n\t\t \t\tSystem.out.print(\"Looking for Oracle's jdbc-odbc driver ... \");\r\n\t\t\t \tDriverManager.registerDriver(new oracle.jdbc.OracleDriver());\r\n\t\t\t \tSystem.out.println(\", Loaded.\");\r\n\r\n\t\t\t\t\tString URL = \"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\t\t \tString userName = \"system\";\r\n\t\t\t \tString password = \"password\";\r\n\r\n\t\t\t \tSystem.out.print(\"Connecting to DB...\");\r\n\t\t\t \tmainConnection = DriverManager.getConnection(URL, userName, password);\r\n\t\t\t \tSystem.out.println(\", Connected!\");\r\n\t\t \t\t}\r\n\t\t \t\tcatch (Exception e)\r\n\t\t \t\t{\r\n\t\t \t\tSystem.out.println( \"Error while connecting to DB: \"+ e.toString() );\r\n\t\t \t\te.printStackTrace();\r\n\t\t \t\tSystem.exit(-1);\r\n\t\t \t\t}\r\n\t\t\t\treturn mainConnection;\r\n\t\t \r\n\t}", "@Test\n public void testGetInstance() {\n System.out.println(\"getInstance\");\n ConnectionManager result = ConnectionManager.getInstance();\n assertNotNull(result);\n assertEquals(instance,result);\n }", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "@Test\r\n public void testSave() throws SQLException{\r\n System.out.println(\"save\");\r\n //when(c.prepareStatement(any(String.class))).thenReturn(stmt);\r\n //mockStatic(DriverManager.class);\r\n //expect(DriverManager.getConnection(\"jdbc:mysql://10.200.64.182:3306/testdb\", \"jacplus\", \"jac567\"))\r\n // .andReturn(c);\r\n //expect(DriverManager.getConnection(null))\r\n // .andReturn(null);\r\n //replay(DriverManager.class);\r\n Title t = new Title();\r\n t.setIsbn(\"888888888888888\");\r\n t.setTitle(\"kkkkkk\");\r\n t.setAuthor(\"aaaa\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.save(t);\r\n assertEquals(expResult, result);\r\n }", "protected void setUp() throws Exception {\r\n super.setUp();\r\n\r\n FailureTestHelper.clearNamespaces();\r\n ConfigManager.getInstance().add(\"DBConnectionFactory_Config.xml\");\r\n\r\n // TODO If real provided should load namespace.\r\n dbConnectionFactory = new DBConnectionFactoryImpl(\"com.topcoder.db.connectionfactory.DBConnectionFactoryImpl\");\r\n\r\n connName = \"informix\";\r\n\r\n idGen = \"DbCompanyDAO\";\r\n\r\n contactManager = (ContactManager) mock(ContactManager.class).proxy();\r\n contactManagerNamspace = ContactManager.class.getName();\r\n addressManager = (AddressManager) mock(AddressManager.class).proxy();\r\n addressManagerNamspace = AddressManager.class.getName();\r\n auditManager = (AuditManager) mock(AuditManager.class).proxy();\r\n auditManagerNamspace = AuditManager.class.getName();\r\n\r\n dbCompanyDAO = new DbCompanyDAO(dbConnectionFactory, connName, idGen, contactManager, addressManager,\r\n auditManager);\r\n }", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public static Connection getConnection() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n\n String url = \"jdbc:mysql://localhost:3306/test_log?useTimezone=true&serverTimezone=UTC\";\n String username = \"root\";\n String password = \"toor\";\n\n return DriverManager.getConnection(url, username, password);\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException();\n }\n }", "Connection createConnection();", "protected Connection getConnection() {\n String url = \"jdbc:oracle:thin:@localhost:32118:xe\";\n String username = \"JANWILLEM2\";\n String password = \"JANWILLEM2\";\n\n if (myConnection == null) {\n try {\n myConnection = DriverManager.getConnection(url, username, password);\n } catch (Exception exc) {\n exc.printStackTrace();\n }\n }\n\n return myConnection;\n }", "private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }", "protected Connection getConnection() throws EJBException {\n try {\n Context jndi = new InitialContext();\n DataSource ds = (DataSource) jndi.lookup(\"java:comp/env/jdbc/TestDatabase\");\n return ds.getConnection();\n\n } catch (NamingException e) {\n throw new EJBException(\"Error getting datasource from JNDI\", e);\n\n } catch (SQLException e) {\n throw new EJBException(\"Error getting connection from datasource\", e);\n }\n }", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "public void testConnect() {\n\t\tConnection con = SQLUtilities.connect();\n\t\tResultSet set = SQLUtilities.executeSQL(\"SELECT * FROM TBL\", con);\n\t\t\n\t\ttry {\n\t\t\tset.last();\n\t\t\tint indx = set.getRow();\n\t\t\tSystem.out.println(indx);\n\t\t} catch (SQLException e) {\n\t\t\tfail();\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSQLUtilities.disconnect(con);\n\t\tassertEquals(true,true);\n\n\t}", "@Test\n public void testGetSdsConnection() {\n System.out.println(\"getSdsConnection\");\n SDSconnection expResult = null;\n SDSconnection result = instance.getSdsConnection();\n assertEquals(expResult, result);\n }", "private void initConnection() throws DatabaseAccessException {\n\t\ttry {\n\t\t\tthis.connection = DriverManager.getConnection(this.driver + \":\" + this.path);\n\n\t\t} catch (SQLException e) {\n\t\t\t// unable to create the connection; access error\n\t\t\tthrow new DatabaseAccessException(Failure.CONNECTION);\n\t\t}\n\t}", "@Test\r\n\tpublic void testAddConnection() throws Exception {\n\t}", "@Test\n public void testRegister_connectionException() throws SQLException {\n SignUpRequest request = new SignUpRequest(UNIQUE, PASSWORD);\n\n doThrow(SQLException.class).when(connection).register(request);\n\n dao.register(request);\n\n verify(controller).connectionFailed();\n }", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "AddressDao getAddressDao();", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "private static Connection newConnection() throws SQLException {\n\t\tOracleDataSource ods = new OracleDataSource();\n\t\tods.setURL(dburl);\n\t\tConnection conn = ods.getConnection();\n\t\treturn conn;\n\t}", "public static void setUpConnection()\n\t{\n\t\ttry{\n\t\t\t//The information necessary to create a connection to the database, need to figure out what this will be\n\t\n\t\t\n\t\t\t// Register driver by finding the class that corresponds do it \n\t\t\tString driverName = \"oracle.jdbc.OracleDriver\"; \n\t\t\tClass.forName(driverName);\n\t\t\n\t\t\tconn = DriverManager.getConnection(URL, USR, PWD);\n\t\t\n\t\t\tSystem.out.println(\"Connected to C325.\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void testInformixAddressDAO2() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"unknown namespace\");\r\n fail(\"ConfigurationException expected\");\r\n } catch (ConfigurationException e) {\r\n //good\r\n }\r\n }", "private static Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\n Config.getProperty(Config.DB_URL),\n Config.getProperty(Config.DB_LOGIN),\n Config.getProperty(Config.DB_PASSWORD)\n );\n }", "protected Connection getConnection()\n {\n Connection connection = null;\n try\n {\n connection = DriverManager.getConnection(url, user, password);\n }\n catch (SQLException ex)\n {\n Logger.getLogger(DB_Utils.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private static Connection getConnection()\n {\n Connection con = null;\n String url = \"jdbc:mysql://localhost/airlines?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\";\n String user = \"root\";\n String pw = \"npass\";\n try {\n con = DriverManager.getConnection(url, user, pw);\n }\n catch (SQLException e) {\n e.printStackTrace();\n }\n return con;\n }", "@Test\n public void testAddConnection() throws Exception {\n System.out.println(\"addConnection\");\n instance.addConnection(testConnection);\n assertEquals(1, instance.getStoredConnections().size());\n }", "abstract public boolean createConnection(String database);", "private Connection connect(String dbName) {\r\n\t\tString url = \"jdbc:sqlite:\" + dbName; // dbName is looked in project folder\r\n\t\tConnection conn = null;\r\n\t\ttry {\r\n\t\t\t// create a connection to the db\r\n\t\t\tconn = DriverManager.getConnection(url);\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace(System.out);\t\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "InstrumentedConnection getConnection();", "public RemoteSiteDAO () throws Exception {\r\n\t\tconn = DatabaseConnection.connect();\r\n\t}", "public RouteDAO() {\n\t\tconn = DBConnection.getConnection();\n\t}", "private void connectDatabase(){\n }", "public void testInformixAddressDAO3() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"unknown namespace\", null);\r\n fail(\"ConfigurationException expected\");\r\n } catch (ConfigurationException e) {\r\n //good\r\n }\r\n }", "abstract public boolean createConnection();", "public static Connection getConnection() {\n Connection conn = null;\n\n try {\n DataSource dataSource = (DataSource) new InitialContext().lookup(\"jdbc/library\");\n conn = dataSource.getConnection();\n } catch (SQLException | NamingException e) {\n LOG.error(e.getMessage(), e);\n }\n return conn;\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n DBUtil.close((Connection) jdbcConnection0);\n assertFalse(jdbcConnection0.isClosed());\n }", "protected void setUp() throws Exception {\r\n\t\tmodelDS = new ServiceModelDS(\"dbtest\",\"pizzeria_service\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/dbtest\", \"root\", \"\");\r\n\t\tconnection.setAutoCommit(false);\r\n\t}", "private synchronized Connection getConnection() throws SQLException {\n return datasource.getConnection();\r\n }", "public static Connection getDBConnection(){\n\t\tConnection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t/*InputStream is = DBConfig.class.getClass().\r\n\t\t\t\t\tgetResourceAsStream(\"/resources/db.properties\");\r\n\t\t\tprop.load(is);\r\n\t\t\tClass.forName(prop.getProperty(\"drivername\"));\r\n\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"jdbcurl\"),\r\n\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));*/\r\n\t\t\t\r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:orcl\",\"fred\",\"flintstone\");\r\n\t\t\t/*Statement stmt = conn.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT LOCATION_NAME FROM LOCATIONS\");\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tSystem.out.println(rs.getString(\"LOCATION_NAME\"));\r\n\t\t\t}*/\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} /*catch (FileNotFoundException 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\t\r\n\t\treturn conn;\r\n\t}", "String getConnection();", "String getConnection();", "String getConnection();", "String getConnection();", "void createConnection();", "public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}", "public static void testConnection() throws SerializeException, IOException {\n // コネクション設定\n String configFileName = \"/ormappingtool.xml\";\n ORmappingToolConfig config = SerializeUtils.bytesToObject(TestCommon.class.getResourceAsStream(configFileName), ORmappingToolConfig.class);\n config.getConnectionConfig().convURL();\n ConnectionManager.getInstance().addConnectionConfig(config.getConnectionConfig());\n }", "public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}", "private Connection getConnection() {\n if ( conn==null ) {\n conn = Util.getConnection( \"root\", \"\" );\n }\n return conn;\n }", "private DBConnection() \n {\n initConnection();\n }", "@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(dataSource.getClass());\n\n\t\t// 获得连接\n\t\t/*\n\t\t 异常:\n\t\t \tThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\n\t\t */\n\t\tConnection connection = dataSource.getConnection();\n\n\t\tSystem.out.println(connection);\n\n\t\t// 关闭\n\t\tconnection.close();\n\t}", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }" ]
[ "0.7301716", "0.7233608", "0.6997072", "0.6874423", "0.67940384", "0.6729704", "0.6692103", "0.6591733", "0.6533495", "0.6495106", "0.64676", "0.64583015", "0.63758457", "0.6365762", "0.63252604", "0.62590533", "0.614767", "0.61442673", "0.6125552", "0.6109974", "0.6109974", "0.60826594", "0.6062203", "0.60564667", "0.60527235", "0.60056144", "0.60041165", "0.60012615", "0.59920645", "0.5972537", "0.5965067", "0.59530586", "0.5952087", "0.59441596", "0.59399456", "0.5935461", "0.5934013", "0.59292376", "0.59239215", "0.5919358", "0.5915379", "0.59149975", "0.5908459", "0.58802295", "0.5867403", "0.5865474", "0.58643514", "0.58591765", "0.58492243", "0.5824205", "0.5824205", "0.5824205", "0.58148444", "0.5814806", "0.5811901", "0.5801259", "0.5797614", "0.5795604", "0.5790297", "0.5785619", "0.577802", "0.5775461", "0.5771778", "0.5770576", "0.5760738", "0.57603586", "0.5760018", "0.57502586", "0.57394695", "0.5739177", "0.5736247", "0.5734166", "0.57322085", "0.5729441", "0.5711097", "0.5710631", "0.5701492", "0.5700549", "0.56993186", "0.5699129", "0.568404", "0.5682301", "0.5681241", "0.56789017", "0.5676778", "0.56731695", "0.56626093", "0.56619465", "0.5655935", "0.5655935", "0.5655935", "0.5655935", "0.5653885", "0.5645361", "0.56378305", "0.56230104", "0.56198573", "0.56186163", "0.5614597", "0.561278" ]
0.704638
2
Test of registerAddress method, of class AddressDAO.
@Test public void testRegisterAddress() { System.out.println("registerAddress"); Address morada = new Address("dra","333","Porto"); boolean expResult = true; boolean result = instance.registerAddress(morada); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "@Test\r\n public void testRegister1() throws Exception {\r\n String employee_account = System.currentTimeMillis() + \"\";\r\n String employee_name = \"XiaoBo\";\r\n int department_id = 1;\r\n int position_id = 1;\r\n String password = \"admin\";\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n int expResult = 1;\r\n Employee result = instance.register(employee_account, employee_name, department_id, position_id, password, status, date);\r\n assertTrue(expResult <= result.getEmployee_id());\r\n }", "public void testAddAddress5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getState().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public int insert(Address address) throws Exception;", "@Test\n public void testNewAddress() {\n System.out.println(\"newAddress\");\n String rua = \"felicia\";\n String codigoPostal = \"1211\";\n String localidade = \"Mancelos\";\n Object result = instance.newAddress(rua, codigoPostal, localidade);\n assertTrue(result instanceof Address);\n }", "public void testAddAddress_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "public void testAddAddress2() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationUser(null);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "@Test\n public void testInsertNew() {\n System.out.println(\"insertNew\");\n Address obj = new Address(\"tregi\",\"333\",\"Porto\");;\n boolean expResult = true;\n boolean result = instance.insertNew(obj);\n assertEquals(expResult, result);\n }", "@Override\r\n\tpublic boolean insertAddress(Map<String, String> address) {\n\t\treturn ado.insertAddress(address);\r\n\t}", "public void testAddAddresses() throws Exception {\r\n try {\r\n this.dao.addAddresses(new Address[]{null}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Override\r\n\tpublic void insert(Address obj) {\r\n\t\tValidationReturn validation = validator.insert(obj);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\t\r\n\t\tString collumsToInsert = \"street, district, number\";\r\n\t\tString valuesToInsert = \"'\" + obj.getStreet() + \"','\" + obj.getDistrict() + \"',\" + obj.getNumber();\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty()) {\r\n\t\t\tcollumsToInsert += \", note\";\r\n\t\t\tvaluesToInsert += (\",'\" + obj.getNote() + \"'\");\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBCModel.singleCall(\"INSERT INTO address (\" + collumsToInsert + \") VALUES (\" + valuesToInsert + \");\");\r\n\t}", "public void testAddAddress_PersistenceException()\r\n throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(10);\r\n this.dao.addAddress(address, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public void testupdateAddress1() throws Exception {\r\n try {\r\n this.dao.updateAddress(null, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testAddAddress3() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setModificationUser(null);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testSetAddress() {\n System.out.println(\"setAddress\");\n user.setAddress(\"Tiquipaya\");\n assertEquals(\"Tiquipaya\", user.getAddress());\n }", "public void testAddAddress_IDGenerationException()\r\n throws Exception {\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 1);\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n fail(\"IDGenerationException expected\");\r\n } catch (IDGenerationException e) {\r\n //good\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 0);\r\n }\r\n }", "@Override\n\tpublic int addAddress(Address address) {\n\t\treturn sqlSessionTemplate.insert(sqlId(\"addFullAddress\"),address);\n\t}", "@Test\n public void address1Test() {\n // TODO: test address1\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddress() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "public void testRegisterNewAuthor() {\r\n //given\r\n /*System.out.println(\"registerNewAuthor\"); \r\n String name = \"James Fenimore\";\r\n String surname = \"Cooper\";\r\n int birthYear = 1789;\r\n int deathYear = 1851;\r\n String shortDescription = \"One of the most popular american novelists\";\r\n String referencePage = \"http://en.wikipedia.org/wiki/James_Fenimore_Cooper\";\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n boolean expResult = true;\r\n \r\n //when\r\n boolean result = instance.registerNewAuthor(name, surname, birthYear, deathYear, shortDescription, referencePage);\r\n \r\n //then\r\n assertEquals(expResult, result);*/ \r\n }", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }", "public boolean addAddress(AddressDTO address) throws RetailerException, ConnectException {\n\t\tboolean addAddressState = address.isAddressStatus();\n\t\tString addressID = address.getAddressId();\n\t\tString retailerID = address.getRetailerId();\n\t\tString city = address.getCity();\n\t\tString state = address.getState();\n\t\tString zip = address.getZip();\n\t\tString buildingNum = address.getBuildingNo();\n\t\tString country = address.getCountry();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tconnection = DbConnection.getInstance().getConnection();\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\tgoProps = PropertiesLoader.loadProperties(GO_PROPERTIES_FILE);\n\n\t\t\tPreparedStatement statement = connection.prepareStatement(QuerryMapper.INSERT_NEW_ADDRESS_IN_ADDRESSDB);\n\t\t\tstatement.setString(1, addressID);\n\t\t\tstatement.setString(2, retailerID);\n\t\t\tstatement.setString(3, city);\n\t\t\tstatement.setString(4, state);\n\t\t\tstatement.setString(5, zip);\n\t\t\tstatement.setString(6, buildingNum);\n\t\t\tstatement.setString(7, country);\n\t\t\tstatement.setBoolean(8, addAddressState);\n\t\t\tint row = statement.executeUpdate();\n\t\t\tif (row == 1)\n\t\t\t\treturn true;\n\t\t} catch (DatabaseException | IOException | SQLException e)// SQLException\n\t\t{\n\t\t\tGoLog.logger.error(exceptionProps.getProperty(EXCEPTION_PROPERTIES_FILE));\n\t\t\tthrow new RetailerException(\".....\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new ConnectException(Constants.connectionError);\n\t\t\t}\n\t\t}\n\n\t\treturn addAddressState;\n\t}", "public void testAddAddresses_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "public void testupdateAddress_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "@Test\n public void testUpdateAddress() {\n System.out.println(\"updateAddress\");\n String address = \"Sortegade 10\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateAddress(customerID, address);\n assertEquals(\"Sortegade 10\", instance.getCustomer(customerID).getAddress());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n\tvoid testSetAddress() {\n\t\tassertNull(this.customer.getAddress());\n\t\t\n\t\t//sets address for customer\n\t\tthis.customer.setAddress(\"Brooklyn, NY\");\n\t\t\n\t\t//checks that address was set correctly\n\t\tassertEquals(\"Brooklyn, NY\", this.customer.getAddress());\n\t\t\n\t\t//reset address for customer\n\t\tthis.customer.setAddress(\"Cranston, RI\");\n\t\t\n\t\t//checks that address was reset correctly\n\t\tassertEquals(\"Cranston, RI\", this.customer.getAddress());\n\t}", "@Test\n public void testPersistAndLoadAddress() {\n \t//need instances of these classes\n\t Address address = new Address();\n\t User user = new User();\n\t Cart cart = new Cart();\n\t \n\t \n\t //parameters for address\n\t String city = \"city\";\n\t String country = \"country\";\n\t String postalCode = \"postalCode\";\n\t String province = \"province\";\n\t String street1 = \"street1\";\n\t String street2 = \"street2\";\n\t //Integer addressID = \"TESTaddressID\".hashCode();\n\t \n\t \n\t //parameters for user\n\t String username = \"testUser20\";\n\t String password = \"passW0rd\";\n\t String email = \"[email protected]\";\n\t String profilePicURL = \"//yes.com/img.jpg\";\n\t Set<Address> addrs= new HashSet<>();\n\t \taddrs.add(address);\n\t Set<Artwork> artworks= new HashSet<>();\n\t Set<Order> orders= new HashSet<>();\n\t \t\n\t \t\n\t //parameters for cart\n\t //Integer cartID = \"TESTcartID\".hashCode();\n\t double totalCost = 100.1;\n\t \n\t //set address parameters\n\t address.setCity(city);\n\t address.setCountry(country);\n\t address.setPostalCode(postalCode);\n\t address.setProvince(province);\n\t address.setStreetAddress1(street1);\n\t address.setStreetAddress2(street2);\n\t //address.setAddressID(addressID);\n\t address.setUser(user);\n\t \n\t \n\t //set user parameters\n\t user.setUsername(username);\n\t user.setPassword(password);\n\t user.setEmail(email);\n\t user.setProfilePictureURL(profilePicURL);\n\t user.setCart(cart);\n\t user.setAddress(addrs);\n\t user.setOrder(orders);\n\t user.setArtwork(artworks);\n\t \n\t \n\t //set cart parameters\n\t //cart.setCartID(cartID);\n\t cart.setTotalCost(totalCost);\n\t cart.setUser(user);\n\t \n\t //save instances to database \n\t user = userRepository.save(user);\n\t //cart.setUser(user);\n\t //cart = cartRepository.save(cart);\n\t address = addressRepository.save(address);\n\n //restore address instance from database\n Address addressPersisted = addressRepository.findAddressByAddressID(address.getAddressID());\n\n //assert if instance retrieved from database equals the original\n assertEquals(address.getAddressID(), addressPersisted.getAddressID());//address.equals(addressPersisted));\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\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\n public void testIsValidAddress() {\n System.out.println(\"isValidAddress\");\n String address = \"Trion Ierarxon 86, Larissa\";\n boolean expResult = true;\n boolean result = ValidVariables.isValidAddress(address);\n assertEquals(expResult, result);\n }", "public Address createAddress(String address);", "public void save(Address entity);", "public void saveNewAddress(Address addr) throws BackendException;", "@Test\n public void testGetAdressByID() throws Exception {\n System.out.println(\"getAdressByID\");\n int adressID = 0;\n String result = instance.getAdressByID(adressID);\n assertTrue(!result.isEmpty());\n \n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "public void testupdateAddresses_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "int insert(Addresses record);", "abstract public Address createAddress(String addr);", "@Test\n void testSuccess_saveAndLoadStreetLines() {\n assertAddress(saveAndLoad(entity).address, \"123 W 14th St\", \"8th Fl\", \"Rm 8\");\n }", "@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}", "@Test\n public void testEmergencyAddress() {\n // TODO: test EmergencyAddress\n }", "public void testupdateAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public void addAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO contact_info (`person_id`, `contact_date`, `address_line_1`, `address_line_2`, `city`, `state`, `country`, `zipcode`) values (?, curdate(), ?, ?, ?, ?, ?, ?)\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t //stmt.setDate(2, new java.sql.Date(DateUtility.getDateObj(address.getContactDate()).getTime()));\n\t\t stmt.setString(2, address.getAddress1());\n\t\t stmt.setString(3, address.getAddress2());\n\t\t stmt.setString(4, address.getCity());\n\t\t stmt.setString(5, address.getState());\n\t\t stmt.setString(6, address.getCountry());\n\t\t stmt.setString(7, address.getZip());\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t // Interaction with Other Two Tables \n\t\t addPhoneNumber(address);\n\t\t addEmailAddress(address);\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Override\n\t@Transactional(propagation = Propagation.REQUIRED,\n\t\t isolation = Isolation.DEFAULT)\n\tpublic void regUser(Employee usr, Address address) throws HibernateException {\n\t\tdao.regUser(usr, address);\n\t}", "@Test\n\tpublic void addRegistrationDetails() {\n\t\tRegistrationDetails registrationDetailsForHappyPath = RegistrationHelper.getRegistrationDetailsForHappyPath();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tRegistrationDetails addRegistrationDetails = registrationDAO\n\t\t\t\t\t.addRegistrationDetails(registrationDetailsForHappyPath);\n\t\t\tem.getTransaction().commit();\n\t\t\tassertTrue(addRegistrationDetails.getId() != 0l);\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t}", "AddressDao getAddressDao();", "void setAddressDao(final AddressDao addressDao);", "public void testupdateAddress_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddress(address, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test( dataProvider=\"AddressValidationTestData\", groups ={\"BillingAddressValidations\"})\r\n\r\n\tpublic static void AddNewBillingAddress(String[] BillingAddressDetailsInArray){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tAssert.assertEquals( launchAndValidateDifferentBillingAddresses(BillingAddressDetailsInArray) ,true) ;\t\t\t\t\r\n\t\t\tWaitUtil.waitFor(Driver,\"THREAD_SLEEP\", (long)200);\t\r\n\t\t\tAssert.assertEquals(new FrontEndCommonPage(Driver).logout(),true) ;\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch ( TestException Te)\r\n\t\t{\r\n\t\t\tTestLog.logTestStep(\"Error/Exception : \" + Te.getExceptionName());\r\n\t\t\tTe.printException();\r\n\t\t\tassert(false);\r\n\t\t}\t\t\r\n\t\tcatch (InterruptedException e){\r\n\t\t\t//do nothing\t\t\r\n\t\t}\r\n\t\tcatch ( Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tTestLog.logTestStep(\"Error/Exception \" + e.getMessage());\r\n\t\t\tassert(false) ;\r\n\t\t}\t\t\r\n\t}", "public void testassociate5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationUser(null);\r\n this.dao.associate(address, 1, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testGetCoordinatesByAddressID() throws Exception {\n System.out.println(\"getCoordinatesByAddressID\");\n int adressID = 0;\n String result = instance.getCoordinatesByAddressID(adressID);\n assertTrue(!result.isEmpty());\n }", "public void testupdateAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public boolean addAddress(Address address) {\n\t\tList<Address> addresslist = addressdao.findByUserUId(address.getUser().getId());\r\n\t\tif(addresslist.size() == 0){\r\n\t\t\taddressdao.save(address);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "public void testAddAddresses_IDGenerationException()\r\n throws Exception {\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 1);\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, false);\r\n fail(\"IDGenerationException expected\");\r\n } catch (IDGenerationException e) {\r\n //good\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 0);\r\n }\r\n }", "public void testupdateAddresses_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddresses(new Address[]{address}, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public void testassociate_PersistenceException() throws Exception {\r\n Address address = this.getAddress();\r\n address.setId(1);\r\n address.setCreationDate(new Date());\r\n address.setModificationDate(new Date());\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").associate(address, 1, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test\n public void getAddress() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getAddress(), address);\n }", "@Test\n public void testRegisterSuccessfully() {\n SignUpRequest request = new SignUpRequest(UNIQUE, \"Secret\");\n\n dao.register(request);\n\n verify(controller).registered();\n }", "Address createAddress();", "int insert(AddressMinBalanceBean record);", "public void insertReservation(TestDto testDto) throws Exception;", "public void testSearchAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.searchAddresses(AddressFilterFactory.createCreatedByFilter(\"user\"));\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public void testassociate2() throws Exception {\r\n try {\r\n this.dao.associate(new Address(), -1, true);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testassociate4() throws Exception {\r\n try {\r\n Address address = new Address();\r\n address.setId(1);\r\n this.dao.associate(address, 1, true);\r\n fail(\"InvalidPropertyException expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testassociate3() throws Exception {\r\n try {\r\n Address address = new Address();\r\n this.dao.associate(address, 1, true);\r\n fail(\"InvalidPropertyException expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void iPAddressPostTest() throws Exception {\n String value = null;\n GeolocateResponse response = api.iPAddressPost(value);\n\n // TODO: test validations\n }", "public void testRemoveAddress() throws Exception {\r\n try {\r\n this.dao.removeAddress(-1, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testassociate7() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setModificationDate(new Date());\r\n address.setCreationDate(null);\r\n this.dao.associate(address, 1, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionEditAddressApprove() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n currentAddress.setZipCode(\"12345\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Test\n public void testSetAddress() {\n System.out.println(\"setAddress\");\n Member instance = member;\n \n String address = \"10 New Road, Hackney, London\";\n instance.setAddress(address);\n \n String expResult = address;\n String result = instance.getAddress();\n \n assertEquals(expResult,result);\n }", "@Override\r\n\tpublic UserAddress addUserAddress(UserAddress address) throws AddressNotFoundException, ValidateAddressException {\r\n\t\t\tvalidateAddress(address);\r\n\t\treturn useraddressrepository.save(address);\r\n\t\t}", "public boolean addVendorAddress(VendorAddress vaddress);", "public static void fillUpAddAddress() throws Exception {\n\t\tString fName = Generic.ReadRandomCellData(\"Names\");\n\t\tString lName = Generic.ReadRandomCellData(\"Names\");\n\n\t\tString email = Generic.ReadFromExcel(\"Email\", \"LoginDetails\", 1);\n\t\tString mobileNum = Generic.ReadFromExcel(\"GCashNum\", \"LoginDetails\", 1);\n\t\ttry {\n\n\t\t\tsendKeys(\"CreateAccount\", \"FirstName\", fName);\n\n\t\t\tclickByLocation(\"42,783,1038,954\");\n\t\t\tenterTextByKeyCodeEvent(lName);\n\n//\t\t\tsendKeys(\"CreateAccount\", \"UnitNo\", Generic.ReadFromExcel(\"UnitNo\", \"LoginDetails\", 1));\n//\t\t\tsendKeys(\"CreateAccount\", \"StreetNo\", Generic.ReadFromExcel(\"StreetName\", \"LoginDetails\", 1));\n\t\t\tAddAddress(1);\n\t\t\tThread.sleep(2000);\n\t\t\tsendKeys(\"CreateAccount\", \"Email\", email);\n\t\t\tThread.sleep(2000);\n\t\t\tsendKeys(\"CreateAccount\", \"MobileNumber\", mobileNum);\n\t\t\tControl.takeScreenshot();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public interface IAddressDao {\n\n long save(Address address) throws DaoException;\n\n void update(Address address) throws DaoException;\n\n Address getAddressByContactId(long contactId) throws DaoException;\n\n}", "public void addPhoneNumber(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO phone_number_info (`person_id`, `phone_number`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setInt(2,Integer.parseInt(address.getPhoneNumber()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setPhoneNumberId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Phone Number Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public void addEmailAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO email_id_info (`person_id`, `email_id`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setString(2,address.getEmailAddress());\n\t\t \n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setEmailAddressId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Emaail Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }", "public void SetCheckoutRegistrationaddress(String address){\r\n\t\tString Address = getValue(address);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Registration Address should be entered as \"+Address);\r\n\t\ttry{\r\n\r\n\t\t\tsendKeys(locator_split(\"txtcheckoutregistrationaddress\"),Address);\r\n\t\t\tSystem.out.println(\"Registration Address is entered as \"+Address);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Registration Address is entered as \"+Address);\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Registration Address is not entered\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtcheckoutregistrationaddress\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "public void setAddress(String address) { this.address = address; }", "public void testassociate8() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setModificationDate(new Date());\r\n address.setModificationDate(null);\r\n this.dao.associate(address, 1, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\r\n\t\tpublic void insertUserTestCase() {\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\t\t\t\r\n\t\t//\tuser.setBirthDate(LocalDate.parse(\"1994-04-09\"));\r\n\t\t\tuser.setUsername(\"renu\");\r\n\t\t//\tuser.setUserId(1003);\r\n\t\t\t\r\n\t\t\tuser.setEmail(\"[email protected]\");\r\n\t\t\t\t\t\r\n\t\t\tuser.setFirstname(\"Renu\");\r\n\t\t\tuser.setSurname(\"Rawat\");\r\n\t\t//\tuser.setGender('F');\r\n\t\t\tuser.setPassword(\"renu\");\r\n\t\t\tuser.setPhone(\"9876543210\");\r\n\t\t//\tuser.setStatus(\"A\");\r\n\t\t\tuser.setIsOnline(false);\r\n\t\t\t\r\n\t\t\tuser.setRole(\"ADMIN\");\r\n\t\t//\tuser.setConfmemail(\"[email protected]\");\r\n\t\t//\tuser.setConfpassword(\"renu\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"user printed\");\r\n\t\t\tassertEquals(\"successfully!\", Boolean.valueOf(true), userDao.registerUser(user));\r\n\t\t\tSystem.out.println(\"After User Table\");\r\n\t\t\t\r\n\t}", "@Test\n @InSequence(1)\n public void testRegister(){\n Customer customer = createCustomerInstance(\"Jane Doe\", \"[email protected]\", \"07744754955\");\n //Customer customer = storeCustomer(customer0);\n Taxi taxi0 = createTaxiInstance(\"JK66AKB\",6);\n Taxi taxi = storeTaxi(taxi0);\n //create a GuestBooking with a future date.\n GuestBooking guestBooking = createGuestBookingInstance(customer, taxi.getId(), futureDate1);\n Response response = guestBookingRestService.createBooking(guestBooking);\n\n assertEquals(\"Unexpected response status\", 201, response.getStatus());\n log.info(\" New booking via GuestBookingService.createBooking was persisted and returned status \" + response.getStatus());\n }", "@Test\r\n\tvoid testContactServiceAddUniqueContact() {\r\n\t\tassertTrue(contactService.getContactFirstName(id).equals(firstName));\r\n\t\tassertTrue(contactService.getContactLastName(id).equals(lastName));\r\n\t\tassertTrue(contactService.getContactPhone(id).equals(phone));\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(address));\r\n\t}", "@Test\n\tpublic void displayAddressTest() {\n\t\tassertNotNull(\"Address is not null\", instance.displayAddress());\n\t}", "@Test\n public void testCustomerToDatabase() throws Exception {\n \twhen(customerService.saveOrUpdate(TEST_CUSTOMER_50)).thenReturn(TEST_CUSTOMER_50);\n \t\n MockEndpoint mock = getMockEndpoint(MOCK_RESULT);\n \n mock.expectedMessageCount(1);\n mock.expectedBodiesReceived(TEST_CUSTOMER_50);\n\n template.sendBody(DIRECT_ADD_CUSTOMER, TEST_CUSTOMER_50);\n \n // assert expectations\n assertMockEndpointsSatisfied();\n \n verify(customerService, times(1)).saveOrUpdate(TEST_CUSTOMER_50);\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Before\n public void setup() {\n MockitoAnnotations.initMocks(this);\n final AddressEndpoint addressEndpoint = new AddressEndpoint(addressRepository);\n this.mockAddressEndpoint = MockMvcBuilders.standaloneSetup(addressEndpoint).build();\n\n address01 = new Address(\"Procession St\", \"Paris\", \"75015\", \"FR\");\n address02 = new Address(\"Ritherdon Rd\", \"London\", \"8QE\", \"UK\");\n address03 = new Address(\"Inacio Alfama\", \"Lisbon\", \"A54\", \"PT\");\n address04 = new Address(\"Jardins\", \"Sao Paulo\", \"345678\", \"BR\");\n address05 = new Address(\"Coffey\", \"Perth\", \"654F543\", \"AU\");\n address06 = new Address(\"Harbour Bridge\", \"Sydney\", \"JHG3\", \"AU\");\n address07 = new Address(\"Playa de la Concha\", \"San Sebastian\", \"45678\", \"ES\");\n\n // Persist the object\n addressRepository.save(address01);\n addressRepository.save(address02);\n addressRepository.save(address03);\n addressRepository.save(address04);\n addressRepository.save(address05);\n addressRepository.save(address06);\n addressRepository.save(address07);\n }", "void setAddress(String address) throws IllegalArgumentException;", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "@Test\n public void savePlaces() {\n Assert.assertTrue(places.size() > 0);\n\n // save mock place\n boolean result = mDbHelper.savePlaces(Realm.getInstance(testConfig), places);\n\n // check result\n Assert.assertTrue(result);\n }", "@Test\n public void sipAddressTest() {\n // TODO: test sipAddress\n }" ]
[ "0.69637406", "0.68575776", "0.6693415", "0.66338974", "0.6617258", "0.6610323", "0.6604365", "0.65278506", "0.6502006", "0.6471387", "0.64564174", "0.6446624", "0.6437999", "0.64149517", "0.63778186", "0.6363113", "0.6317951", "0.6283609", "0.62754524", "0.62548316", "0.62500036", "0.6237162", "0.62305576", "0.62304544", "0.6206152", "0.6188921", "0.61884564", "0.61706495", "0.6158776", "0.61423653", "0.61391073", "0.6116983", "0.6116218", "0.6113061", "0.60987025", "0.6074812", "0.6067517", "0.606084", "0.6060599", "0.6055578", "0.604779", "0.60229474", "0.6022786", "0.60144573", "0.6014423", "0.60140765", "0.6012269", "0.6008089", "0.59988976", "0.59973156", "0.5996452", "0.5992407", "0.5992088", "0.5980067", "0.59707284", "0.5968362", "0.59651655", "0.59561193", "0.59480065", "0.5946304", "0.5945201", "0.5943651", "0.59413195", "0.5938933", "0.5931611", "0.59286517", "0.59195375", "0.5897566", "0.5893874", "0.5879668", "0.587266", "0.5862187", "0.58564895", "0.5839984", "0.58394635", "0.5826414", "0.5823358", "0.58222234", "0.5818803", "0.58186233", "0.581536", "0.58118975", "0.5811442", "0.5807605", "0.5799627", "0.5794444", "0.57905686", "0.57901496", "0.5788186", "0.57843685", "0.5783262", "0.57780635", "0.5777686", "0.5770082", "0.57699835", "0.57699835", "0.57699835", "0.57699835", "0.5767218", "0.5758744" ]
0.7763956
0
Test of getAdressByID method, of class AddressDAO.
@Test public void testGetAdressByID() throws Exception { System.out.println("getAdressByID"); int adressID = 0; String result = instance.getAdressByID(adressID); assertTrue(!result.isEmpty()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetCoordinatesByAddressID() throws Exception {\n System.out.println(\"getCoordinatesByAddressID\");\n int adressID = 0;\n String result = instance.getCoordinatesByAddressID(adressID);\n assertTrue(!result.isEmpty());\n }", "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "@Override\r\n\tpublic Adress findAdressById(Long id) {\n\t\treturn em.find(Adress.class, id);\r\n\t}", "public Address getAddressById(long addressid) {\n\t\treturn addressdao.findOne(addressid);\r\n\t}", "@Override\r\n\tpublic Address findById(Integer id) {\r\n\t\tValidationReturn validation = validator.findById(id);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\t\r\n\t\tResultSet item = DAOJDBCModel.singleCallReturn(\"SELECT * FROM address WHERE id='\" + id + \"';\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (item != null) {\r\n\t\t\t\treturn new Address(item.getInt(\"id\"), item.getString(\"street\"), item.getString(\"district\"),\r\n\t\t\t\t\t\titem.getInt(\"number\"), item.getString(\"note\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}", "public void testFindAuthorByID() {\r\n //given\r\n System.out.println(\"findAuthorByID\");\r\n int authorID = 18;\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n \r\n //when\r\n Author result = instance.findAuthorByID(authorID);\r\n \r\n //then\r\n assertEquals(\"Maksim Gorky\", result.getName()); \r\n }", "@Override\n\tpublic Address getAddressById(int id) {\n\t\treturn sqlSessionTemplate.selectOne(sqlId(\"getAddressById\"),id);\n\t}", "@Override\n\tpublic Adresse getAdresse(int idAdresse) {\n\t\treturn dao.getAdresse(idAdresse);\n\t}", "AddressDao getAddressDao();", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }", "public static Address get(Integer id) throws SQLException, Exception {\n\n String sql = \"SELECT * FROM address WHERE (id=? AND enabled=?)\";\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result = null;\n try {\n //Opens a connection to the DB\n con = ConnectionUtils.getConnection();\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql);\n\n stmt.setInt(1, id);\n stmt.setBoolean(2, true);\n\n result = stmt.executeQuery();\n\n if (result.next()) {\n\n // Create a Address instance and population with BD values\n Address address = new Address();\n\n address.setId(result.getInt(\"id\"));\n PublicPlaceType publicPlaceType = DAOPublicPlaceType.get(result.getInt(\"publicplace_type_id\"));\n address.setPublicPlaceType(publicPlaceType);\n City city = DAOCity.get(result.getInt(\"city_id\"));\n address.setCity(city);\n address.setPublicPlace(result.getString(\"publicplace\"));\n address.setNumber(result.getInt(\"number\"));\n address.setComplement(result.getString(\"complement\"));\n address.setDistrict(result.getString(\"district\"));\n address.setZipcode(result.getInt(\"zipcode\"));\n\n return address;\n }\n } finally {\n ConnectionUtils.finalize(result, stmt, con);\n }\n\n return null;\n }", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "@Test\n public void testGet() {\n System.out.println(\"get\");\n int id = 0;\n Address result = instance.get(id);\n assertTrue(result.validate());\n \n }", "@Override\n\tpublic Adresse affichageAdresse(int idAdresse) {\n\t\treturn dao.affichageAdresse(idAdresse);\n\t}", "@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "public Integer getAddressId() {\n return addressId;\n }", "@Test\n public void testSelectById() {\n disciplineTest = disciplineDao.selectById(1);\n boolean result = disciplineTest.getId() == 1;\n assertTrue(result);\n }", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\r\n public void testSelectById() {\r\n System.out.println(\"selectById\");\r\n int id = 1;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent result = instance.selectById(id);\r\n assertTrue(result!=null && result.getId()==id);\r\n }", "@Test\n void getByID() {\n Role role = (Role) roleDAO.getByID(1);\n assertEquals(\"Nerf Herder\", role.getRoleName());\n }", "public interface IAddressDao {\n\n long save(Address address) throws DaoException;\n\n void update(Address address) throws DaoException;\n\n Address getAddressByContactId(long contactId) throws DaoException;\n\n}", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "public void setAddressId(Integer addressId) {\n this.addressId = addressId;\n }", "@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddress() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "@Test\n public void getPlace() {\n Place result = mDbHelper.getPlace(Realm.getInstance(testConfig), \"1234\");\n\n // Check place\n Assert.assertNotNull(result);\n\n // Check place id\n Assert.assertEquals(\"1234\", result.getId());\n\n }", "@Repository\npublic interface AddressDao {\n void insert(AddressPojo addressPojo);\n\n AddressPojo queryAddressById(@Param(\"id\") Long id);\n\n Long queryId(AddressPojo addressPojo);\n}", "@Override\r\n\tpublic Address getAddressByAddressId(int addressId, int companyId) {\n\t\treturn getAddressDAO().getAddressByAddressId(addressId,companyId);\r\n\t}", "public ArrayList<Address> getAddress(int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<Address> addressList = new ArrayList<Address>();\n\t\tAddress addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from contact_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new Address(rs.getString(1),rs.getString(2),rs.getString(4),\n\t\t \t\t\t rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),\n\t\t \t\t\t rs.getString(9),rs.getString(3),\"\",\"\",\"\",\"\");\n\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t \n\t\t try\n\t\t { \n\t\t \t getPhoneNumberDetails(addressList, personId);\n\t\t \t getEmailIdDetails(addressList, personId);\n\t\t }\n\t\t catch(Exception e )\n\t\t {\n\t\t \t System.out.println(\"Row Miss match in Fields \");\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\treturn addressList;\n\t}", "public void testFindAccountById(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tAssert.assertEquals(id, acc.getId()) ;\n\t}", "@Test\n public void testUpdateAddress() {\n System.out.println(\"updateAddress\");\n String address = \"Sortegade 10\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateAddress(customerID, address);\n assertEquals(\"Sortegade 10\", instance.getCustomer(customerID).getAddress());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test CRUD Retrieve with Address 02\")\n public void testCRUDRetrieveWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n SBAddress02 address = null;\n\n\n Transaction transaction = null;\n try (Session session = HibernateUtil.getSessionFactory().openSession();) {\n transaction = session.beginTransaction();\n address = session.get(\n SBAddress02.class,\n utilities.getOrderedUUIDByteArrayFromUUIDWithApacheCommons(UUID.fromString(\n \"d0fd6f3d-f870-414b-9f3e-5bb6a63071bf\")));\n transaction.commit();\n\n } catch (Throwable throwable) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + address.getAddress02Street());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "public int queryAddressID()\n{ \n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tRESULT_SET = STATEMENT.executeQuery(\"SELECT ID FROM address ORDER BY ID DESC LIMIT 1\");\n\t\t\tRESULT_SET.next();\n\t\t\t\t\n\t\t\treturn RESULT_SET.getInt(\"address.ID\");\n\t\t}\n\t\t\t\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t\treturn -1;\n\t\t}\t\n\t\t\n\t}", "@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }", "@Test\n public void testFindRouteEntryByID() throws ConnectionException {\n RouteEntry result = MariaDbConnectorTest.instance.findRouteEntryByID(1);\n assertTrue((result != null)&& (result.getName() != null) && !(result.getName().equals(\"\")) && (result.getName().length() != 0));\n }", "@Test\n public void findByWrongId() throws DAOException {\n int id = 10;\n Country actual = countryDAO.findById(id);\n Assert.assertEquals(actual, null);\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testDeleteAddressCase1() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n final ServiceResult<Address> result = this.addressService.deleteAddress(currentAddress);\n Assert.assertTrue(result.isSuccess());\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Override\n public Optional<Dress> findById(Integer dressId) {\n LOGGER.debug(\"Find dress by ID {}\", dressId);\n SqlParameterSource namedParameters\n = new MapSqlParameterSource(DRESS_ID, dressId);\n List<Dress> dresses = jdbcTemplate\n .query(findByIdSql, namedParameters, dressRowMapper);\n return Optional.ofNullable(DataAccessUtils.uniqueResult(dresses));\n }", "public interface AddressMapper {\n public Address querybyId(int id);\n}", "public Short getAddressId() {\r\n return addressId;\r\n }", "@Test\n public void getAddress() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getAddress(), address);\n }", "@Override\n\tpublic BranchAddressVo c_selectAddress(String id) throws SQLException {\n\t\treturn sqlSession.selectOne(\"yes.c_selectAddress\", id);\n\t}", "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public boolean isExisted(String addressId) {\n //check if this address is already existed.\n return true;\n }", "@Test\n void getByIdSuccess() {\n Event retrievedEvent = (Event)genericDao.getById(2);\n assertNotNull(retrievedEvent);\n assertEquals(\"Dentist\", retrievedEvent.getName());\n }", "@RequestMapping(value = \"/adresses/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<AdresseDTO> getAdresse(@PathVariable Long id) {\n log.debug(\"REST request to get Adresse : {}\", id);\n AdresseDTO adresseDTO = adresseService.findOne(id);\n return Optional.ofNullable(adresseDTO)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "private void testManagerDAO(){\n System.out.println(\"==========================\");\n System.out.println(\"test finding managerID by userID\");\n int managerID = managerDAO.getIdManager(1);\n System.out.println(managerID);\n System.out.println(\"\\n\");\n \n }", "@Test\n public void testGetAddress() {\n System.out.println(\"getAddress\");\n Member instance = member;\n \n String expResult = \"01 London Road, Littlemoore, Oxford\";\n String result = instance.getAddress();\n \n assertEquals(expResult, result);\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "@Test\n public void testNewAddress() {\n System.out.println(\"newAddress\");\n String rua = \"felicia\";\n String codigoPostal = \"1211\";\n String localidade = \"Mancelos\";\n Object result = instance.newAddress(rua, codigoPostal, localidade);\n assertTrue(result instanceof Address);\n }", "public interface AdresseDAO {\n\t/**\n\t * Speichert die übergebene Entity.\n\t * \n\t * @param entity\n\t * @return\n\t * @throws Exception\n\t */\n\tvoid save(Adresse entity) throws Exception;\n\n\t/**\n\t * Updatet die übergebene Entity.\n\t * \n\t * @param entity\n\t * @return\n\t * @throws Exception\n\t */\n\tAdresse update(Adresse entity) throws Exception;\n\n\t/**\n\t * Löscht die übergebene Entity.\n\t * \n\t * @param entity\n\t * @throws Exception\n\t */\n\tvoid delete(Adresse entity) throws Exception;\n\n\t/**\n\t * Löscht die Entity mit der übergebenen Id.\n\t * \n\t * @param entity\n\t * @throws Exception\n\t */\n\tvoid deleteAdresseById(Integer id) throws Exception;\n\t\n\t/**\n\t * Liefert die Adresse-Entity für den übergebenen Id-Wert zurück.\n\t * \n\t * @param id\n\t * @return\n\t */\n\tAdresse findAdresseById(Integer id);\n\n\t/**\n\t * Liefert alle Adresse-Objekte zurück.\n\t * \n\t * @return\n\t */\n\tList<Adresse> findAllAdresse();\n\n\n}", "public interface AddressDao {\n}", "public boolean deleteAddressById(long addressid) {\n\t\tAddress addr = addressdao.findOne(addressid);\r\n\t\tif(addr == null){\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\taddressdao.delete(addressid);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void getLocationById() throws Exception {\n }", "Address deleteAddress(Long addressId);", "@Test\n public void testGetAllAddresses() throws Exception {\n List<Address> expected = new ArrayList<>();\n expected.add(createMockedAddress(1));\n\n new Expectations() {{\n jdbcTemplate.query(anyString, (RowMapperResultSetExtractor<?>) any);\n returns(expected);\n }};\n\n List<Address> actual = addressService.getAllAddresses();\n assertEquals(actual.size(), 1);\n assertEquals(actual.get(0), expected.get(0));\n }", "public void testAddAddress_IDGenerationException()\r\n throws Exception {\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 1);\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n fail(\"IDGenerationException expected\");\r\n } catch (IDGenerationException e) {\r\n //good\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 0);\r\n }\r\n }", "Addresses selectByPrimaryKey(Integer id);", "@Test\n public void address1Test() {\n // TODO: test address1\n }", "public interface AddressService {\n\n int addAdredd(Address address);\n\n List<Address> getAddressList(Integer uid);\n\n Address getAddressDeatil(Integer uid, Integer addressId);\n\n int deleteAddress(Integer addressId);\n\n int setDefault(Integer uid, Integer addressId);\n\n Address getDefaultAddress(Integer uid);\n}", "@Test\n public void testRegisterAddress() {\n System.out.println(\"registerAddress\");\n Address morada = new Address(\"dra\",\"333\",\"Porto\");\n boolean expResult = true;\n boolean result = instance.registerAddress(morada);\n assertEquals(expResult, result);\n }", "public static com.ifl.rapid.customer.model.CRM_Trn_Address fetchByPrimaryKey(\n\t\tint AddressId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().fetchByPrimaryKey(AddressId);\n\t}", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "@Override\r\n\tpublic Address retrieveForCustomerID(Connection connection, Long customerID) throws SQLException, DAOException {\n\t\tif (customerID == null) {\r\n\t\t\tthrow new DAOException(\"Trying to retrieve Address with NULL ID\");\r\n\t\t}\r\n\t\t\r\n\t\t// create a preparedStatement\r\n\t\tPreparedStatement ps = null;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t// execute a query\r\n\t\t\tps = connection.prepareStatement(retrieveSQL);\r\n\t\t\tps.setLong(1, customerID);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t\r\n\t\t\tif (!rs.next()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tAddress address = new Address();\r\n\t\t\taddress.setAddress1(rs.getString(\"address1\"));\r\n\t\t\taddress.setAddress2(rs.getString(\"address2\"));\r\n\t\t\taddress.setCity(rs.getString(\"city\"));\r\n\t\t\taddress.setState(rs.getString(\"state\"));\r\n\t\t\taddress.setZipcode(rs.getString(\"zipcode\"));\r\n\t\t\treturn address;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\t// close preparedStatement\r\n\t\t\tif (ps != null && !ps.isClosed()) {\r\n\t\t\t\tps.close();\r\n\t\t\t}\r\n\t\t} // end of Java exception\r\n\t}", "@Test\n public void getUserByIdCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNull(userResource.getUser(\"notdummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }", "@Test\n public void testAddLocationGetLocationByIdDeleteLocation() {\n System.out.println(\"-------------------\");\n System.out.println(\"testGetLocationById\");\n System.out.println(\"-------------------\");\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n locDao.deleteLocation(loc1.getLocationId());\n\n assertNull(locDao.getLocationById(loc1.getLocationId()));\n\n }", "@Test\n\tpublic void displayAddressTest() {\n\t\tassertNotNull(\"Address is not null\", instance.displayAddress());\n\t}", "@Test\n public void getEmployeeByIdCatch() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //creating dummy employee\n employeeDAO.createEmployee(new Employee(\"dummy\", \"dummy\", \"dummy\", \"dummy\", \"dummy\", 1));\n\n assertNull(employeeResource.getEmployee(\"notdummy\"));\n\n //clean up\n employeeDAO.removeEmployee(\"dummy\");\n userDAO.removeUser(\"dummy\");\n\n //test clean up\n assertNull(userResource.getUser(\"dummy\"));\n }", "private OrdPerson initAddress(String id) {\n\t\t\r\n\t\tUserAddress userAddress = receiverUserServiceAdapter.queryAddressByAddressNo(id);\r\n\t\t \r\n\t\tif (userAddress == null) {\r\n\t\t\tthrow new NullPointerException(\"收件地址不存在\");\r\n\t\t}\r\n\t\t// 地址\r\n\t\tList<OrdAddress> addressList = new ArrayList<OrdAddress>();\r\n\t\tOrdAddress ordAddress = new OrdAddress();\r\n\t\tordAddress.setProvince(userAddress.getProvince());\r\n\t\tordAddress.setCity(userAddress.getCity());\r\n\t\tordAddress.setStreet(userAddress.getAddress());\r\n\t\tordAddress.setPostalCode(userAddress.getPostCode());\r\n\t\taddressList.add(ordAddress);\r\n\r\n\t\t// 游玩人\r\n\t\tOrdPerson ordPerson = new OrdPerson();\r\n\t\tordPerson.setFullName(userAddress.getUserName());\r\n\t\tordPerson.setMobile(userAddress.getMobileNumber());\r\n\t\tordPerson.setObjectType(\"ORD_INVOICE\");\r\n\t\tordPerson.setPersonType(IReceiverUserServiceAdapter.RECEIVERS_TYPE.ADDRESS.name());\r\n\t\tordPerson.setAddressList(addressList);\r\n\t\treturn ordPerson;\r\n\t}", "@Test\n void getByIdOrderSuccess() {\n Order retrievedOrder = dao.getById(2);\n assertNotNull(retrievedOrder);\n assertEquals(\"February Large Long-Sleeve\", retrievedOrder.getDescription());\n\n }", "public boolean updateAddress(Address address, long addressid) {\n\t\tAddress newaddress = addressdao.findOne(addressid);\r\n\t\t\r\n\t\tif(newaddress == null){\r\n\t\t\t//addressdao.save(address);\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tnewaddress.setAddressLine(address.getAddressLine());\r\n\t\t\tnewaddress.setAddressArea(address.getAddressArea());\r\n\t\t\tnewaddress.setAddressCity(address.getAddressCity());\r\n\t\t\tnewaddress.setAddressCountry(address.getAddressCountry());\r\n\t\t\tnewaddress.setAddressState(address.getAddressState());\r\n\t\t\tnewaddress.setAddressPincode(address.getAddressPincode());\r\n\t\t\t\r\n\t\t\taddressdao.save(newaddress);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic List<EasybuyAddress> getAddressByUserId(String id) {\n\t\tList<EasybuyAddress> addresses=new ArrayList<EasybuyAddress>();\r\n\t\tString sql=\"select * from easybuy_address where ad_user_id=?\";\r\n\t\tResultSet rSet=super.query(sql, new Object[]{id});\r\n\t\ttry {\r\n\t\t\twhile(rSet.next())\r\n\t\t\t{\r\n\t\t\t\tEasybuyAddress address=new EasybuyAddress();\r\n\t\t\t\taddress.setAd_id(rSet.getInt(1));\r\n\t\t\t\taddress.setAd_user_id(rSet.getString(2));\r\n\t\t\t\taddress.setAd_address(rSet.getString(3));\r\n\t\t\t\taddresses.add(address);\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\treturn addresses;\r\n\t}", "@Test\n public void testPersonMethods() throws SQLException, InterruptedException {\n\n //Arrange\n PagingService service = new PagingService(connection);\n Person testPerson = new Person(1, \"TEST\", \"test\", \"testEmail\", \"testCountry\", \"testIpAddress\");\n\n //Act\n service.insertPerson(connection, testPerson);\n Person selectPerson = service.selectPerson(connection, 1);\n\n connection.close();\n\n //Assert\n assertThat(selectPerson.getId(), is(1));\n }", "@Test\n public void test4FindPk() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n SpecialityDTO respuesta = dao.findPk(\"telecomunicaciones\");\n assertEquals(respuesta,spec2);\n }", "@Test\n\tpublic void testRetrieveMultipleAddressesForDriver() throws MalBusinessException{\n\t\t// driver with more than one address\n\t\tLong drv_id = 168535L;\n\t\tList<DriverAddress> da = driverService.getDriver(drv_id).getDriverAddressList();\n\t\tassertTrue(da.size() > 1);\n\t\t\n\t}", "private Integer insertAddress(Connection con, AddressDto addressId) throws SQLException {\n\t\nPreparedStatement ps=\tcon.prepareStatement(SQLQueryConstants.INSERT_ADDRESS,Statement.RETURN_GENERATED_KEYS);\n\tps.setString(1, addressId.getAddress());\n\tps.setInt(2, addressId.getPinCode());\t\nps.setInt(3, addressId.getCityId().getCityId());\n int status =ps.executeUpdate();\nif(status!=0){\nResultSet rs=\tps.getGeneratedKeys();\n\tif(rs.next()){\n\t\treturn rs.getInt(1);\n\t\t\n\t}\n}\nreturn null;\t\n}", "@GetMapping(value = \"editcontactDetailsAddress\")\n\tpublic JsonResponse<RestPatientDetailsNewModel> editcontactDetailsAddress(@RequestParam String id) {\n\t\tlogger.info(\"Method : editcontactDetailsAddress starts\");\n\t\t\n\t\tlogger.info(\"Method : editcontactDetailsAddress ends\");\n\t\treturn PatientDetailsDao.editcontactDetailsAddress(id);\n\t}", "public interface IAdresseDao {\n public List<Adresse> findAllAdresses();\n\n public Adresse findAdresseById(int idAdresse);\n\n public List<Adresse> findAdresseByRue(String rue);\n \n public List<Adresse> findAdresseByIdUtilisateur(int idUtilisateur);\n \n public Adresse findAdresseFacturationByIdUtilisateur(int idUtilisateur);\n\n public Adresse createAdresse(Adresse adresse);\n\n public Adresse updateAdresse(Adresse adresse);\n\n public boolean deleteAdresse(Adresse adresse);\n}", "@Override\r\n\tpublic UserAddress viewAddressByUserId(int userid) throws AddressNotFoundException {\r\n\t\ttry {\r\n\t\t\treturn useraddressrepository.findById(userid).get();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new AddressNotFoundException(\"The object cannot be null\");\r\n\t\t}\r\n\t}", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public void testSearchAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.searchAddresses(AddressFilterFactory.createCreatedByFilter(\"user\"));\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public int insert(Address address) throws Exception;", "public Address load(Long addressId, Long loggedInUserId) throws AuthorisationException, InvalidUserIDException\n {\n if (Authorisation.isAuthorisedView(\"Address\", loggedInUserId, addressId) == false)\n {\n \tthrow new AuthorisationException();\n }\n \n \tAddress hibernateEntity = null;\n \t\n if (addressId != null)\n {\n\t\t\thibernateEntity = (Address)this.sessionFactory.getCurrentSession().get(AddressImpl.class, addressId);\n\n // Load all related singular objects\n \n }\n \t\n return hibernateEntity;\n }", "@Test\n public void getUserById() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNotNull(userResource.getUser(\"dummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }", "@Test\n\tpublic void testGetObjectByID() throws SQLException\n\t{\n\t\tInventoryItem nail = new Nail(\"asdf\",5,5,5.0,20);\n\t\tResultSet rs = DatabaseGateway.getObjectByID(\"Nail\", nail.id);\n\t\tif(rs.next())\n\t\t{\n\t\t\tassertEquals(rs.getInt(\"id\"),1);\n\t\t\tassertEquals(rs.getInt(\"ManufacturerID\"),5);\n\t\t\tassertEquals(rs.getInt(\"Price\"),5);\n\t\t\tassertEquals(rs.getString(\"UPC\"),\"asdf\");\n\t\t\tassertTrue(rs.getDouble(\"Length\") == 5.0);\n\t\t\tassertEquals(rs.getInt(\"NumberInBox\"), 20);\n\t\t}\n\t}", "@Test\n\tpublic void findByUserID() {\n\t\tRegistrationDetails registrationDetailsForHappyPath = RegistrationHelper.getRegistrationDetailsForHappyPath();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\tRegistrationDetails addRegistrationDetails = registrationDAO\n\t\t\t\t\t.addRegistrationDetails(registrationDetailsForHappyPath);\n\t\t\tem.getTransaction().commit();\n\t\t\t//fetch the registration object\n\t\t\tRegistrationDetails findByUserID = registrationDAO.findByUserID(addRegistrationDetails.getUserid());\n\t\t\tassertNotNull(findByUserID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}", "public void testassociate4() throws Exception {\r\n try {\r\n Address address = new Address();\r\n address.setId(1);\r\n this.dao.associate(address, 1, true);\r\n fail(\"InvalidPropertyException expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public List<Address> listAddressByAddressOne(String addressOne)\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address where address.addressOne = :addressone order by address.id asc\").setParameter(\"addressone\", addressOne).list();\n\n return result;\n }", "@Test\n public void testFindProductByID_1() throws Exception {\n System.out.println(\"findProductByID_1\");\n String id = \"1\";\n Database instance = new Database();\n instance.addProduct(1, new Product(1.0, \"\", 1));\n try{\n assertEquals(instance.findProductByID(id), new Product(1.0, \"\", 1));\n }catch(AssertionError e){\n fail(\"testFindProductByID_1 failed\");\n }\n }", "@Override\r\n\tpublic Address addAddress(Address address, int companyId) {\n\t\treturn getAddressDAO().addAddress(address,companyId);\r\n\t}", "@Test\n @DisplayName(\"Deve obter um livro por id\")\n public void getByIdTest() {\n given(bookRepositoryMocked.findById(ID)).willReturn(Optional.of(bookSavedMocked));\n\n // When execute save\n Optional<Book> foundBook = bookService.findById(ID);\n\n // Then\n assertThat(foundBook.isPresent()).isTrue();\n assertThat(foundBook.get()).isEqualTo(bookSavedMocked);\n\n // And verify mocks interaction\n verify(bookRepositoryMocked, times(1)).findById(ID);\n }", "@Test\r\n public void getStreetNumberTest()\r\n {\r\n Assert.assertEquals(stub.getStreetNumber(), STREETNUMBER);\r\n }" ]
[ "0.69760734", "0.69674945", "0.6903148", "0.67931426", "0.67031175", "0.66914284", "0.65926355", "0.65685165", "0.6494105", "0.6477995", "0.6392006", "0.62891895", "0.62708426", "0.6132982", "0.6114658", "0.6084895", "0.60744077", "0.6036199", "0.60324705", "0.60025805", "0.5974058", "0.5962155", "0.59485066", "0.5938552", "0.5929279", "0.5928429", "0.5924371", "0.59018975", "0.58789116", "0.5860475", "0.5855133", "0.5852407", "0.585101", "0.58431697", "0.581725", "0.58141404", "0.5806887", "0.5797921", "0.5794346", "0.5768197", "0.57651556", "0.5704781", "0.57041335", "0.57018113", "0.57002944", "0.5681112", "0.5680911", "0.5668519", "0.5667313", "0.5667251", "0.56546783", "0.56348807", "0.5632621", "0.5622639", "0.5620195", "0.56093884", "0.56065583", "0.56025594", "0.55975085", "0.55955195", "0.55868036", "0.5586123", "0.5585024", "0.5580131", "0.5577409", "0.557629", "0.5574532", "0.5573615", "0.5570811", "0.5554672", "0.5536323", "0.55354416", "0.55307716", "0.5528904", "0.5528093", "0.5518669", "0.55093163", "0.5496629", "0.549313", "0.5491377", "0.54802656", "0.5478744", "0.5476254", "0.5458044", "0.54452074", "0.54349744", "0.5430247", "0.54270947", "0.5414555", "0.54106146", "0.54035544", "0.5401411", "0.53993154", "0.539512", "0.53932756", "0.53845525", "0.53814006", "0.53777164", "0.53738225", "0.53728133" ]
0.7730171
0
Test of getCoordinatesByAddressID method, of class AddressDAO.
@Test public void testGetCoordinatesByAddressID() throws Exception { System.out.println("getCoordinatesByAddressID"); int adressID = 0; String result = instance.getCoordinatesByAddressID(adressID); assertTrue(!result.isEmpty()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "private static void testGetCoordinates(GeoCoderInterface geoCoder, String address, String language){\n\t\tSystem.out.println(\"--From address:\");\n\t\tGeoCoderResult result = geoCoder.getCoordinates(address, language);\n\t\tprintGeoCoderResult(result);\n\t}", "@Test\n public void testGetAdressByID() throws Exception {\n System.out.println(\"getAdressByID\");\n int adressID = 0;\n String result = instance.getAdressByID(adressID);\n assertTrue(!result.isEmpty());\n \n }", "@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}", "public com.apatar.cdyne.ws.demographix.PlaceInfo getPlaceIDbyAddress(java.lang.String addressLine1, java.lang.String city, java.lang.String stateAbbrev, java.lang.String zipCode, java.lang.String licenseKey) throws java.rmi.RemoteException;", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "@Test\n public void getLocationById() throws Exception {\n }", "public Address getAddressById(long addressid) {\n\t\treturn addressdao.findOne(addressid);\r\n\t}", "AddressDao getAddressDao();", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddress() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "@Test\n public void testPersistAndLoadAddress() {\n \t//need instances of these classes\n\t Address address = new Address();\n\t User user = new User();\n\t Cart cart = new Cart();\n\t \n\t \n\t //parameters for address\n\t String city = \"city\";\n\t String country = \"country\";\n\t String postalCode = \"postalCode\";\n\t String province = \"province\";\n\t String street1 = \"street1\";\n\t String street2 = \"street2\";\n\t //Integer addressID = \"TESTaddressID\".hashCode();\n\t \n\t \n\t //parameters for user\n\t String username = \"testUser20\";\n\t String password = \"passW0rd\";\n\t String email = \"[email protected]\";\n\t String profilePicURL = \"//yes.com/img.jpg\";\n\t Set<Address> addrs= new HashSet<>();\n\t \taddrs.add(address);\n\t Set<Artwork> artworks= new HashSet<>();\n\t Set<Order> orders= new HashSet<>();\n\t \t\n\t \t\n\t //parameters for cart\n\t //Integer cartID = \"TESTcartID\".hashCode();\n\t double totalCost = 100.1;\n\t \n\t //set address parameters\n\t address.setCity(city);\n\t address.setCountry(country);\n\t address.setPostalCode(postalCode);\n\t address.setProvince(province);\n\t address.setStreetAddress1(street1);\n\t address.setStreetAddress2(street2);\n\t //address.setAddressID(addressID);\n\t address.setUser(user);\n\t \n\t \n\t //set user parameters\n\t user.setUsername(username);\n\t user.setPassword(password);\n\t user.setEmail(email);\n\t user.setProfilePictureURL(profilePicURL);\n\t user.setCart(cart);\n\t user.setAddress(addrs);\n\t user.setOrder(orders);\n\t user.setArtwork(artworks);\n\t \n\t \n\t //set cart parameters\n\t //cart.setCartID(cartID);\n\t cart.setTotalCost(totalCost);\n\t cart.setUser(user);\n\t \n\t //save instances to database \n\t user = userRepository.save(user);\n\t //cart.setUser(user);\n\t //cart = cartRepository.save(cart);\n\t address = addressRepository.save(address);\n\n //restore address instance from database\n Address addressPersisted = addressRepository.findAddressByAddressID(address.getAddressID());\n\n //assert if instance retrieved from database equals the original\n assertEquals(address.getAddressID(), addressPersisted.getAddressID());//address.equals(addressPersisted));\n }", "public void setAddressId(Integer addressId) {\n this.addressId = addressId;\n }", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }", "@Test\n public void testGetAllAddresses() throws Exception {\n List<Address> expected = new ArrayList<>();\n expected.add(createMockedAddress(1));\n\n new Expectations() {{\n jdbcTemplate.query(anyString, (RowMapperResultSetExtractor<?>) any);\n returns(expected);\n }};\n\n List<Address> actual = addressService.getAllAddresses();\n assertEquals(actual.size(), 1);\n assertEquals(actual.get(0), expected.get(0));\n }", "@Test\n public void getPlace() {\n Place result = mDbHelper.getPlace(Realm.getInstance(testConfig), \"1234\");\n\n // Check place\n Assert.assertNotNull(result);\n\n // Check place id\n Assert.assertEquals(\"1234\", result.getId());\n\n }", "@Test\n void testSuccess_saveAndLoadStreetLines() {\n assertAddress(saveAndLoad(entity).address, \"123 W 14th St\", \"8th Fl\", \"Rm 8\");\n }", "public interface IAddressDao {\n\n long save(Address address) throws DaoException;\n\n void update(Address address) throws DaoException;\n\n Address getAddressByContactId(long contactId) throws DaoException;\n\n}", "Optional<Point> getCoordinate(int id);", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "@Test\n public void testAddLocationGetLocationByIdDeleteLocation() {\n System.out.println(\"-------------------\");\n System.out.println(\"testGetLocationById\");\n System.out.println(\"-------------------\");\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n locDao.deleteLocation(loc1.getLocationId());\n\n assertNull(locDao.getLocationById(loc1.getLocationId()));\n\n }", "@Override\r\n\tpublic Address findById(Integer id) {\r\n\t\tValidationReturn validation = validator.findById(id);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\t\r\n\t\tResultSet item = DAOJDBCModel.singleCallReturn(\"SELECT * FROM address WHERE id='\" + id + \"';\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (item != null) {\r\n\t\t\t\treturn new Address(item.getInt(\"id\"), item.getString(\"street\"), item.getString(\"district\"),\r\n\t\t\t\t\t\titem.getInt(\"number\"), item.getString(\"note\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "private FloatCoordinate getCoordinates(InetAddress addr)\n {\n FloatCoordinate coords = null;\n\n /*\n * Look for the geographical coordinates in our database.\n */\n try {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Looking for coordinates associated with \"\n + addr.getHostAddress() + \" in Geo db\");\n }\n coords = GlobeRedirector.geoDB.read(addr);\n }\n catch(DBException e) {\n logError(\"GeoDB read failure\" + getExceptionMessage(e));\n\n // CONTINUE\n }\n\n /*\n * If the coordinates are not in the database, retrieve them from\n * the Net GEO server (and store them in the database).\n */\n if (coords == null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Retrieving coordinates from GEO server\");\n }\n\n if ( (coords = askNetGeo(addr)) == null) {\n if (DEBUG && _debugLevel > 1) {\n debugPrintLn(\"Cannot determine coordinates\");\n }\n return null;\n }\n else {\n try {\n GlobeRedirector.geoDB.write(addr, coords);\n }\n catch(DBException e) {\n logError(\"GeoDB write failure\" + getExceptionMessage(e));\n\n // CONTINUE\n }\n }\n }\n return coords;\n }", "public Integer getAddressId() {\n return addressId;\n }", "@Test\n public void testGet() {\n System.out.println(\"get\");\n int id = 0;\n Address result = instance.get(id);\n assertTrue(result.validate());\n \n }", "@Override\n\tpublic Address getAddressById(int id) {\n\t\treturn sqlSessionTemplate.selectOne(sqlId(\"getAddressById\"),id);\n\t}", "public static Address get(Integer id) throws SQLException, Exception {\n\n String sql = \"SELECT * FROM address WHERE (id=? AND enabled=?)\";\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result = null;\n try {\n //Opens a connection to the DB\n con = ConnectionUtils.getConnection();\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql);\n\n stmt.setInt(1, id);\n stmt.setBoolean(2, true);\n\n result = stmt.executeQuery();\n\n if (result.next()) {\n\n // Create a Address instance and population with BD values\n Address address = new Address();\n\n address.setId(result.getInt(\"id\"));\n PublicPlaceType publicPlaceType = DAOPublicPlaceType.get(result.getInt(\"publicplace_type_id\"));\n address.setPublicPlaceType(publicPlaceType);\n City city = DAOCity.get(result.getInt(\"city_id\"));\n address.setCity(city);\n address.setPublicPlace(result.getString(\"publicplace\"));\n address.setNumber(result.getInt(\"number\"));\n address.setComplement(result.getString(\"complement\"));\n address.setDistrict(result.getString(\"district\"));\n address.setZipcode(result.getInt(\"zipcode\"));\n\n return address;\n }\n } finally {\n ConnectionUtils.finalize(result, stmt, con);\n }\n\n return null;\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testDeleteAddressCase1() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n final ServiceResult<Address> result = this.addressService.deleteAddress(currentAddress);\n Assert.assertTrue(result.isSuccess());\n }", "@Repository\npublic interface AddressDao {\n void insert(AddressPojo addressPojo);\n\n AddressPojo queryAddressById(@Param(\"id\") Long id);\n\n Long queryId(AddressPojo addressPojo);\n}", "@Test\n\tpublic void testIfCoordinatesAreValid()\n\t{\n\t\tData d = new Data();\n\t\tCoordinate c = d.getCoordinate(0); // at index 0 is the king's default location (5, 5)\n\t\tassertEquals(c.getX(), 5);\n\t\tassertEquals(c.getY(), 5);\t\n\t}", "@Test\n\tvoid testCheckCoordinates1() {\n\t\tassertTrue(DataChecker.checkCoordinate(1));\n\t}", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n public void iPAddressGeolocateStreetAddressTest() throws Exception {\n String value = null;\n GeolocateStreetAddressResponse response = api.iPAddressGeolocateStreetAddress(value);\n\n // TODO: test validations\n }", "public void testGPS() {\n\t\tgps = new GPSTracker(gps);\n \tdouble [] coordinate = new double[2];\n\t\tdouble latitude = gps.getLatitude();\n\t\tdouble longitude = gps.getLongitude();\n\t\tcoordinate[0] = latitude;\n\t\tcoordinate[1] = longitude;\n\t\tassertTrue(Math.floor(latitude) == 0 && Math.floor(longitude) == 0);\n\t\t\n\t\tString address = GeoCoder.toAdress(53.5267620,-113.5271460);\n\t\tLog.d(LOG_TAG, address);\n\t\tString testAddress = \"Edmonton, Alberta/CA\";\n\t\tLog.d(LOG_TAG, testAddress);\n\t\tassertEquals(address, testAddress);\n\t\t\n\t}", "public String getCoordinates(String address){\n\t\ttry\n {\n String thisLine;\n String address1 = address;\n address1 = address1.replace(' ', '+');\n address1 = address1.replace(',', '+');\n System.out.println(\"address: \"+address1);\n URL u = new URL(\"http://maps.google.com/maps/geo?q=\\'\" + address1 + \"\\'&output=xml&key=AIzaSyDA6y535k8_IQu-3XLpVn865SiEkBLSQ74\");\n \n BufferedReader theHTML = new BufferedReader(new InputStreamReader(u.openStream()));\n \n FileWriter fstream = new FileWriter(\"url.xml\");\n BufferedWriter out = new BufferedWriter(fstream);\n while ((thisLine = theHTML.readLine()) != null)\n out.write(thisLine);\n out.close();\n File file = new File(\"url.xml\");\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nl = doc.getElementsByTagName(\"code\");\n Element n = (Element)nl.item(0);\n String st = n.getFirstChild().getNodeValue();\n \n if (st.equals(\"200\"))\n {\n NodeList n2 = doc.getElementsByTagName(\"coordinates\");\n Element nn = (Element)n2.item(0);\n String st1 = nn.getFirstChild().getNodeValue();\n \n return st1;\n }\n else\n {\n \treturn null;\n }\n }\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Occured\");\n return null;\n }\n\t}", "public void testRetrieveAddresses() throws Exception {\r\n try {\r\n this.dao.retrieveAddresses(new long[]{-1});\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\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\n public void testUpdateLocation() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n loc1.setLocationName(\"Poppas House\");\n\n locDao.updateLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n }", "public interface AddressMapper {\n public Address querybyId(int id);\n}", "@Test\n public void testGetAddress() {\n System.out.println(\"getAddress\");\n Member instance = member;\n \n String expResult = \"01 London Road, Littlemoore, Oxford\";\n String result = instance.getAddress();\n \n assertEquals(expResult, result);\n }", "@Override\r\n\tpublic List<EasybuyAddress> getAddressByUserId(String id) {\n\t\tList<EasybuyAddress> addresses=new ArrayList<EasybuyAddress>();\r\n\t\tString sql=\"select * from easybuy_address where ad_user_id=?\";\r\n\t\tResultSet rSet=super.query(sql, new Object[]{id});\r\n\t\ttry {\r\n\t\t\twhile(rSet.next())\r\n\t\t\t{\r\n\t\t\t\tEasybuyAddress address=new EasybuyAddress();\r\n\t\t\t\taddress.setAd_id(rSet.getInt(1));\r\n\t\t\t\taddress.setAd_user_id(rSet.getString(2));\r\n\t\t\t\taddress.setAd_address(rSet.getString(3));\r\n\t\t\t\taddresses.add(address);\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\treturn addresses;\r\n\t}", "@Test\r\n\tpublic void testLocationCircleQuery() {\r\n\t\tlog.debug(\"<<<<<<<<<<<<<<<<< testLocationCircleQuery >>>>>>>>>>>>>>>>>>>>\");\r\n\r\n\t\t/*\r\n\t\t * List<Location> locations = locationService.findByCityAndState(\r\n\t\t * \"Wheeling\", \"WV\");\r\n\t\t */\r\n\r\n\t\tList<Location> locations = locationService\r\n\t\t\t\t.findByCityAndStateAndZipCode(\"Wheeling\", \"WV\", \"26003\");\r\n\r\n\t\tlog.debug(\"List Size: \" + locations.size());\r\n\r\n\t\tassertNotNull(\"locations[0] was null.\", locations.get(0));\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Wheeling\", locations.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"State was not correct.\", \"WV\", locations.get(0)\r\n\t\t\t\t.getState());\r\n\t\tassertEquals(\"ZipCode was not correct.\", \"26003\", locations.get(0)\r\n\t\t\t\t.getZipCode());\r\n\r\n\t\t// Used to troubleshoot Location Repo\r\n\t\t/*\r\n\t\t * DBObject query = new BasicDBObject(); query.put(\"city\", \"Wheeling\");\r\n\t\t * query.put(\"state\", \"WV\");\r\n\t\t * \r\n\t\t * DBObject fields = new BasicDBObject(); fields.put(\"_id\", 0);\r\n\t\t * fields.put(\"city\", 1); fields.put(\"state\", 2);\r\n\t\t * \r\n\t\t * DBCollection collection = this.mongoOps.getCollection(\"locations\");\r\n\t\t * DBCursor cursor = collection.find(query, fields);\r\n\t\t * \r\n\t\t * log.info(cursor.size()+\"\");\r\n\t\t * \r\n\t\t * log.info(cursor.toString());\r\n\t\t * \r\n\t\t * while (cursor.hasNext()) { log.info(cursor.next().toString()); }\r\n\t\t */\r\n\r\n\t\tList<Location> locales = this.locationService\r\n\t\t\t\t.findByGeoWithin(new Circle(locations.get(0).getLongitude(),\r\n\t\t\t\t\t\tlocations.get(0).getLatitude(), 1));\r\n\r\n\t\tfor (Location locale : locales) {\r\n\t\t\tlog.info(locale.toString());\r\n\t\t}\r\n\r\n\t\tassertEquals(\"City was not correct.\", \"Aliquippa\", locales.get(0)\r\n\t\t\t\t.getCity());\r\n\t\tassertEquals(\"City was not correct.\", \"Conway\", locales.get(19)\r\n\t\t\t\t.getCity());\r\n\r\n\t}", "public boolean updateAddress(Address address, long addressid) {\n\t\tAddress newaddress = addressdao.findOne(addressid);\r\n\t\t\r\n\t\tif(newaddress == null){\r\n\t\t\t//addressdao.save(address);\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tnewaddress.setAddressLine(address.getAddressLine());\r\n\t\t\tnewaddress.setAddressArea(address.getAddressArea());\r\n\t\t\tnewaddress.setAddressCity(address.getAddressCity());\r\n\t\t\tnewaddress.setAddressCountry(address.getAddressCountry());\r\n\t\t\tnewaddress.setAddressState(address.getAddressState());\r\n\t\t\tnewaddress.setAddressPincode(address.getAddressPincode());\r\n\t\t\t\r\n\t\t\taddressdao.save(newaddress);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic Address getAddressByAddressId(int addressId, int companyId) {\n\t\treturn getAddressDAO().getAddressByAddressId(addressId,companyId);\r\n\t}", "public ArrayList<Address> getAddress(int personId)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sqlQuery=\"\";\n\t\tArrayList<Address> addressList = new ArrayList<Address>();\n\t\tAddress addressObj;\n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t\t sqlQuery = \"select * from contact_info where person_id=?\";\n\t\t\t \n\t\t stmt = conn.prepareStatement(sqlQuery);\n\t\t stmt.setInt(1, personId);\n\n\t\t rs = stmt.executeQuery();\n\t\t \n\t\t while (rs.next()) {\n\t\t \t addressObj = new Address(rs.getString(1),rs.getString(2),rs.getString(4),\n\t\t \t\t\t rs.getString(5),rs.getString(6),rs.getString(7),rs.getString(8),\n\t\t \t\t\t rs.getString(9),rs.getString(3),\"\",\"\",\"\",\"\");\n\n\t\t \t addressList.add(addressObj);\n\t\t \t \n\t\t }\n\t\t \n\t\t try\n\t\t { \n\t\t \t getPhoneNumberDetails(addressList, personId);\n\t\t \t getEmailIdDetails(addressList, personId);\n\t\t }\n\t\t catch(Exception e )\n\t\t {\n\t\t \t System.out.println(\"Row Miss match in Fields \");\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Searching Person Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(rs!=null)\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\treturn addressList;\n\t}", "public interface IAddressService {\n List<Address> findAllAddress();\n\n void saveOrUpdate(Address address) throws Exception;\n\n void deleteAddressById(long id) throws Exception;\n\n void batchDeleteAddress(long[] ids) throws Exception;\n\n Address query(long customer_id) throws Exception;\n}", "private static void testGetAddress(GeoCoderInterface geoCoder, Double latitude, Double longitude, String language){\n\t\tSystem.out.println(\"--From GPS:\");\n\t\tGeoCoderResult result = geoCoder.getAddress(latitude, longitude, language);\n\t\tprintGeoCoderResult(result);\n\t}", "@Override\n\tpublic List<Address> getAllAddressesByAddressId(int addressId) {\n\t\treturn repository.findByAddressId(addressId);\n\t}", "@Test\n void getGeoCodingInfoFromAddress() throws URISyntaxException, IOException {\n System.out.println(MapUtils.getGeoCodingInfoFromAddress(\"350 W 88th st, New York, NY\"));\n }", "@Test\r\n\tpublic void ST_ClosestCoordinate() {\n\r\n\t}", "@Test\n\tvoid testCheckCoordinates3() {\n\t\tassertTrue(DataChecker.checkCoordinate(0));\n\t}", "public int queryAddressID()\n{ \n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tRESULT_SET = STATEMENT.executeQuery(\"SELECT ID FROM address ORDER BY ID DESC LIMIT 1\");\n\t\t\tRESULT_SET.next();\n\t\t\t\t\n\t\t\treturn RESULT_SET.getInt(\"address.ID\");\n\t\t}\n\t\t\t\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t\treturn -1;\n\t\t}\t\n\t\t\n\t}", "@Test\n public void testUpdateAddress() {\n System.out.println(\"updateAddress\");\n String address = \"Sortegade 10\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateAddress(customerID, address);\n assertEquals(\"Sortegade 10\", instance.getCustomer(customerID).getAddress());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n public void address1Test() {\n // TODO: test address1\n }", "@Test public void fillMapIdAndCoordinateWithSameId() {\n // Given\n \n String pathnameXml = \"./ressources/fichiersTestXml/fillMapIdSameId.xml\";\n Reseau resIdIncorrect = parser.parseCityPlan(pathnameXml);\n assertNotNull(resIdIncorrect);\n assertEquals(\"2129259178\", resIdIncorrect.getNoeud()[0].getId());\n assertEquals(\"2129259178\", resIdIncorrect.getNoeud()[1].getId());\n \n Map map = new Map();\n \n // When\n \n map.fillMapIdAndCoordinate(resIdIncorrect);\n \n // Then\n \n Long lastId = Long.valueOf(\"2129259178\");\n int lastIndex = map.getMapId().get(lastId);\n // We compare the longitude to be sure\n // that it is the last noeud which is \n // registered in the mapId for the same key\n double longitude = map.getCoordinate(lastIndex).getLongitude();\n assertEquals(4.8, longitude, 0.1);\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "public interface AddressDao {\n}", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "@Test\n public void testGetAllLocations() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"The Basement\");\n loc1.setDescription(\"Underground\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Cityville USA\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n locDao.addLocation(loc1);\n\n Location loc2 = new Location();\n loc2.setLocationName(\"The Attic\");\n loc2.setDescription(\"Above ground\");\n loc2.setAddress(\"123 nunya Ave\");\n loc2.setCity(\"HamletTown USA\");\n loc2.setLatitude(654.321);\n loc2.setLongitude(654.321);\n locDao.addLocation(loc2);\n \n List<Location> locations = locDao.getAllLocations();\n \n assertEquals(2, locations.size());\n }", "@Test\n public void modifyAddressByCaseIdNotFound() throws Exception {\n\n CollectionCase rmCase = collectionCase.get(0);\n String caseId = rmCase.getId();\n AddressChangeDTO addressChange = addressChangeDTO.get(0);\n\n when(dataRepo.readCollectionCase(caseId)).thenReturn(Optional.empty());\n\n boolean exceptionThrown = false;\n try {\n caseSvc.modifyAddress(addressChange);\n } catch (CTPException e) {\n assertEquals(CTPException.Fault.RESOURCE_NOT_FOUND, e.getFault());\n exceptionThrown = true;\n }\n\n verify(dataRepo, times(1)).readCollectionCase(caseId);\n verify(eventPublisher, times(0)).sendEvent(any(), any(), any(), any());\n\n assertTrue(exceptionThrown);\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "long getCoordinates();", "long getCoordinates();", "@Test\n public void testNeighborAreaId() throws Exception {\n isisNeighbor.setNeighborAreaId(areaId);\n result1 = isisNeighbor.neighborAreaId();\n assertThat(result1, is(areaId));\n }", "@Override\n\tpublic List<Address> getAddressListByUserid(int userid) {\n\t\treturn sqlSessionTemplate.selectList(sqlId(\"getAddressByUserId\"),userid);\n\t}", "@Test\n\tpublic void testRetrieveMultipleAddressesForDriver() throws MalBusinessException{\n\t\t// driver with more than one address\n\t\tLong drv_id = 168535L;\n\t\tList<DriverAddress> da = driverService.getDriver(drv_id).getDriverAddressList();\n\t\tassertTrue(da.size() > 1);\n\t\t\n\t}", "public void testRetrieveAddresses_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").retrieveAddresses(new long[]{1});\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public void testAddAddress5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getState().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testSearchAddresses() throws Exception {\r\n try {\r\n this.dao.searchAddresses(null);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }", "private void getOrderDetailLatLng(Long orderId) {\n new FetchOrderDetailLngLat(orderId, new InvokeOnCompleteAsync<List<String>>() {\n @Override\n public void onComplete(List<String> latLng) {\n double lat = Double.valueOf(latLng.get(0) == null ? \"0\" : latLng.get(0));\n double lng = Double.valueOf(latLng.get(1) == null ? \"0\" : latLng.get(1));\n if (lat != 0 && lng != 0) {\n orderDetail.getBillingAddress().setLatitude(lat);\n orderDetail.getBillingAddress().setLongitude(lng);\n }\n }\n\n @Override\n public void onError(Throwable e) {\n LoggerHelper.showErrorLog(\"Error: \" + e);\n }\n });\n }", "public void testRetrieveAddress_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").retrieveAddress(1);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Override\r\n\tpublic List<Address> searchAddress(Double latitude, Double longitude, String type) throws Exception {\r\n\t\tStringBuilder selectQuery = new StringBuilder();\r\n\t\tStringBuilder whereQuery = new StringBuilder();\r\n\t\tif (!StringUtils.isEmpty(latitude) && !StringUtils.isEmpty(longitude)) {\r\n\t\t\tselectQuery.append(\" from Address \");\r\n\t\t\twhereQuery.append(\"where \");\r\n\t\t\twhereQuery.append(\"ACOS( SIN( RADIANS(latitude) ) * SIN( RADIANS(\");\r\n\t\t\twhereQuery.append(latitude);\r\n\t\t\twhereQuery.append(\") ) + COS( RADIANS(latitude) ) * COS( RADIANS(\");\r\n\t\t\twhereQuery.append(latitude);\r\n\t\t\twhereQuery.append(\")) * COS( RADIANS(longitude) - RADIANS(\");\r\n\t\t\twhereQuery.append(longitude);\r\n\t\t\twhereQuery.append(\"))) * 6380 < 5\");\r\n\t\t\tif (!StringUtils.isEmpty(type)) {\r\n\t\t\t\twhereQuery.append(\" and type='\").append(type + \"'\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception(\"Latitude/Longitude can not be Null\");\r\n\t\t}\r\n\t\tselectQuery.append(whereQuery);\r\n\t\treturn executeQuery(selectQuery.toString());\r\n\t}", "public void testSearchAddresses_PersistenceException() throws Exception {\r\n try {\r\n this.dao.searchAddresses(new EqualToFilter(\"address_id\", new Long(1)));\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n\tvoid testCheckCoordinates8() {\n\t\tassertTrue(DataChecker.checkCoordinate(new Integer(5)));\n\t}", "@Test\n public void getAddress() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getAddress(), address);\n }", "public Addresses getAddresses(Long id) {\n\t\treturn addressesRepository.findOne(id);\r\n\t}", "@Override\n\tpublic BranchAddressVo c_selectAddress(String id) throws SQLException {\n\t\treturn sqlSession.selectOne(\"yes.c_selectAddress\", id);\n\t}", "@Test\n\tpublic void testDriverAddressesReturned(){ \n\t\t// Left the driver values in this test method as the driver id and the expected values are very closely tied and extracting\n\t\t// them out to a properties file doesn't seem to make sense as these are old drivers that will not likely change.\n\t\t\n\t\tlong driverId = 3l; // driver with no post address, 2 garaged history addresses and 1 current\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE).size(), 0);\t\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 3);\n\t\t\n\t\tdriverId = 4l; // driver with no history addresses\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 1);\n\t\t\n\t\tdriverId = 125989l; // driver with multiple post\n\t\tList<DriverAddressHistory> list = driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE);\n\t\tassertEquals(list.size(), 4);\n\t\t// check end date of first record\n\t\tassertEquals(list.get(0).getEndDate().toString(), \"2006-12-09 09:39:05.0\"); \n\t\t// check calculated start date of history record when change on same day\n\t\tassertEquals(list.get(1).getStartDate().toString(), \"2006-12-09 09:58:51.0\");\n\t\t// check calculated start date of history record when change not on same day\n\t\tassertEquals(list.get(2).getStartDate().toString(), \"Sun Dec 10 00:00:00 EST 2006\"); //TODO This is too brittle need to redo date/time test\n\t\t// check start date of current record\n\t\tassertEquals(list.get(3).getStartDate().toString(), \"Fri Apr 03 00:00:01 EDT 2009\"); //TODO This is too brittle need to redo date/time test\n\t}", "public void testGetAllAddresses_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").getAllAddresses();\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test\n\tpublic void testFindByXandY() {\n\n\t\tnew Point(20, 10).save();\n\n\t\tList<Point> points = Point.findByXandY(20, 10);\n\n\t\tassertEquals(1, points.size());\n\t\tassertEquals(points.get(0).x, 20);\n\t\tassertEquals(points.get(0).y, 10);\n\n\t}", "@Override\r\n\tpublic UserAddress viewAddressByUserId(int userid) throws AddressNotFoundException {\r\n\t\ttry {\r\n\t\t\treturn useraddressrepository.findById(userid).get();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow new AddressNotFoundException(\"The object cannot be null\");\r\n\t\t}\r\n\t}", "@Test\n public void testifyAddress() throws InterruptedException {\n onView(withId(R.id.address)).check(matches(isDisplayed()));\n }", "@DAO(catalog = \"ABC\")\npublic interface AddressDAO {\n static final String TABLE_NAME= \"address\";\n static final String FIELDS = \"id,type,user_id,city,province ,district,phone,address,create_time,update_time,user_device_id\" ;\n static final String INSERT_FIELDS = \"type,user_id,city,province ,district,phone,address,update_time,user_device_id\" ;\n\n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where id =:1\")\n public Address getAddress(long id);\n\n\t@SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where user_id =:1 order by type desc limit :2,:3\")\n\tpublic List<Address> getAddresses(long user_id, int start, int offset);\n\n @ReturnGeneratedKeys\n @SQL(\"insert into \" + TABLE_NAME + \"(\" + INSERT_FIELDS +\") values (:1.type,:1.user_id,:1.city,:1.province,:1.district,:1.phone,:1.address,:1.update_time,:1.user_device_id)\")\n public int addAddress(Address address);\n\n @SQL(\"update \" + TABLE_NAME + \" set city=:1.city,phone =:1.phone, address = :1.address ,update_time=now()\" + \" where id = :1.id\")\n public int updateAddress(Address address);\n\n @SQL(\"delete from \" + TABLE_NAME + \" where id = :1.id\")\n public int delAddress(long address_id);\n\n @SQL(\"update \" + TABLE_NAME + \" set type=1 where id = :1\")\n public int defaultAddress(long address_id);\n\n @SQL(\"update \" + TABLE_NAME + \" set type = 0 where user_id = :1\")\n public int cleanDefaultAddress(long user_id);\n \n @SQL(\"update \" + TABLE_NAME + \" set type = 0 where user_device_id = :1\")\n public int cleanDefaultAddressByUserDeviceId(long userDeviceId);\n \n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where device_user_id =:1\")\n\tpublic List<Address> getAddressesByDeviceUserId(long user_id);\n \n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where user_id =:1\")\n\tpublic List<Address> getAddresses(long user_id);\n \n @SQL(\"update \" + TABLE_NAME + \" set user_id=:1,user_device_id= -1 where user_device_id = :2\")\n public Integer bindAddress2User(long userId,long userDeviceId);\n \n @ReturnGeneratedKeys\n @SQL(\"insert into \" + TABLE_NAME + \"(\" + INSERT_FIELDS +\") values (:1.type,:1.user_id,:1.city,:1.province,:1.district,:1.phone,:1.address,:1.update_time,:1.user_device_id)\")\n public int addAddressByUserApp(Address address);\n\n}", "Addresses selectByPrimaryKey(Integer id);", "@Test\n public void findById_2(){\n String firstName=\"prakash\",lastName=\"s\";\n int age=21;\n String city=\"chennai\", houseNo=\"c-1\";\n Address address1=new Address(city, houseNo);\n Employee employee1=new Employee(firstName,lastName,age,address1);\n employee1=mongo.save(employee1);\n Employee fetched=employeeService.findById(employee1.getId());\n Assertions.assertEquals(firstName, fetched.getFirstName());\n Assertions.assertEquals(lastName,fetched.getLastName());\n Assertions.assertEquals(employee1.getId(),fetched.getId());\n Assertions.assertEquals(age, fetched.getAge());\n\n }", "@Service\npublic interface AddressService {\n\n\tList<Region> getAllRegion();\n\n\tRegion getRegionById(Integer id);\n\n\tRegion addRegion(Region region);\n\n\tRegion updateRegion(Region region);\n\n\tboolean deleteRegion(Integer id);\n\n\tList<City> getAllCitiesOfRegion(Integer regionId);\n\n\tCity getCityById(Integer id);\n\n\tCity addCity(City city);\n\n\tCity updateCity(City city);\n\n\tboolean deleteCity(Integer id);\n\n\tList<Street> getAllStreetsOfCity(Integer cityId);\n\n\tStreet getStreetById(Integer id);\n\n\tStreet addStreet(Street street);\n\n\tStreet updateStreet(Street street);\n\n\tboolean deleteStreet(Integer id);\n\n\tList<District> getAllDistrictsOfCity(Integer cityId);\n\n\tDistrict getDistrictById(Integer id);\n\n\tDistrict addDistrict(District district);\n\n\tDistrict updateDistrict(District district);\n\n\tboolean deleteDistrict(Integer id);\n\n}", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testDeleteAddressCase2() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n final ServiceResult<Address> result = this.addressService.deleteAddress(currentAddress);\n Assert.assertFalse(result.isSuccess());\n }", "public void getCordinates(String id,TableQueryCallback<GPS> callback){\n mGPSTable.where().field(\"Id\").eq(id).execute(callback);\n }", "@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public void testupdateAddresses_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "Address deleteAddress(Long addressId);", "@Test\n\tvoid testCheckCoordinates5() {\n\t\tassertFalse(DataChecker.checkCoordinate(100));\n\t}", "@Test\n public void savePlaces() {\n Assert.assertTrue(places.size() > 0);\n\n // save mock place\n boolean result = mDbHelper.savePlaces(Realm.getInstance(testConfig), places);\n\n // check result\n Assert.assertTrue(result);\n }", "public boolean isExisted(String addressId) {\n //check if this address is already existed.\n return true;\n }", "public Address load(Long addressId, Long loggedInUserId) throws AuthorisationException, InvalidUserIDException\n {\n if (Authorisation.isAuthorisedView(\"Address\", loggedInUserId, addressId) == false)\n {\n \tthrow new AuthorisationException();\n }\n \n \tAddress hibernateEntity = null;\n \t\n if (addressId != null)\n {\n\t\t\thibernateEntity = (Address)this.sessionFactory.getCurrentSession().get(AddressImpl.class, addressId);\n\n // Load all related singular objects\n \n }\n \t\n return hibernateEntity;\n }", "public void testUpdateAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }" ]
[ "0.67947286", "0.65234137", "0.62788504", "0.61226326", "0.60429794", "0.5989793", "0.59889257", "0.592647", "0.5913871", "0.5891345", "0.5887356", "0.5839846", "0.5830574", "0.57395095", "0.5698196", "0.56770515", "0.5622461", "0.5619246", "0.56114423", "0.55947405", "0.5573883", "0.5571783", "0.5553499", "0.5544882", "0.554373", "0.55362153", "0.55262554", "0.54389626", "0.5432067", "0.54302734", "0.5424752", "0.5418523", "0.5408295", "0.54035044", "0.54003674", "0.5381782", "0.5348674", "0.53313863", "0.5312118", "0.5306113", "0.52920794", "0.5286469", "0.528122", "0.527328", "0.52695733", "0.52646995", "0.5263049", "0.52570957", "0.52488357", "0.5237412", "0.52318704", "0.5222168", "0.5221593", "0.52199787", "0.52163744", "0.52148205", "0.52051485", "0.5200683", "0.5200159", "0.51945275", "0.51935136", "0.51887274", "0.5183205", "0.5176203", "0.5176203", "0.5175548", "0.5163788", "0.5153604", "0.5149135", "0.51458836", "0.51203954", "0.5120161", "0.51185673", "0.5095173", "0.50930655", "0.5092035", "0.5085693", "0.50856405", "0.5077618", "0.5074368", "0.506528", "0.50599587", "0.5053048", "0.5052879", "0.5050694", "0.5048849", "0.5045628", "0.50442225", "0.5038454", "0.5031741", "0.502744", "0.50254524", "0.5025112", "0.50239474", "0.5020349", "0.50140786", "0.5012838", "0.50071406", "0.50038576", "0.50016606" ]
0.79522145
0
Test of newAddress method, of class AddressDAO.
@Test public void testNewAddress() { System.out.println("newAddress"); String rua = "felicia"; String codigoPostal = "1211"; String localidade = "Mancelos"; Object result = instance.newAddress(rua, codigoPostal, localidade); assertTrue(result instanceof Address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testInsertNew() {\n System.out.println(\"insertNew\");\n Address obj = new Address(\"tregi\",\"333\",\"Porto\");;\n boolean expResult = true;\n boolean result = instance.insertNew(obj);\n assertEquals(expResult, result);\n }", "public @NotNull Address newAddress();", "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "public void testAddAddress5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getState().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testRegisterAddress() {\n System.out.println(\"registerAddress\");\n Address morada = new Address(\"dra\",\"333\",\"Porto\");\n boolean expResult = true;\n boolean result = instance.registerAddress(morada);\n assertEquals(expResult, result);\n }", "public Address createAddress(String address);", "Address createAddress();", "abstract public Address createAddress(String addr);", "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testAddAddress_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "public void testAddAddress2() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationUser(null);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "public void testAddAddresses() throws Exception {\r\n try {\r\n this.dao.addAddresses(new Address[]{null}, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "Adresse createAdresse();", "public void testAddAddress3() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setModificationUser(null);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void address1Test() {\n // TODO: test address1\n }", "@Override\r\n\tpublic void insert(Address obj) {\r\n\t\tValidationReturn validation = validator.insert(obj);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\t\r\n\t\tString collumsToInsert = \"street, district, number\";\r\n\t\tString valuesToInsert = \"'\" + obj.getStreet() + \"','\" + obj.getDistrict() + \"',\" + obj.getNumber();\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty()) {\r\n\t\t\tcollumsToInsert += \", note\";\r\n\t\t\tvaluesToInsert += (\",'\" + obj.getNote() + \"'\");\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBCModel.singleCall(\"INSERT INTO address (\" + collumsToInsert + \") VALUES (\" + valuesToInsert + \");\");\r\n\t}", "public void testAddAddresses_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "public int insert(Address address) throws Exception;", "AddressDao getAddressDao();", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testUpdateAddress() {\n System.out.println(\"updateAddress\");\n String address = \"Sortegade 10\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateAddress(customerID, address);\n assertEquals(\"Sortegade 10\", instance.getCustomer(customerID).getAddress());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public void testAddAddress_PersistenceException()\r\n throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(10);\r\n this.dao.addAddress(address, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test\n void testSuccess_saveAndLoadStreetLines() {\n assertAddress(saveAndLoad(entity).address, \"123 W 14th St\", \"8th Fl\", \"Rm 8\");\n }", "@Override\n\tpublic int addAddress(Address address) {\n\t\treturn sqlSessionTemplate.insert(sqlId(\"addFullAddress\"),address);\n\t}", "public void addAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO contact_info (`person_id`, `contact_date`, `address_line_1`, `address_line_2`, `city`, `state`, `country`, `zipcode`) values (?, curdate(), ?, ?, ?, ?, ?, ?)\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t //stmt.setDate(2, new java.sql.Date(DateUtility.getDateObj(address.getContactDate()).getTime()));\n\t\t stmt.setString(2, address.getAddress1());\n\t\t stmt.setString(3, address.getAddress2());\n\t\t stmt.setString(4, address.getCity());\n\t\t stmt.setString(5, address.getState());\n\t\t stmt.setString(6, address.getCountry());\n\t\t stmt.setString(7, address.getZip());\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t // Interaction with Other Two Tables \n\t\t addPhoneNumber(address);\n\t\t addEmailAddress(address);\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Address Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Test\n public void testGetAdressByID() throws Exception {\n System.out.println(\"getAdressByID\");\n int adressID = 0;\n String result = instance.getAdressByID(adressID);\n assertTrue(!result.isEmpty());\n \n }", "public void testAddAddress_IDGenerationException()\r\n throws Exception {\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 1);\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n fail(\"IDGenerationException expected\");\r\n } catch (IDGenerationException e) {\r\n //good\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 0);\r\n }\r\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\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\n\tvoid testSetAddress() {\n\t\tassertNull(this.customer.getAddress());\n\t\t\n\t\t//sets address for customer\n\t\tthis.customer.setAddress(\"Brooklyn, NY\");\n\t\t\n\t\t//checks that address was set correctly\n\t\tassertEquals(\"Brooklyn, NY\", this.customer.getAddress());\n\t\t\n\t\t//reset address for customer\n\t\tthis.customer.setAddress(\"Cranston, RI\");\n\t\t\n\t\t//checks that address was reset correctly\n\t\tassertEquals(\"Cranston, RI\", this.customer.getAddress());\n\t}", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }", "public @NotNull Address newAddress(@NotNull @Size(min = 1, max = 255) final String street,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String city, @NotNull final State state, @NotNull Integer zipcode);", "@Test\n public void getAddress() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getAddress(), address);\n }", "public boolean addAddress(AddressDTO address) throws RetailerException, ConnectException {\n\t\tboolean addAddressState = address.isAddressStatus();\n\t\tString addressID = address.getAddressId();\n\t\tString retailerID = address.getRetailerId();\n\t\tString city = address.getCity();\n\t\tString state = address.getState();\n\t\tString zip = address.getZip();\n\t\tString buildingNum = address.getBuildingNo();\n\t\tString country = address.getCountry();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tconnection = DbConnection.getInstance().getConnection();\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\tgoProps = PropertiesLoader.loadProperties(GO_PROPERTIES_FILE);\n\n\t\t\tPreparedStatement statement = connection.prepareStatement(QuerryMapper.INSERT_NEW_ADDRESS_IN_ADDRESSDB);\n\t\t\tstatement.setString(1, addressID);\n\t\t\tstatement.setString(2, retailerID);\n\t\t\tstatement.setString(3, city);\n\t\t\tstatement.setString(4, state);\n\t\t\tstatement.setString(5, zip);\n\t\t\tstatement.setString(6, buildingNum);\n\t\t\tstatement.setString(7, country);\n\t\t\tstatement.setBoolean(8, addAddressState);\n\t\t\tint row = statement.executeUpdate();\n\t\t\tif (row == 1)\n\t\t\t\treturn true;\n\t\t} catch (DatabaseException | IOException | SQLException e)// SQLException\n\t\t{\n\t\t\tGoLog.logger.error(exceptionProps.getProperty(EXCEPTION_PROPERTIES_FILE));\n\t\t\tthrow new RetailerException(\".....\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new ConnectException(Constants.connectionError);\n\t\t\t}\n\t\t}\n\n\t\treturn addAddressState;\n\t}", "public static Address createInvalidAddressFixture() {\n Map<String, Object> objectMap = new HashMap<String, Object>();\n objectMap.put(\"name\", \"Undefault New Wu\");\n objectMap.put(\"street1\", \"Clayton St.\");\n objectMap.put(\"street_no\", \"215215\");\n objectMap.put(\"street2\", null);\n objectMap.put(\"city\", \"San Francisco\");\n objectMap.put(\"state\", \"CA\");\n objectMap.put(\"zip\", \"94117\");\n objectMap.put(\"country\", \"US\");\n objectMap.put(\"phone\", \"+1 555 341 9393\");\n objectMap.put(\"email\", \"[email protected]\");\n objectMap.put(\"is_residential\", false);\n objectMap.put(\"metadata\", \"Customer ID 123456\");\n objectMap.put(\"validate\", true);\n\n try {\n return Address.create(objectMap);\n } catch (ShippoException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void saveNewAddress(Address addr) throws BackendException;", "@Test\n public void testSetAddress() {\n System.out.println(\"setAddress\");\n user.setAddress(\"Tiquipaya\");\n assertEquals(\"Tiquipaya\", user.getAddress());\n }", "int insert(Addresses record);", "@Test\n public void testPersistAndLoadAddress() {\n \t//need instances of these classes\n\t Address address = new Address();\n\t User user = new User();\n\t Cart cart = new Cart();\n\t \n\t \n\t //parameters for address\n\t String city = \"city\";\n\t String country = \"country\";\n\t String postalCode = \"postalCode\";\n\t String province = \"province\";\n\t String street1 = \"street1\";\n\t String street2 = \"street2\";\n\t //Integer addressID = \"TESTaddressID\".hashCode();\n\t \n\t \n\t //parameters for user\n\t String username = \"testUser20\";\n\t String password = \"passW0rd\";\n\t String email = \"[email protected]\";\n\t String profilePicURL = \"//yes.com/img.jpg\";\n\t Set<Address> addrs= new HashSet<>();\n\t \taddrs.add(address);\n\t Set<Artwork> artworks= new HashSet<>();\n\t Set<Order> orders= new HashSet<>();\n\t \t\n\t \t\n\t //parameters for cart\n\t //Integer cartID = \"TESTcartID\".hashCode();\n\t double totalCost = 100.1;\n\t \n\t //set address parameters\n\t address.setCity(city);\n\t address.setCountry(country);\n\t address.setPostalCode(postalCode);\n\t address.setProvince(province);\n\t address.setStreetAddress1(street1);\n\t address.setStreetAddress2(street2);\n\t //address.setAddressID(addressID);\n\t address.setUser(user);\n\t \n\t \n\t //set user parameters\n\t user.setUsername(username);\n\t user.setPassword(password);\n\t user.setEmail(email);\n\t user.setProfilePictureURL(profilePicURL);\n\t user.setCart(cart);\n\t user.setAddress(addrs);\n\t user.setOrder(orders);\n\t user.setArtwork(artworks);\n\t \n\t \n\t //set cart parameters\n\t //cart.setCartID(cartID);\n\t cart.setTotalCost(totalCost);\n\t cart.setUser(user);\n\t \n\t //save instances to database \n\t user = userRepository.save(user);\n\t //cart.setUser(user);\n\t //cart = cartRepository.save(cart);\n\t address = addressRepository.save(address);\n\n //restore address instance from database\n Address addressPersisted = addressRepository.findAddressByAddressID(address.getAddressID());\n\n //assert if instance retrieved from database equals the original\n assertEquals(address.getAddressID(), addressPersisted.getAddressID());//address.equals(addressPersisted));\n }", "public void testRegisterNewAuthor() {\r\n //given\r\n /*System.out.println(\"registerNewAuthor\"); \r\n String name = \"James Fenimore\";\r\n String surname = \"Cooper\";\r\n int birthYear = 1789;\r\n int deathYear = 1851;\r\n String shortDescription = \"One of the most popular american novelists\";\r\n String referencePage = \"http://en.wikipedia.org/wiki/James_Fenimore_Cooper\";\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n boolean expResult = true;\r\n \r\n //when\r\n boolean result = instance.registerNewAuthor(name, surname, birthYear, deathYear, shortDescription, referencePage);\r\n \r\n //then\r\n assertEquals(expResult, result);*/ \r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "public void testupdateAddress_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "public void createBillingAddress() throws Exception{\n\t\t\n\t\ttype(firstNameTextBox,\"bob\");\n\t\ttype(lastNameTextBox,\"test\");\n\t\ttype(addressLine1TextBox,\"2716 Ocean Park Blvd Suite 1030\");\n\t\ttype(addressLine2TextBox,\"test house\");\n\t\ttype(cityTextBox,\"Santa Monica\");\n\t\ttype(zipcodeTextBox,\"90405\");\n\t\tselect(stateSelectBox,8);\n\t\ttype(phoneTextField,\"6666654686\");\n\t\ttype(companyTextField,\"test company\");\n\t\n\t}", "@Override\r\n\tpublic Adress createAdress(Adress adress) {\n\t\tem.persist(adress);\r\n\t\treturn adress;\r\n\t}", "@Test\n public void testGetAddress() {\n System.out.println(\"getAddress\");\n Member instance = member;\n \n String expResult = \"01 London Road, Littlemoore, Oxford\";\n String result = instance.getAddress();\n \n assertEquals(expResult, result);\n }", "@Test\n\tpublic void displayAddressTest() {\n\t\tassertNotNull(\"Address is not null\", instance.displayAddress());\n\t}", "@Test\n public void testGetCoordinatesByAddressID() throws Exception {\n System.out.println(\"getCoordinatesByAddressID\");\n int adressID = 0;\n String result = instance.getCoordinatesByAddressID(adressID);\n assertTrue(!result.isEmpty());\n }", "@Test\n public void testACreateCity() {\n // do not replace this with a call to setUserContext,\n // the city must be stored using the client/org of the 100 user\n // this ensures that webservice calls will be able to find the city\n // again\n OBContext.setOBContext(\"100\");\n\n // first delete the current cities, as we should start fresh\n final OBCriteria<City> obc = OBDal.getInstance().createCriteria(City.class);\n for (final City c : obc.list()) {\n OBDal.getInstance().remove(c);\n }\n\n final City city = OBProvider.getInstance().get(City.class);\n city.setAreaCode(\"3941\");\n city.setCoordinates(\"00\");\n city.setCoordinates(\"lo\");\n city.setPostalCode(\"postal\");\n city.setName(\"name\");\n city.setCountry(getOneInstance(Country.class));\n city.setRegion(getOneInstance(Region.class));\n OBDal.getInstance().save(city);\n commitTransaction();\n cityId = city.getId();\n }", "public void testupdateAddress1() throws Exception {\r\n try {\r\n this.dao.updateAddress(null, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test( dataProvider=\"AddressValidationTestData\", groups ={\"BillingAddressValidations\"})\r\n\r\n\tpublic static void AddNewBillingAddress(String[] BillingAddressDetailsInArray){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tAssert.assertEquals( launchAndValidateDifferentBillingAddresses(BillingAddressDetailsInArray) ,true) ;\t\t\t\t\r\n\t\t\tWaitUtil.waitFor(Driver,\"THREAD_SLEEP\", (long)200);\t\r\n\t\t\tAssert.assertEquals(new FrontEndCommonPage(Driver).logout(),true) ;\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch ( TestException Te)\r\n\t\t{\r\n\t\t\tTestLog.logTestStep(\"Error/Exception : \" + Te.getExceptionName());\r\n\t\t\tTe.printException();\r\n\t\t\tassert(false);\r\n\t\t}\t\t\r\n\t\tcatch (InterruptedException e){\r\n\t\t\t//do nothing\t\t\r\n\t\t}\r\n\t\tcatch ( Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tTestLog.logTestStep(\"Error/Exception \" + e.getMessage());\r\n\t\t\tassert(false) ;\r\n\t\t}\t\t\r\n\t}", "public void addPhoneNumber(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"INSERT INTO phone_number_info (`person_id`, `phone_number`, `created_date`) values (?, ?, curdate())\");\n\t\t \n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t stmt.setInt(2,Integer.parseInt(address.getPhoneNumber()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t ResultSet rs = stmt.getGeneratedKeys();\n\t\t if (rs.next()) {\n\t\t int newId = rs.getInt(1);\n\t\t address.setPhoneNumberId(String.valueOf(newId));\n\t\t }\n\t\t \n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Inserting into Phone Number Object \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddress() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "public org.xmlsoap.schemas.wsdl.soap.TAddress addNewAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n return target;\n }\n }", "@Test\n public void testAddCity_City04() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n\n boolean result = sn10.addCity(cityTest);\n assertFalse(result);\n }", "@Test\n public void testEmergencyAddress() {\n // TODO: test EmergencyAddress\n }", "public static Address addAddress() {\r\n\r\n\t\tSystem.out.println(\"Please enter the building number of the supplier:\");\r\n\r\n\t\tint bldNum = Validation.intValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the supplier's street name:\");\r\n\t\tString bldStreet = Validation.stringNoIntsValidation();\r\n\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the town the supplier is in:\");\r\n\t\tString bldTown = Validation.stringNoIntsValidation();\t\t\r\n\r\n\t\tSystem.out.println(\"Please enter the postcode for the supplier:\");\r\n\t\tString bldPCode = Validation.stringValidation();\r\n\r\n\t\tSystem.out.println(\"Please enter the country the supplier is in:\");\r\n\t\tString bldCountry = Validation.stringNoIntsValidation();\r\n\r\n\t\tAddress newAddress = new Address(bldNum, bldStreet, bldTown, bldPCode, bldCountry);\r\n\r\n\t\treturn newAddress;\r\n\r\n\t}", "@Override\r\n\tpublic boolean insertAddress(Map<String, String> address) {\n\t\treturn ado.insertAddress(address);\r\n\t}", "public Address() {}", "public Address() {\n }", "public Address() {\n }", "public void testupdateAddresses_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "@Test\n public void testGetAllAddresses() throws Exception {\n List<Address> expected = new ArrayList<>();\n expected.add(createMockedAddress(1));\n\n new Expectations() {{\n jdbcTemplate.query(anyString, (RowMapperResultSetExtractor<?>) any);\n returns(expected);\n }};\n\n List<Address> actual = addressService.getAllAddresses();\n assertEquals(actual.size(), 1);\n assertEquals(actual.get(0), expected.get(0));\n }", "public Address() {\n\t}", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public void testAddAddresses_IDGenerationException()\r\n throws Exception {\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 1);\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, false);\r\n fail(\"IDGenerationException expected\");\r\n } catch (IDGenerationException e) {\r\n //good\r\n this.exhaustIDGenerator(\"AddressIDGenerator\", 0);\r\n }\r\n }", "public boolean addAddress(Address address) {\n\t\tList<Address> addresslist = addressdao.findByUserUId(address.getUser().getId());\r\n\t\tif(addresslist.size() == 0){\r\n\t\t\taddressdao.save(address);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void testAddCity_City02() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.200000, -8.000000), \"cityTest\", 30);\n\n boolean result = sn10.addCity(cityTest);\n assertTrue(result);\n }", "public void setAddress(String newAddress) {\r\n\t\tthis.address = newAddress;\r\n\t}", "@Test\n public void testSetAddress() {\n System.out.println(\"setAddress\");\n Member instance = member;\n \n String address = \"10 New Road, Hackney, London\";\n instance.setAddress(address);\n \n String expResult = address;\n String result = instance.getAddress();\n \n assertEquals(expResult,result);\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionEditAddressApprove() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n currentAddress.setZipCode(\"12345\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "public static Address newAddress(final String address) throws AddressException,\r\n\t\tUnsupportedEncodingException\r\n\t{\r\n\t\treturn newAddress(address, null, null);\r\n\t}", "public Address() {\n \t\n }", "private void onClickCreateAddressButton() {\n // Validate\n if (!formValidated()) {\n } else {\n\n ContentValues values = new ContentValues();\n values.put(\"address_form[id]\", \"\");\n values.put(\"address_form[first_name]\", name.getText().toString());\n values.put(\"address_form[last_name]\", family.getText().toString());\n values.put(\"address_form[address1]\", address.getText().toString());\n values.put(\"address_form[address2]\", postal_code.getText().toString());\n values.put(\"address_form[region]\", region_Id);\n values.put(\"address_form[city]\", city_Id);\n if (post_id != UNKNOWN_POSTAL_CODE) {\n values.put(\"address_form[postcode]\", post_id);\n } else {\n values.put(\"address_form[postcode]\", \"\");\n }\n values.put(\"address_form[phone]\", cellphone.getText().toString());\n values.put(\"address_form[is_default_shipping]\", 1);\n values.put(\"address_form[is_default_billing]\", 1);\n\n values.put(\"address_form[gender]\", gender_lable);\n\n\n triggerCreateAddress(createAddressUrl, values);\n }\n }", "public Long createAndStoreAddress(Address address, Long userId)\n {\n \tLong returnValue = Long.valueOf(0);\n\n address.setCreatedByID(userId);\n address.setUpdatedByID(userId);\n address.setDateCreated(new Date());\n address.setDateUpdated(new Date());\n \n this.sessionFactory.getCurrentSession().save(address);\n \n returnValue = address.getId();\n\t\t\n\t\treturn returnValue;\n }", "public void testInformixAddressDAO1() throws Exception {\r\n try {\r\n this.removeConfigManagerNS();\r\n new InformixAddressDAO();\r\n fail(\"ConfigurationException expected\");\r\n } catch (ConfigurationException e) {\r\n //good\r\n this.initialConfigManager();\r\n }\r\n }", "int insert(AddressMinBalanceBean record);", "@Test\n public void createTest() {\n reservationService.create(reservation1);\n Mockito.verify(reservationDao).create(reservation1);\n }", "@Test\n public void testIsValidAddress() {\n System.out.println(\"isValidAddress\");\n String address = \"Trion Ierarxon 86, Larissa\";\n boolean expResult = true;\n boolean result = ValidVariables.isValidAddress(address);\n assertEquals(expResult, result);\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testDeleteAddressCase1() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n final ServiceResult<Address> result = this.addressService.deleteAddress(currentAddress);\n Assert.assertTrue(result.isSuccess());\n }", "public void newAddress(lnrpc.Rpc.NewAddressRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.NewAddressResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getNewAddressMethod(), responseObserver);\n }", "@Test\n public void testGet() {\n System.out.println(\"get\");\n int id = 0;\n Address result = instance.get(id);\n assertTrue(result.validate());\n \n }", "public void testupdateAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public Address() {\r\n\t\tsuper();\r\n\t}", "public boolean updateAddress(Address newAddress);", "public void testassociate5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationUser(null);\r\n this.dao.associate(address, 1, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void save(Address entity);", "public void testupdateAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "public void testassociate2() throws Exception {\r\n try {\r\n this.dao.associate(new Address(), -1, true);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void setAddress(String address) { this.address = address; }", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public com.google.common.util.concurrent.ListenableFuture<lnrpc.Rpc.NewAddressResponse> newAddress(\n lnrpc.Rpc.NewAddressRequest request) {\n return futureUnaryCall(\n getChannel().newCall(getNewAddressMethod(), getCallOptions()), request);\n }", "void setAddressDao(final AddressDao addressDao);", "public void testRemoveAddress() throws Exception {\r\n try {\r\n this.dao.removeAddress(-1, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public void testSearchAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.searchAddresses(AddressFilterFactory.createCreatedByFilter(\"user\"));\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }" ]
[ "0.70981437", "0.70621604", "0.7039933", "0.69808125", "0.6918991", "0.6907952", "0.6891381", "0.6889097", "0.68633336", "0.6775921", "0.67263675", "0.665746", "0.66314137", "0.6582466", "0.65127563", "0.6500077", "0.6458097", "0.6423994", "0.6360928", "0.63139844", "0.62624025", "0.6258016", "0.62529093", "0.62447786", "0.6242594", "0.6225467", "0.6219235", "0.62110794", "0.61773145", "0.6157221", "0.6154429", "0.6150174", "0.61456597", "0.61395043", "0.6110393", "0.60937774", "0.6089719", "0.6085401", "0.6073559", "0.6073477", "0.6061205", "0.60600746", "0.6055874", "0.6055057", "0.6052083", "0.6045641", "0.6045328", "0.6037671", "0.60296005", "0.6026819", "0.60216266", "0.60180306", "0.6013532", "0.60117114", "0.5996126", "0.59903634", "0.598986", "0.5985537", "0.5976464", "0.5976041", "0.5973641", "0.59726506", "0.5972043", "0.5972043", "0.5957606", "0.5914351", "0.5909274", "0.58916277", "0.58850473", "0.58817065", "0.588121", "0.5880741", "0.58783185", "0.5872243", "0.5865733", "0.58544755", "0.5849903", "0.5848925", "0.5843893", "0.5843611", "0.58366716", "0.5833884", "0.58316094", "0.582176", "0.58089006", "0.57994455", "0.5799144", "0.5784038", "0.5780927", "0.576521", "0.57585585", "0.5753085", "0.57528126", "0.57526636", "0.57495034", "0.57495034", "0.57481277", "0.573587", "0.5730816", "0.5715994" ]
0.77192307
0
Test of insertNew method, of class AddressDAO.
@Test public void testInsertNew() { System.out.println("insertNew"); Address obj = new Address("tregi","333","Porto");; boolean expResult = true; boolean result = instance.insertNew(obj); assertEquals(expResult, result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void insertSuccess() {\n Date today = new Date();\n User newUser = new User(\"Artemis\", \"Jimmers\", \"[email protected]\", \"ajimmers\", \"supersecret2\", today);\n int id = dao.insert(newUser);\n assertNotEquals(0, id);\n User insertedUser = (User) dao.getById(id);\n assertNotNull(insertedUser);\n assertEquals(\"Jimmers\", insertedUser.getLastName());\n //Could continue comparing all values, but\n //it may make sense to use .equals()\n }", "@Test\n public void test1Insert() {\n\n System.out.println(\"Prueba de SpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.insert(spec), 1);\n \n }", "@Test\n void insertSuccess() {\n String name = \"Testing a new event\";\n LocalDate date = LocalDate.parse(\"2020-05-23\");\n LocalTime startTime = LocalTime.parse(\"11:30\");\n LocalTime endTime = LocalTime.parse(\"13:45\");\n String notes = \"Here are some new notes for my new event.\";\n GenericDao userDao = new GenericDao(User.class);\n User user = (User)userDao.getById(1);\n\n Event newEvent = new Event(name, date, startTime, endTime, notes, user);\n int id = genericDao.insert(newEvent);\n assertNotEquals(0,id);\n Event insertedEvent = (Event)genericDao.getById(id);\n assertEquals(newEvent, insertedEvent);\n }", "@Test\n public void testInsert() {\n int resultInt = disciplineDao.insert(disciplineTest);\n // Je pense à le suppr si l'insert à fonctionné\n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n disciplineDao.delete(disciplineTest);\n }\n assertTrue(resultInt > 0);\n }", "int insert(Addresses record);", "@Test\n\tpublic void testInsertObj() {\n\t}", "@Test\n void insertSuccess() {\n int insertedCarId;\n\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(1);\n\n //Create Inserted Car\n Car insertedCar = new Car(user,\"2016\",\"Honda\",\"Civic\",\"19XFC1F35GE206053\");\n\n //Save Inserted Car\n insertedCarId = carDao.insert(insertedCar);\n\n //Get Saved Car\n Car retrievedCar = carDao.getById(insertedCarId);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(insertedCar,retrievedCar);\n }", "@Test\n void insertWithTripSuccess() {\n String newUserFirst = \"Dave\";\n String newUserLast = \"Bowman\";\n String newUserEmail = \"[email protected]\";\n String newUserUname = \"dbowman1\";\n String newUserPassword = \"Supersecret2!\";\n String tripCityLoc = \"MILWWI\";\n int tripCount = 6;\n String tripRating = \"5\";\n String tripComment = \"Definitely worth a second look\";\n Date today = new Date();\n User newUser = new User(newUserFirst, newUserLast, newUserEmail, newUserUname, newUserPassword, today);\n //Usertrip newUserTrip = new Usertrip(newUser, tripCityLoc, tripCount, tripRating, tripComment, today);\n //newUser.addTrip(newUserTrip);\n //int id = dao.insert(newUser);\n //assertNotEquals(0, id);\n //User insertedUser = (User) dao.getById(id);\n //assertNotNull(insertedUser);\n //assertEquals(\"dbowman1\", insertedUser.getUserName());\n //assertEquals(1, insertedUser.getUsertrips().size());\n\n }", "private static void testInsert() {\n\t\tSkemp skemp = new Skemp();\n\t\tskemp.setId(99);\n\t\tskemp.setName(\"王2\");\n\t\tskemp.setSex(\"男\");\n\t\tSkempDao skempDao = new SkempDaoImpl();\n\t\tskempDao.insertSkemp(skemp);\n\t}", "@Override\r\n\tpublic void insert(Address obj) {\r\n\t\tValidationReturn validation = validator.insert(obj);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\t\r\n\t\tString collumsToInsert = \"street, district, number\";\r\n\t\tString valuesToInsert = \"'\" + obj.getStreet() + \"','\" + obj.getDistrict() + \"',\" + obj.getNumber();\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty()) {\r\n\t\t\tcollumsToInsert += \", note\";\r\n\t\t\tvaluesToInsert += (\",'\" + obj.getNote() + \"'\");\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBCModel.singleCall(\"INSERT INTO address (\" + collumsToInsert + \") VALUES (\" + valuesToInsert + \");\");\r\n\t}", "@Test\n\tpublic void testInsert(){\n\t\tUser u = new User();\n\t\tu.setFirst(\"ttest\");\n\t\tu.setLast(\"ttest2\");\n\t\tu.setUsername(\"testusername\");\n\t\tu.setPassword(\"password\");\n\t\t//u.getSalt();\n\t\tu.setUserWins(1);\n\t\tu.setUserLosses(3);\n\t\tu.setUserRecord(0.25);\n\t\t\n\t\twhen(udaoMock.insert(u)).thenReturn(u);\n\t\tassertEquals(u, uSerMock.insertUser(u));\n\n\t}", "@Test\r\n public void testA1Insert() throws Exception {\r\n System.out.println(\"insert\");\r\n \r\n Usuario obj = new Usuario();\r\n obj.setFullName(\"Nicolas Duran\");\r\n obj.setUser(\"admin\");\r\n obj.setPassword(\"admin\");\r\n obj.setEmail(\"[email protected]\");\r\n obj.setType(1);\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n int expResult = 0;\r\n int result = instance.insert(obj);\r\n \r\n assertNotEquals(expResult, result);\r\n }", "@Test\r\n public void testInsert() {\r\n assertTrue(false);\r\n }", "public int insert(Address address) throws Exception;", "int insert(AddressMinBalanceBean record);", "public void testInsert() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n assertTrue(root.getInt(\"COMPANY[1]/ID\") > 0);\n\n }", "@Test\n void insertSuccess() {\n User newUser = new User(\"testname\",\"testpass\",\"Test\",\"name\",\"[email protected]\");\n UserRoles newRole = new UserRoles(1, \"administrator\", newUser, \"testname\");\n int id = genericDAO.insert(newRole);\n assertNotEquals(0,id);\n UserRoles insertedRole = (UserRoles)genericDAO.getByID(id);\n assertEquals(\"administrator\", insertedRole.getRoleName(), \"role is not equal\");\n }", "int insert(TestEntity record);", "@Test\n public void insert() {\n// int insert = iUserDao.insert(u);\n// System.out.println(u);\n\n }", "@Test\n public void testNewAddress() {\n System.out.println(\"newAddress\");\n String rua = \"felicia\";\n String codigoPostal = \"1211\";\n String localidade = \"Mancelos\";\n Object result = instance.newAddress(rua, codigoPostal, localidade);\n assertTrue(result instanceof Address);\n }", "public void testInsert() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService service = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(service); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE employee = ?\");\r\n\t\tps.setString(1, \"employee\");\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}", "int insert(CityDO record);", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionCreateNewAddress() throws Exception {\n final AddressDto currentAddress = new AddressDto();\n currentAddress.setAddress1(\"test1\");\n currentAddress.setAddress2(\"test1\");\n currentAddress.setMtCountry(this.countryRepository.getMtCountryByMtCountryId(1));\n currentAddress.setZipCode(\"12345\");\n currentAddress.setProvince(\"test1\");\n currentAddress.setCity(\"Ha Noi\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Test\n public void testInsertingValidValues() throws SQLException {\n CommitStructure commit = getSampleCommit();\n MysqlDatabase mysqlDatabase = new MysqlDatabase(connection);\n assertTrue(mysqlDatabase.insertCommitToDatabase(commit));\n }", "@Test\n void insertSuccess() {\n GenericDao userDao = new GenericDao(User.class);\n //get a user to insert a new role\n User toInsert = (User) userDao.getEntityByName(\"lastName\", \"Curry\").get(0);\n\n UserRoles roles = new UserRoles(\"admin\", toInsert, toInsert.getUserName() );\n int id = genericDao.insert(roles);\n assertNotEquals(0, id);\n int insertedRoles = roles.getId();\n //assertEquals(toInsert.getId(), insertedRoles);\n }", "@Insert({\n \"insert into t_address (addrid, userid, \",\n \"province, city, \",\n \"region, address, \",\n \"postal, consignee, \",\n \"phone, status, createdate)\",\n \"values (#{addrid,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, \",\n \"#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, \",\n \"#{region,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, \",\n \"#{postal,jdbcType=VARCHAR}, #{consignee,jdbcType=VARCHAR}, \",\n \"#{phone,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP})\"\n })\n int insert(Address record);", "@InsertProvider(type=AddressSqlProvider.class, method=\"insertSelective\")\n int insertSelective(Address record);", "@Test\n\tpublic void testAInsert() {\n\t\tDynamicSqlDemoEntity demoEntity = new DynamicSqlDemoEntity();\n\t\tdemoEntity.setCol1(\"dummyValue\" + UUID.randomUUID().toString());\n\t\tem.persist(demoEntity);\n\t\tassertNotNull(demoEntity.getId());\n\t\tassertTrue(em.contains(demoEntity));\n\t\tid = demoEntity.getId();\n\t}", "@Test\n public void testInsertDataWSSuccess() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tProvider provider = new Provider();\n \tPersonDAO personDAO = new PersonDAOImpl();\n \tPerson person = new Person();\n \tperson = personDAO.getPersonById(\"1\");\n \tprovider = providerDAO.getProviderByPerson(person);\n \tString retVal = providerDAO.insertDataWS(provider);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t\tSystem.out.println(\"[testInsertDataWSSuccess] - \" + retVal);\n \t} else {\n \t\tAssert.assertTrue(false);\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }", "@Test\n\tpublic void testInsert() {\n\t\tModuleAssociation returnedModuleAssociation = moduleAssociationRepo.insert(moduleAssociation);\n\t\tModuleAssociation moduleAssociations = moduleAssociationRepo\n\t\t\t\t.selectByID(returnedModuleAssociation.getAssociationID());\n\t\tassertNotNull(moduleAssociations);\n\t\t// Updates the moduleAssociation in the table\n\t\treturnedModuleAssociation.setAssociationType(OTHER_ASSOCIATION_TYPE_IN_DB);\n\t\t// Inserts one moduleAssociation to table\n\t\tmoduleAssociationRepo.insert(returnedModuleAssociation);\n\t\tmoduleAssociations = moduleAssociationRepo.selectByID(returnedModuleAssociation.getAssociationID());\n\t\tassertEquals(OTHER_ASSOCIATION_TYPE_IN_DB,\n\t\t\t\tmoduleAssociations.getAssociationType().intValue());\n\t}", "public void testRegisterNewAuthor() {\r\n //given\r\n /*System.out.println(\"registerNewAuthor\"); \r\n String name = \"James Fenimore\";\r\n String surname = \"Cooper\";\r\n int birthYear = 1789;\r\n int deathYear = 1851;\r\n String shortDescription = \"One of the most popular american novelists\";\r\n String referencePage = \"http://en.wikipedia.org/wiki/James_Fenimore_Cooper\";\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n boolean expResult = true;\r\n \r\n //when\r\n boolean result = instance.registerNewAuthor(name, surname, birthYear, deathYear, shortDescription, referencePage);\r\n \r\n //then\r\n assertEquals(expResult, result);*/ \r\n }", "@Test\n public void testInsert() throws Exception {\n\n }", "@Test\n void insertNoteSuccess() {\n Note newNote = new Note();\n\n newNote.setProspect(\"Graham Mertz\");\n newNote.setCollege(\"University of Wisconsin - Madison\");\n newNote.setUserId(1);\n newNote.setAge(19);\n newNote.setHeightFeet(6);\n newNote.setHeightInches(3);\n newNote.setWeight(225);\n newNote.setPosition(\"QB\");\n newNote.setRating(\"7/10\");\n newNote.setReport(\"He was redshirted his freshman season, and his first full season as a starter was derailed from covid. He showed a lot of good and also some bad plays, but we'll have to wait and see how he does with a real season.\");\n\n int id = noteDao.insert(newNote);\n assertNotEquals(0, id);\n Note insertedNote = (Note) noteDao.getById(id);\n\n assertEquals(\"Graham Mertz\", insertedNote.getProspect());\n assertEquals(\"University of Wisconsin - Madison\", insertedNote.getCollege());\n assertEquals(1, insertedNote.getUserId());\n assertEquals(19, insertedNote.getAge());\n assertEquals(6, insertedNote.getHeightFeet());\n assertEquals(3, insertedNote.getHeightInches());\n assertEquals(225, insertedNote.getWeight());\n assertEquals(\"QB\", insertedNote.getPosition());\n assertEquals(\"7/10\", insertedNote.getRating());\n }", "@Test\n public void testInserts() throws ConnectionException {\n //adding test ProviderEntry to database\n ProviderEntry pe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n ProviderEntry ppe = MariaDbConnectorTest.instance.findProviderEntryByName(\"test\");\n assertEquals(pe, ppe); // Passes if insert succeeded\n \n \n //adding test RouteEntry to database\n RouteEntry re = new RouteEntry();\n re.setName(\"test\");\n re.setDescription(\"test\");\n MariaDbConnectorTest.instance.insert(re);\n RouteEntry rre = MariaDbConnectorTest.instance.findRouteEntryByName(\"test\");\n assertEquals(re, rre); // Passes if insert has succeeded\n \n //adding test DataEntry to database\n int traveltime = 1234569;\n DataEntry de = new DataEntry(traveltime, rre, ppe);\n MariaDbConnectorTest.instance.insert(de);\n System.out.println(ppe.getId());\n System.out.println(rre.getId());\n System.out.println(de.getTimestamp());\n DataEntry dde = MariaDbConnectorTest.instance.findDataEntryByID(ppe.getId(), rre.getId(), de.getTimestamp());\n //assertEquals(de, dde); // Passes if insert has succeeded\n \n // Removing all added testdata from database. Removing route & providers suffices\n MariaDbConnectorTest.instance.delete(ppe);\n MariaDbConnectorTest.instance.delete(rre);\n \n // Check if the provider & route objects are removed from the database\n RouteEntry rrre = MariaDbConnectorTest.instance.findRouteEntryByID(rre.getId());\n assertNull(rrre); // Passes if the test RouteEntry object does not exist anymore in the database\n \n ProviderEntry pppe = MariaDbConnectorTest.instance.findProviderEntryByID(ppe.getId());\n assertNull(pppe);\n \n \n \n \n }", "@Test\n public void testSave()throws Exception {\n System.out.println(\"save\");\n String query = \"insert into librarian(name,password,email,address,city,contact) values(?,?,?,?,?,?)\";\n String name = \"Raf\";\n String password = \"rrrr\";\n String email = \"[email protected]\";\n String address = \"1218/7\";\n String city = \"dacca\";\n String contact = \"016446\";\n int expResult = 0;\n \n //when(mockDb.getConnection()).thenReturn(mockConn);\n when(mockConn.prepareStatement(query)).thenReturn(mockPs);\n int result = mockLibrarian.save(name, password, email, address, city, contact);\n assertEquals(result >0, true);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test\n public void testInserirCliente() {\n \n \n System.out.println(\"inserirCliente\");\n \n Cliente novoCliente = null;\n ClienteDAO ins = new ClienteDAO();\n boolean expResult = false;\n boolean result = ins.inserirCliente(novoCliente);\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 }", "int insert(OrderDetail record);", "public void testInsert4() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConfig(\"CompanyConfig.xml\"), getConnection());\n Command select = das.getCommand(\"all companies\");\n DataObject root = select.executeQuery();\n\n DataObject company = root.createDataObject(\"COMPANY\");\n company.setString(\"NAME\", \"Phil's Tires\");\n // This shouldn't do anything\n company.setInt(\"ID\", 999);\n\n das.applyChanges(root);\n\n // Verify insert \n root = select.executeQuery();\n\n assertEquals(4, root.getList(\"COMPANY\").size());\n Iterator i = root.getList(\"COMPANY\").iterator();\n while (i.hasNext()) {\n DataObject comp = (DataObject) i.next();\n assertFalse(comp.getInt(\"ID\") == 999);\n }\n\n }", "int insert(OrderDetails record);", "public void testInsert2() throws Exception {\n\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n\n // insert another using same command\n insert.setParameter(1, \"BBB Rental\");\n insert.execute();\n\n // Verify insert\n // Verify\n Command select = das.createCommand(\"Select ID, NAME from COMPANY\");\n DataObject root = select.executeQuery();\n\n assertEquals(5, root.getList(\"COMPANY\").size());\n\n }", "@Test\npublic void testInsertAStudentScore() {\n//TODO: Test goes here...\n System.out.println(StudentDao.insertAStudentScore(1007,\"7\", 5, 5, 5));\n}", "int insert(AccessModelEntity record);", "@Insert(\"INSERT into addresses(id_address, city, zip_code, street, number) VALUES (\" +\n \"#{addressId}, #{city}, #{zip}, #{street}, #{number})\")\n @Options(useGeneratedKeys = true, keyProperty = \"addressId\", keyColumn = \"id_address\")\n void addPatientAddressAsChild(Address address);", "public void testAddAddress_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "@Test\n public void testInsertarNota() {\n System.out.println(\"insertarNota\");\n String tipoNota = \"\";\n Double nota = null;\n Alumno instance = null;\n instance.insertarNota(tipoNota, nota);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void insert()\n\t{\n\t}", "int insert(Location record);", "@Insert({\n \"insert into twshop_address (id, user_id, \",\n \"user_name, tel_number, \",\n \"postal_Code, national_Code, \",\n \"province_Name, city_Name, \",\n \"county_Name, detail_Info, \",\n \"is_default)\",\n \"values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=VARCHAR}, \",\n \"#{userName,jdbcType=VARCHAR}, #{telNumber,jdbcType=VARCHAR}, \",\n \"#{postalCode,jdbcType=VARCHAR}, #{nationalCode,jdbcType=VARCHAR}, \",\n \"#{provinceName,jdbcType=VARCHAR}, #{cityName,jdbcType=VARCHAR}, \",\n \"#{countyName,jdbcType=VARCHAR}, #{detailInfo,jdbcType=VARCHAR}, \",\n \"#{isDefault,jdbcType=INTEGER})\"\n })\n int insert(Address record);", "public void testInsert5() throws Exception { \n\n DAS das = DAS.FACTORY.createDAS(getConfig(\"CompanyConfig.xml\"), getConnection()); \n Command select = das.getCommand(\"all companies\"); \n DataObject root = select.executeQuery(); \n\n root.createDataObject(\"COMPANY\"); \n\n das.applyChanges(root); \n\n // Verify insert \n root = select.executeQuery(); \n assertEquals(4, root.getList(\"COMPANY\").size()); \n\n }", "private Integer insertAddress(Connection con, AddressDto addressId) throws SQLException {\n\t\nPreparedStatement ps=\tcon.prepareStatement(SQLQueryConstants.INSERT_ADDRESS,Statement.RETURN_GENERATED_KEYS);\n\tps.setString(1, addressId.getAddress());\n\tps.setInt(2, addressId.getPinCode());\t\nps.setInt(3, addressId.getCityId().getCityId());\n int status =ps.executeUpdate();\nif(status!=0){\nResultSet rs=\tps.getGeneratedKeys();\n\tif(rs.next()){\n\t\treturn rs.getInt(1);\n\t\t\n\t}\n}\nreturn null;\t\n}", "@Override\n\tpublic int insert(TestPoEntity entity) {\n\t\treturn 0;\n\t}", "@Test\n void insertSuccess() {\n GenericDao gameDao = new GenericDao(Game.class);\n\n Game game = (Game)gameDao.getById(1);\n\n RunCategory newCategory = new RunCategory(\"Ending E\", \"endinge\", \"<p>Reach the final ending</p>\");\n game.addCategory(newCategory);\n\n int id = dao.insert(newCategory);\n assertNotEquals(0,id);\n RunCategory insertedCategory = (RunCategory) dao.getById(id);\n\n\n assertEquals(newCategory, insertedCategory);\n }", "@Transactional\n public Employee insert(Employee employee) {\n logger.debug(\"Testing create employee :\");\n return employeeDao.insert(employee);\n }", "int insert(GroupRightDAO record);", "@Test\n public void testInsertUser() throws Exception {\n int insert = userDao.insertUser(\n 123,\n \"abc\",\n \"天涯\");\n System.out.println(\"insert=\" + insert);\n }", "public void testInsert() {\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 }", "@SuppressWarnings(\"deprecation\")\r\n\t\r\n\t\r\n\t\r\n\t@Test\r\n\tpublic void insertSuccess(){\n\t\t\t\tDonation donationIn = new Donation();\r\n\t\t\t\tdonationIn.setAmount(23.25);\r\n\t\t\t\tdonationIn.setDonor_Id(\"2\");\r\n\t\t\t\tdonationIn.setDate(\"2016-17-05\");\r\n\t\t\t\tdonationIn.setType(\"offering\");\r\n\t\t\t\t\r\n\t\t\t\t//create donation manager object\r\n\t\t\t\tDonationDBManager donationManager = new DonationDBManager();\r\n\t\t\t\t\r\n\t\t\t\t//insert donor \r\n\t\t\t\tString donationId = donationManager.insertDonation(donationIn);\r\n\t\t\t\tDonation donationOut = donationManager.getDonation(donationId);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//get or select donor\r\n\t\t\t\t\r\n\t\t\t\tassertEquals(donationId, donationOut.getDonor_Id());\r\n\t\t\t\tassertEquals(donationIn.getAmount(), donationOut.getAmount());\r\n\t\t\t\tassertEquals(donationIn.getDate(), donationOut.getDate());\r\n\t\t\t\tassertEquals(donationIn.getType(), donationOut.getType());\r\n\t}", "int insertSelective(Addresses record);", "@Override\r\n\tpublic boolean insertAddress(Map<String, String> address) {\n\t\treturn ado.insertAddress(address);\r\n\t}", "@Test\r\n\t\tpublic void insertUserTestCase() {\r\n\t\t\t\r\n\t\t\tUser user = new User();\r\n\t\t\t\t\t\r\n\t\t//\tuser.setBirthDate(LocalDate.parse(\"1994-04-09\"));\r\n\t\t\tuser.setUsername(\"renu\");\r\n\t\t//\tuser.setUserId(1003);\r\n\t\t\t\r\n\t\t\tuser.setEmail(\"[email protected]\");\r\n\t\t\t\t\t\r\n\t\t\tuser.setFirstname(\"Renu\");\r\n\t\t\tuser.setSurname(\"Rawat\");\r\n\t\t//\tuser.setGender('F');\r\n\t\t\tuser.setPassword(\"renu\");\r\n\t\t\tuser.setPhone(\"9876543210\");\r\n\t\t//\tuser.setStatus(\"A\");\r\n\t\t\tuser.setIsOnline(false);\r\n\t\t\t\r\n\t\t\tuser.setRole(\"ADMIN\");\r\n\t\t//\tuser.setConfmemail(\"[email protected]\");\r\n\t\t//\tuser.setConfpassword(\"renu\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"user printed\");\r\n\t\t\tassertEquals(\"successfully!\", Boolean.valueOf(true), userDao.registerUser(user));\r\n\t\t\tSystem.out.println(\"After User Table\");\r\n\t\t\t\r\n\t}", "int insert(ClOrderInfo record);", "int insert(TbCities record);", "public void testInsert() {\n\t\ttry {\n\t\t\tServerParameterTDG.create();\n\n\t\t\tServerParameterTDG.insert(\"paramName\", \"A description\", \"A value\");\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.insert(\"paramName\", \"other description\", \"other value\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// paramName is primary key, no duplicates\n\t\t\t\tassertTrue(true);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tServerParameterTDG.drop();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tServerParameterTDG.drop();\n\t\t\t} catch (SQLException e) {\n\t\t\t}\n\t\t}\n\t}", "int insert(TblMotherSon record);", "int insert(Factory record);", "@Test\r\n public void saveUserShouldCreateNewRowInDB(){\n userDaoJDBCTemplate.delete(38);\r\n userDaoJDBCTemplate.delete(40);\r\n userDaoJDBCTemplate.deleteByName(\"admin3\");\r\n userDaoJDBCTemplate.deleteByName(\"admin4\");\r\n }", "int insert(Shipping record);", "@Test\n void insertWithBatchSuccess() {\n\n User testUser = new User(\"tester\", \"password\", \"first name test\", \"last name test\", \"[email protected]\", \"53589\", LocalDate.of(1980, 6, 16));\n Batch testBatch = new Batch(\"White Spotted Dog\", \"porter\", LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), LocalDate.of(2019, 4, 1), 1.055, 1.043);\n // this way each of the entities know about one another!\n testUser.addBatch(testBatch);\n // grab the id of the newly added user, use it to verify the new user was created\n int newId = genericDao.insert(testUser);\n\n User anotherTestUser = (User) genericDao.getById(newId);\n assertEquals(testUser, anotherTestUser);\n\n }", "public void testAddAddress1() throws Exception {\r\n try {\r\n this.dao.addAddress(null, false);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@org.junit.Test\r\n public void testInsertReview1() throws Exception {\r\n System.out.println(\"insertReview1\");\r\n Review review = new Review(new Long(0), \"Max\", 9, \"It's excellent\");\r\n Review result = service.insertReview(review);\r\n assertEquals(review, result);\r\n }", "int insertSelective(AddressMinBalanceBean record);", "@Test\n public void testInsert() throws Exception {\n // create citation entites to reflect the change that happens after calling edit\n Citation entity = getSampleCitation();\n\n // pretend the entity was inserted \n doNothing().when(Service).insertCitation(any(Citation.class));\n\n // call insert\n ModelAndView mav = Controller.insert(entity.getPurl(),\n entity.getUrl(),\n entity.getErc(),\n entity.getWho(),\n entity.getWhat(),\n entity.getDate());\n\n // test to see that the correct view is returned\n Assert.assertEquals(\"result\", mav.getViewName());\n\n // test to see that Json is formated properly\n Map<String, Object> map = mav.getModel();\n String jsonObject = (String) map.get(\"message\");\n testJsonObject(jsonObject, entity);\n }", "public void insertReservation(TestDto testDto) throws Exception;", "public void testAddAddresses_AuditException()\r\n throws Exception {\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.addAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n }\r\n }", "@Test\n public void insertOne() throws Exception {\n\n }", "int insert(Cargo record);", "int insertSelective(TestEntity record);", "public void testInsert() {\r\n tree.insert(\"apple\");\r\n tree.insert(\"act\");\r\n tree.insert(\"bagel\");\r\n\r\n try {\r\n tree.insert(\"apple\");\r\n }\r\n catch (DuplicateItemException e) {\r\n assertNotNull(e);\r\n }\r\n }", "public void testInsert3() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n // Integer key = (Integer) insert.getParameterValue(\"generated_key\");\n Integer key = new Integer(insert.getGeneratedKey());\n\n // Verify insert\n Command select = das.createCommand(\"Select ID, NAME from COMPANY where ID = ?\");\n select.setParameter(1, key);\n DataObject root = select.executeQuery();\n assertEquals(key, root.get(\"COMPANY[1]/ID\"));\n\n }", "static boolean testInsert() {\n BinaryTree tree = new BinaryTree();\n int[] profile = new int[1];\n\n // Implement insert method\n boolean insert = tree.insert(\"a\", 0);\n\n // Validates that insert works as expected\n if(!insert)\n return false;\n\n // Validates that insert works with multiple items\n boolean newInsert = tree.insert(\"b\", 1);\n if(!insert || !newInsert)\n return false;\n\n // Validates that values are in binaryTree\n if(tree.search(\"a\", profile) != 0 || tree.search(\"b\", profile) != 1)\n return false;\n\n // Validates that value is overwritten if same key is present\n tree.insert(\"a\", 3);\n if(tree.search(\"a\", profile) != 3)\n return false;\n\n // Validates that profile is as expected\n if(profile[0] <= 0)\n return false;\n\n return true;\n }", "int insert(TestActivityEntity record);", "int insert(PersonRegisterDo record);", "int insert(Destinations record);", "int insert(UcOrderGuestInfo record);", "int insert(WayShopCateRoot record);", "public void insert() throws SQLException;", "int insert(BusinessRepayment record);", "public void testAddAddress5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getState().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "Long insert(Access record);", "int insert(CaseLinkman record);", "int insert(GirlInfo record);", "int insert(Organization record);", "public RutaPk insert(Ruta dto) throws RutaDaoException;", "@Test\n public void testAddLocationGetLocationByIdDeleteLocation() {\n System.out.println(\"-------------------\");\n System.out.println(\"testGetLocationById\");\n System.out.println(\"-------------------\");\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n locDao.deleteLocation(loc1.getLocationId());\n\n assertNull(locDao.getLocationById(loc1.getLocationId()));\n\n }", "int insert(Orderall record);", "int insert(HotelType record);", "int insert(Basicinfo record);", "public void testInsert() {\n ContentValues values = new ContentValues();\n values.put(SmsOpenHelper.SmsTable.FROM_ACCOUNT, \"12345\");\n values.put(SmsOpenHelper.SmsTable.TO_ACCOUNT, \"admin\");\n values.put(SmsOpenHelper.SmsTable.BODY, \"今晚约吗?\");\n values.put(SmsOpenHelper.SmsTable.TYPE, \"chat\");\n values.put(SmsOpenHelper.SmsTable.TIME, System.currentTimeMillis());\n values.put(SmsOpenHelper.SmsTable.STATUS, \"offline\");\n values.put(SmsOpenHelper.SmsTable.SESSION_ACCOUNT, \"admin\");\n\n getContext().getContentResolver().insert(SmsProvider.URI_SMS, values);\n }", "public void testAddAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.addAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "int insert(Ltsprojectpo record);" ]
[ "0.6998668", "0.69905347", "0.6959399", "0.68514687", "0.68006223", "0.67708015", "0.67148703", "0.6702999", "0.66750264", "0.6659953", "0.66484696", "0.6610371", "0.6604357", "0.6604199", "0.65730315", "0.6561322", "0.651943", "0.6511422", "0.64907557", "0.6490094", "0.6489837", "0.6484924", "0.64208776", "0.63962436", "0.6390307", "0.6375475", "0.635577", "0.63522744", "0.634693", "0.6341655", "0.63384765", "0.6333606", "0.6330431", "0.6322635", "0.6307954", "0.6301413", "0.6289469", "0.6282775", "0.6275891", "0.62687683", "0.62506497", "0.62439156", "0.623745", "0.6226862", "0.62257606", "0.6224329", "0.62113893", "0.6208723", "0.62085325", "0.6203031", "0.6196513", "0.6195553", "0.6192907", "0.61766636", "0.61758256", "0.6171718", "0.6168399", "0.6165579", "0.61572343", "0.614705", "0.6144839", "0.61430687", "0.61424834", "0.6135617", "0.61118346", "0.6094411", "0.6084345", "0.60814303", "0.60803676", "0.60791814", "0.60789806", "0.607488", "0.6074349", "0.60722065", "0.6071222", "0.6065589", "0.6047681", "0.6039651", "0.60385853", "0.6024902", "0.6021842", "0.60202", "0.60197294", "0.60154057", "0.6013814", "0.5986051", "0.59817183", "0.5981399", "0.59790015", "0.59730107", "0.59683466", "0.5961812", "0.596173", "0.59601283", "0.5958703", "0.5956623", "0.5956524", "0.59558725", "0.59547454", "0.59518516" ]
0.7827976
0
Test of update method, of class AddressDAO.
@Test public void testUpdate() { System.out.println("update"); Address obj = null; AddressDAO instance = null; boolean expResult = false; boolean result = instance.update(obj); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUpdateAddress() {\n System.out.println(\"updateAddress\");\n String address = \"Sortegade 10\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"98352010\");\n instance.updateAddress(customerID, address);\n assertEquals(\"Sortegade 10\", instance.getCustomer(customerID).getAddress());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "@Test\n public void updateTest() {\n reservation3.setId(13L);\n reservation3.setReserveDate(LocalDate.now().plusDays(2));\n reservationService.update(reservation3);\n Mockito.verify(reservationDao, Mockito.times(1)).update(reservation3);\n }", "@Test\n public void testUpdateLocation() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n loc1.setLocationName(\"Poppas House\");\n\n locDao.updateLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n }", "@Test\r\n\tvoid testContactServiceUpdatAddress() {\r\n\t\t// update contact address\r\n\t\tcontactService.updateContactAddress(id, id);\r\n\t\tassertTrue(contactService.getContactAddress(id).equals(id));\r\n\t}", "public void testupdateAddress_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "public void testupdateAddress1() throws Exception {\r\n try {\r\n this.dao.updateAddress(null, false);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\r\n public void testBUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario obj = instance.login(\"admin\", \"admin\");\r\n obj.setFullName(\"Kevin Duran\");\r\n \r\n int expResult = 1;\r\n int result = instance.update(obj);\r\n assertEquals(expResult, result);\r\n }", "public Address update(Address entity);", "@Test\r\n public void testUpdateEmployee1() throws Exception {\r\n try {\r\n\r\n int employee_id = 0;\r\n int department_id = 1;\r\n int position_id = 1;\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n boolean expResult = false;\r\n boolean result = instance.updateEmployee(employee_id, department_id, position_id, status, date);\r\n assertEquals(expResult, result);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"Wrong Required Parameters\"));\r\n }\r\n }", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "@Test\n public void updateTest() throws SQLException, IDAO.DALException {\n userDAO.create(user);\n user.setNavn(\"SørenBob\");\n user.setCpr(\"071199-4397\");\n user.setAktiv(false);\n user.setIni(\"SBO\");\n // Opdatere objektet i databasen, og sammenligner.\n userDAO.update(user);\n recivedUser = userDAO.get(-1);\n\n assertEquals(recivedUser.getId(), user.getId());\n assertEquals(recivedUser.getNavn(), user.getNavn());\n assertEquals(recivedUser.getIni(), user.getIni());\n assertEquals(recivedUser.getCpr(), user.getCpr());\n assertEquals(recivedUser.isAktiv(),user.isAktiv());\n }", "@Test\n public void test2Update() {\n \n System.out.println(\"Prueba deSpecialityDAO\");\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n assertEquals(dao.update(spec2,\"teleinformatica\"),1); \n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Title t = new Title();\r\n t.setIsbn(\"test\");\r\n t.setTitle(\"aaaaaaaaaaaaaaaaaa\");\r\n t.setAuthor(\"kkkkkkkkkkkkkk\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.update(t);\r\n assertEquals(expResult, result);\r\n }", "public void testupdateAddresses_AuditException()\r\n throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"delete from application_area where description = 'Project'\");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, true);\r\n fail(\"AuditException expected\");\r\n } catch (AuditException e) {\r\n //good\r\n this.executeUpdate(\"insert into application_area(app_area_id, description,\"\r\n + \"creation_date, creation_user, modification_date, modification_user) values (6, 'Project', current,\"\r\n + \" 'user', current, 'user');\");\r\n this.dao.removeAddress(address.getId(), false);\r\n }\r\n }", "@Test\n\t public void testUpdate(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.merge(user)).thenReturn(BaseData.getDBUsers());\n\t\t\t\tUsers savedUser = userDao.update(user);\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }", "int updateByPrimaryKey(Addresses record);", "@Test\r\n public void testUpdate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(15);\r\n record.setTime(20L);\r\n recordDao.update(record);\r\n\r\n ActivityRecord recordFound = recordDao.findActivityRecord(record.getId());\r\n assertEquals(recordFound.getDistance(), new Integer(15));\r\n assertEquals(recordFound.getTime(), new Long(20));\r\n }", "@Update(\"UPDATE addresses SET city=#{city}, zip_code=#{zip}, street=#{street}, number=#{number} \" +\n \"WHERE id_address=#{addressId}\")\n void updatePatientAddress(Address address);", "@Test\n public void updateCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Update the Customer in the database\n customer.setFirstName(\"Michael\");\n customer.setLastName(\"Stuckey\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"NuclearFuelServices\");\n customer.setPhone(\"222-222-2222\");\n service.updateCustomer(customer);\n\n // Test the updateCustomer() method\n verify(customerDao, times(1)).updateCustomer(customerArgumentCaptor.getValue());\n assertEquals(customer, customerArgumentCaptor.getValue());\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\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\n void updateSuccess() {\n String Vin = \"1111111111111111X\";\n Car carToUpdate = carDao.getById(1);\n carToUpdate.setVin(Vin);\n carDao.saveOrUpdate(carToUpdate);\n Car retrievedCar = carDao.getById(1);\n assertEquals(carToUpdate, retrievedCar);\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddress() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "@Test\n public void updateContact() {\n }", "@Test\n public void testUpdateOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Update Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n addedOrder.setCustomer(\"Updated Order\");\n\n dao.updateOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "@Test\npublic void testUpdateAStudentInformation() {\n//TODO: Test goes here...\n System.out.println(StudentDao.updateAStudentInformation(1006, \"6\", 99, 99, 99));\n}", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "@Test\r\n\t public void updateANonExistingRouteFather(){\r\n\t\t RouteFather routeFather = new RouteFather(888988);\r\n\t\t routeFather = routeFatherDAO.update(routeFather);\r\n\t\t Assert.assertNull(\"it should returns null\", routeFather);\r\n\t }", "@Test\n void updateTest() {\n admin.setSurname(\"Rossini\");\n Admin modifyied = adminJpa.update(admin);\n assertEquals(\"Rossini\", modifyied.getSurname());\n }", "public void testupdateAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddress(address, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test CRUD Update with Address 02\")\n public void testCRUDUpdateWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n SBAddress02 address = null;\n\n\n Transaction transaction = null;\n try (Session session = HibernateUtil.getSessionFactory().openSession();) {\n transaction = session.beginTransaction();\n address = session.get(\n SBAddress02.class,\n utilities.getOrderedUUIDByteArrayFromUUIDWithApacheCommons(UUID.fromString(\n \"57487766-df14-4876-9edd-c261282c6661\")));\n System.out.println(\"Address : \" + address.getAddress02Street());\n address.setAddress02Street(\"KusumaramaStreet5\");\n\n session.update(address);\n\n address = session.get(\n SBAddress02.class,\n utilities.getOrderedUUIDByteArrayFromUUIDWithApacheCommons(UUID.fromString(\n \"57487766-df14-4876-9edd-c261282c6661\")));\n System.out.println(\"Address : \" + address.getAddress02Street());\n\n transaction.commit();\n\n } catch (Throwable throwable) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "@Update({\n \"update t_address\",\n \"set userid = #{userid,jdbcType=VARCHAR},\",\n \"province = #{province,jdbcType=VARCHAR},\",\n \"city = #{city,jdbcType=VARCHAR},\",\n \"region = #{region,jdbcType=VARCHAR},\",\n \"address = #{address,jdbcType=VARCHAR},\",\n \"postal = #{postal,jdbcType=VARCHAR},\",\n \"consignee = #{consignee,jdbcType=VARCHAR},\",\n \"phone = #{phone,jdbcType=VARCHAR},\",\n \"status = #{status,jdbcType=VARCHAR},\",\n \"createdate = #{createdate,jdbcType=TIMESTAMP}\",\n \"where addrid = #{addrid,jdbcType=VARCHAR}\"\n })\n int updateByPrimaryKey(Address record);", "public void testUpdateAddress4() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getCountry().setId(-1);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\r\n\t public void updateAnExistingRouteFather(){\r\n\t\t this.routeFather.setDescription(\"yolo\");\r\n\t\t routeFatherDAO.update(this.routeFather);\r\n\t\t Assert.assertNotNull(\"it should returns not null\", this.routeFather);\r\n\t\t Assert.assertEquals(\"email should be yolo\", this.routeFather.getDescription(), \"yolo\");\r\n\t\t routeFatherDAO.delete(routeFather);\r\n\t\t \r\n\t }", "@Test\n public void updateCoffee() {\n Roaster roaster = new Roaster();\n roaster.setName(\"Roaster 1\");\n roaster.setStreet(\"123 Test Lane\");\n roaster.setCity(\"Crossvile\");\n roaster.setState(\"TN\");\n roaster.setPostal_code(\"38555\");\n roaster.setPhone(\"9312005591\");\n roaster.setEmail(\"[email protected]\");\n roaster.setNote(\"Test Note for Roaster 1\");\n roaster = roasterDao.addRoaster(roaster);\n\n // Create and add coffee to the database\n Coffee coffee = new Coffee();\n coffee.setRoaster_id(roaster.getRoaster_id());\n coffee.setName(\"Starbucks House Blend\");\n coffee.setCount(10);\n coffee.setUnit_price(new BigDecimal(\"12.50\"));\n coffee.setDescription(\"Medium Brew Coffee\");\n coffee.setType(\"Regular\");\n coffeeDao.addCoffee(coffee);\n\n // Update the values of coffee\n coffee.setName(\"Updated Name\");\n coffee.setCount(12);\n coffee.setUnit_price(new BigDecimal(\"13.00\"));\n coffee.setDescription(\"Light Roast\");\n coffee.setType(\"Foreign\");\n coffeeDao.updateCoffee(coffee);\n\n // Create a copy of the new coffee\n Coffee coffeeCopy = coffeeDao.getCoffee(coffee.getCoffee_id());\n\n // Test that coffee and coffeeCopy are equal\n assertEquals(coffee, coffeeCopy);\n }", "public void testUpdateAddress5() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.getState().setId(-1);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n void updateSuccess() {\n String newFirstName = \"Artemis\";\n User userToUpdate = (User) dao.getById(1);\n userToUpdate.setFirstName(newFirstName);\n dao.saveOrUpdate(userToUpdate);\n User userAfterUpdate = (User) dao.getById(1);\n assertEquals(newFirstName, userAfterUpdate.getFirstName());\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "public void testUpdateAddress6() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\r\n public void testUpdate() throws Exception {\r\n System.out.println(\"update\");\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n obj = instance.create(obj);\r\n obj.setSigle(\"Test2\");\r\n //etc\r\n obj.setTel(\"000000001\");\r\n //etc\r\n Bureau expResult=obj;\r\n Bureau result = instance.update(obj);\r\n assertEquals(expResult.getSigle(), result.getSigle());\r\n //etc\r\n assertEquals(expResult.getTel(), result.getTel());\r\n //etc\r\n instance.delete(obj);\r\n //TODO verifier que si met à jour vers un doublé sigle-tel déjà existant, on a une exception\r\n }", "@Test\n\t public void testUpdateCollection(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t\tdoAnswer(new Answer() {\n\t\t\t \t public Object answer(InvocationOnMock invocation) {\n\t\t\t \t Object[] args = invocation.getArguments();\n\t\t\t \t EntityManager mock = (EntityManager) invocation.getMock();\n\t\t\t \t\t return null;\n\t\t\t \t }\n\t\t\t \t }).when(entityManager).persist(users);\n\t\t\t\tuserDao.update(users);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing update:.\",se);\n\t\t }\n\t }", "public void testUpdateAddress7() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void testupdateAddress_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddress(address, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Update({\n \"update twshop_address\",\n \"set user_id = #{userId,jdbcType=VARCHAR},\",\n \"user_name = #{userName,jdbcType=VARCHAR},\",\n \"tel_number = #{telNumber,jdbcType=VARCHAR},\",\n \"postal_Code = #{postalCode,jdbcType=VARCHAR},\",\n \"national_Code = #{nationalCode,jdbcType=VARCHAR},\",\n \"province_Name = #{provinceName,jdbcType=VARCHAR},\",\n \"city_Name = #{cityName,jdbcType=VARCHAR},\",\n \"county_Name = #{countyName,jdbcType=VARCHAR},\",\n \"detail_Info = #{detailInfo,jdbcType=VARCHAR},\",\n \"is_default = #{isDefault,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(Address record);", "public boolean updateAddress(Address newAddress);", "public void testUpdateExistingAuthor() {\r\n //given\r\n /*System.out.println(\"updateExistingAuthor\");\r\n int authorID = 31;\r\n String newDescription = \"\";\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n boolean expResult = true;\r\n \r\n //when \r\n boolean result = instance.updateExistingAuthor(authorID, newDescription);\r\n \r\n //then\r\n assertEquals(expResult, result);*/ \r\n }", "public void updateAddress(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"UPDATE contact_info SET person_id=?,address_line_1=?,address_line_2=?,\"\n\t\t \t\t+ \"city=?,state=?,country=?,zipcode=? \"\n\t\t \t\t+ \" WHERE contact_info_id=?\");\n\n\t\t stmt.setInt(1,Integer.parseInt(address.getPersonId()));\n\t\t //stmt.setDate(2, new java.sql.Date(DateUtility.getDateFromEle(address.getContactDate()).getTime()));\n\t\t stmt.setString(2, address.getAddress1());\n\t\t stmt.setString(3, address.getAddress2());\n\t\t stmt.setString(4, address.getCity());\n\t\t stmt.setString(5, address.getState());\n\t\t stmt.setString(6, address.getCountry());\n\t\t stmt.setString(7, address.getZip());\n\t\t \n\t\t stmt.setInt(8, Integer.parseInt(address.getId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t \n\t\t \n\t\t updateEmailAddress(address);\n\t\t updatePhoneNumber(address);\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Address Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic boolean updateAddress(Map<String, String> address) {\n\t\treturn ado.updateAddress(address);\r\n\t}", "@Test\n\t// @Disabled\n\tvoid testUpdateCustomer() {\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer1));\n\t\tMockito.when(custRep.save(customer1)).thenReturn(customer1);\n\t\tCustomer persistedCust = custService.updateCustomer(1, customer1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t}", "public void testupdateAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n address.setCity(\"new city\");\r\n this.dao.updateAddresses(new Address[]{address}, false);\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "public void updateAddress(Address address) {\n Address entity = dao.findByAddressID(address.getAddressID());\n if(entity!=null){\n entity.setAddressLineOne(address.getAddressLineOne());\n entity.setAddressLineTwo(address.getAddressLineTwo());\n entity.setAddressLineThree(address.getAddressLineThree());\n entity.setCity(address.getCity());\n entity.setState(address.getState());\n entity.setZipCode(address.getZipCode());\n }\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "private static void testupdate() {\n\t\ttry {\n\t\t\tRoleModel model = new RoleModel();\n\t\t\tRoleBean bean = new RoleBean();\n\t\t\tbean = model.findByPK(7L);\n\t\t\tbean.setName(\"Finance\");\n\t\t\tbean.setDescription(\"Finance Dept\");\n\t\t\tbean.setCreatedBy(\"CCD MYSORE\");\n\t\t\tbean.setModifiedBy(\"CCD MYSORE\");\n\t\t\tbean.setCreatedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tbean.setModifiedDatetime(new Timestamp(new Date().getTime()));\n\t\t\tmodel.update(bean);\n\t\t\tRoleBean updateBean = model.findByPK(1);\n\t\t\tif (\"12\".equals(updateBean.getName())) {\n\t\t\t\tSystem.out.println(\"UPDATE RECORD FAILED\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"RECORD UPDATED SUCCESSFULLY\");\n\t\t\t}\n\t\t} catch (ApplicationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DuplicateRecordException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void testupdateAddresses_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddresses(new Address[]{address}, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test\r\n public void testUpdate() {\r\n }", "@Test(expectedExceptions = DataAccessLayerException.class)\n void updateThrowsTest() {\n reservation1.setId(85L);\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).update(Mockito.any(Reservation.class));\n reservationService.update(reservation1);\n }", "@Test\n public void testUpdate() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n \n disciplineTest.setName(\"matiere_test2\");\n \n result = disciplineDao.update(disciplineTest);\n \n disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "@Test\n\tpublic void test_Update_Account() throws DatabaseException, BadParameterException, NotFoundException, CreationException {\n\t\ttry (MockedStatic<ConnectionUtil> mockedConnectionUtil = mockStatic(ConnectionUtil.class)) {\n\t\t\tmockedConnectionUtil.when(ConnectionUtil::connectToDB).thenReturn(mockConn);\n\t\t\t\n\t\t\tAccount actual = accountService.updateAccount(\"1\", \"1\", new AccountDTO(10101010, 100.50, \"Savings\"));\n\t\t\t\n\t\t\tAccount expected = new Account(\"Savings\", 10101010, 100.50);\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}\n\t}", "public void testUpdateAddress3() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setModificationUser(null);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n void updateSuccess() {\n String newEventName = \"Coffee meeting\";\n Event eventToUpdate = (Event)genericDao.getById(5);\n eventToUpdate.setName(newEventName);\n genericDao.saveOrUpdate(eventToUpdate);\n Event retrievedEvent = (Event)genericDao.getById(5);\n assertEquals(eventToUpdate, retrievedEvent);\n }", "@Test\n\tpublic void testSaveOrUpdateDriverUpdate() throws MalBusinessException{\t\n\t\tfinal long drvId = 203692;\n\t\tfinal String FNAME = \"Update\";\n\t\tfinal String LNAME = \"Driver Test\";\n\t\tfinal String PHONE_NUMBER = \"554-2728\";\n\t\t\n\t\tDriver driver;\n\t\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\tdriver.setDriverForename(FNAME);\n\t\tdriver.setDriverSurname(LNAME);\t\t\n\t\tdriver.getDriverAddressList().get(0).setAddressLine1(\"111\");\t\n\t\tdriver.getPhoneNumbers().get(0).setNumber(PHONE_NUMBER);\n\t\tdriver = driverService.saveOrUpdateDriver(driver.getExternalAccount(), driver.getDgdGradeCode(), driver, driver.getDriverAddressList(), driver.getPhoneNumbers(), userName, null);\t\n\t\tdriver = driverService.getDriver(drvId);\n\t\t\n assertEquals(\"Update driver first name failed \", driver.getDriverForename(), FNAME);\t\n\t\tassertEquals(\"Update driver last name failed \", driver.getDriverSurname(), LNAME);\t\t\n\t\tassertEquals(\"Update driver phone number failed \", driver.getPhoneNumbers().get(0).getNumber(), PHONE_NUMBER);\t\t\n\t}", "@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "void update(EmployeeDetail detail) throws DBException;", "@Test\n public void testUpdate() {\n\n }", "@Test\n\tpublic void testUpdatePerson_whenPersonExistFirstNameJonanthanLastNameMarrack_thenReturnPersonJonanathanMarrackWithTheFieldAdressUpdated() {\n\t\t// GIVEN\n\t\tPerson personRecordedInArray = new Person(\"Jonanathan\", \"Marrack\", \"29 15th St\", \"Culver\", \"97451\",\n\t\t\t\t\"841-874-6513\", \"[email protected]\");\n\t\tPerson personToUpdate = new Person(\"Jonanathan\", \"Marrack\", \"30 rue des Ursulines\", \"Culver\", \"97451\",\n\t\t\t\t\"841-874-6513\", \"[email protected]\");\n\t\twhen(personDAOMock.getPerson(anyString(), anyString())).thenReturn(personRecordedInArray);\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\twhen(personDAOMock.save(anyInt(), any())).thenReturn(personToUpdate);\n\t\t// WHEN\n\t\tPerson resultPersonUpdated = personServiceTest.updatePerson(personToUpdate);\n\t\t// THEN\n\t\tverify(personDAOMock, times(1)).getPersons();\n\t\tverify(personDAOMock, times(1)).getPerson(anyString(), anyString());\n\t\tverify(personDAOMock, times(1)).save(anyInt(), any());\n\t\t// the field address that was been modified has been updated\n\t\tassertEquals(\"30 rue des Ursulines\", resultPersonUpdated.getAddress());\n\t}", "@Test\r\n public void testupdateCustomer() throws Exception {\r\n System.out.println(\"updateCustomer\");\r\n List<Server.Customer> lesClients = DAOCustomer.loadCustomer(Con());\r\n Server.Customer m = lesClients.get(2);\r\n DAOCustomer.updateCustomer(Con(),1, \"Costa\", \"Rui\",\"15 rue Paul\",\"77290\",\"Paris\",\"[email protected]\",\"M\");\r\n List<Server.Customer> results = DAOCustomer.loadCustomer(Con());\r\n Server.Customer r = results.get(2);\r\n assertFalse(m.getPrenom() == r.getPrenom());\r\n \r\n }", "public Address updateAddress(Address newAddress);", "int updateByPrimaryKey(CityDO record);", "@Test\n void testUpdateUser() {\n String password = \"testPassword\";\n User updateUser = (User) userData.crud.getById(1);\n updateUser.setPassword(password);\n userData.crud.updateRecords(updateUser);\n User getUser = (User) userData.crud.getById(1);\n assertEquals(getUser, updateUser);\n logger.info(\"Updated the password for ID: \" + updateUser.getId());\n }", "@Test\n public void testUpdateOrg() {\n Organization org = new Organization();\n org.setOrgId(1);\n org.setOrgName(\"Avenger\");\n org.setDescription(\"blah blah\");\n org.setAddress(ad);\n dao.addOrg(org);\n org.setOrgName(\"X-Men\");\n assertNotEquals(org, dao.getOrg(org.getOrgId()));\n Organization fromDao = dao.updateOrg(org);\n assertEquals(org, fromDao);\n }", "@Test\n public void testModifyUser() throws Exception {\n\n User user = userDao.retrieveById(\"uuid123123123\");\n user.setUsername(\"newbody4\");\n\n Boolean result = userDao.update(user);\n Assert.assertTrue(result);\n }", "@Test\n public void update() {\n }", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest11() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }", "@Test\r\n\tvoid testContactServiceUpdatPhone() {\r\n\t\t// update contact phone\r\n\t\tcontactService.updateContactPhone(id, \"9876543210\");\r\n\t\tassertTrue(contactService.getContactPhone(id).equals(\"9876543210\"));\r\n\t}", "@Test\n public void update() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(1, 0, 6, \"GUI\");\n Student s2 = new Student(1,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(1, 1, \"prof\", 10, \"Irelevant\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repo.update(s2);\n repot.update(t2);\n repon.update(n2);\n assert repo.findOne(1).getGrupa()==221;\n assert repot.findOne(1).getDeadline()==8;\n assert repon.findOne(\"11\").getFeedback()==\"Irelevant\";\n\n }\n catch (ValidationException e){\n }\n }", "public void testupdateAddress_EntityNotFoundException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n this.dao.updateAddress(address, false);\r\n fail(\"EntityNotFoundException expected\");\r\n } catch (EntityNotFoundException e) {\r\n //good\r\n }\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testSaveAddressWithActionEditAddressApprove() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n address.setSelected(true);\n final AddressDto currentAddress = this.addressService.editAddress(address).getData();\n currentAddress.setZipCode(\"12345\");\n final ServiceResult<Address> result = this.addressService.saveAddress(currentAddress);\n Assert.assertNotNull(result.getData());\n Assert.assertTrue(result.isSuccess());\n }", "public void testUpdateAddress2() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationUser(null);\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public boolean updateAddress(AddressDTO address) throws RetailerException, ConnectException {\n\t\tboolean addAddressState = true;\n\t\tString addressID = address.getAddressId();\n\t\tString retailerID = address.getRetailerId();\n\t\tString city = address.getCity();\n\t\tString state = address.getState();\n\t\tString zip = address.getZip();\n\t\tString buildingNum = address.getBuildingNo();\n\t\tString country = address.getCountry();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tconnection = DbConnection.getInstance().getConnection();\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\tgoProps = PropertiesLoader.loadProperties(GO_PROPERTIES_FILE);\n\n\t\t\tPreparedStatement statement = connection\n\t\t\t\t\t.prepareStatement(QuerryMapper.CHECK_USERID_AND_ADDRESSID_IN_ADDRESSDB);\n\n\t\t\tstatement.setString(1, addressID);\n\t\t\tstatement.setString(2, retailerID);\n\t\t\tResultSet rs = statement.executeQuery();\n\t\t\tif (rs.next() == true) {\n\n\t\t\t\tPreparedStatement statement2 = connection.prepareStatement(QuerryMapper.UPDATE_ADDRESS_IN_ADDRESSDB);\n\t\t\t\tstatement2.setString(9, addressID);\n\t\t\t\tif (rs.getString(1).equals(addressID) && rs.getString(2).equals(retailerID)) {\n\n\t\t\t\t\tstatement2.setString(1, addressID);\n\t\t\t\t\tstatement2.setString(2, retailerID);\n\t\t\t\t\tstatement2.setString(3, city);\n\t\t\t\t\tstatement2.setString(4, state);\n\t\t\t\t\tstatement2.setString(5, zip);\n\t\t\t\t\tstatement2.setString(6, buildingNum);\n\t\t\t\t\tstatement2.setString(7, country);\n\t\t\t\t\tstatement2.setBoolean(8, addAddressState);\n\t\t\t\t}\n\n\t\t\t\tint row = 0;\n\t\t\t\trow = statement2.executeUpdate();\n\n\t\t\t\tif (row == 1) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"cannot update address\");\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (DatabaseException | IOException | SQLException e)// SQLException\n\t\t{\n\t\t\tGoLog.logger.error(exceptionProps.getProperty(EXCEPTION_PROPERTIES_FILE));\n\t\t\tthrow new RetailerException(\".....\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new ConnectException(Constants.connectionError);\n\t\t\t}\n\t\t}\n\n\t\treturn addAddressState;\n\t}", "@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }", "public void update(Triplet t) throws DAOException;", "@UpdateProvider(type=AddressSqlProvider.class, method=\"updateByExample\")\n int updateByExample(@Param(\"record\") Address record, @Param(\"example\") AddressCriteria example);", "@Test\n public void updateTest2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n public void test() throws Exception{\n update(\"update user set username=? where id=?\",\"wangjian\",\"4\");\n }", "@Test\n public void updateTest3() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }", "@Override\r\n\tpublic void update(Address obj, String mainItem, Address oldObj) {\r\n\t\tValidationReturn validation = validator.update(obj, mainItem);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tString valuesToUpdate = \"\";\r\n\t\t\r\n\t\t\r\n\t\tif (!obj.getStreet().isEmpty() && !obj.getStreet().equals(\"\") && !obj.getStreet().equals(\"null\")) {\r\n\t\t\tvaluesToUpdate += (\"street='\" + obj.getStreet() + \"' \");\r\n\t\t}\r\n\t\t\r\n\t\tif (!obj.getDistrict().isEmpty() && !obj.getDistrict().equals(\"\") && !obj.getDistrict().equals(\"null\")) {\r\n\t\t\tvaluesToUpdate += (\"district='\" + obj.getDistrict() + \"' \");\r\n\t\t}\r\n\t\t\r\n\t\tif (obj.getNumber() > 0) {\r\n\t\t\tvaluesToUpdate += (\"number=\" + obj.getNumber() + \" \");\r\n\t\t}\r\n\t\t\r\n\t\tif (!obj.getNote().isEmpty() && !obj.getNote().equals(\"\") && !obj.getNote().equals(\"null\")) {\r\n\t\t\tvaluesToUpdate += (\"note='\" + obj.getNote() + \"' \");\r\n\t\t}\r\n\r\n\t\tDAOJDBCModel.singleCall(\"UPDATE address SET \" + valuesToUpdate + \"WHERE \" + mainItem + \r\n\t\t\t\t\"='\" + oldObj.getByString(mainItem) + \"';\");\r\n\t}", "public void testUpdate() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tservice.setEmployee(\"newEmployee\");\r\n\t\tmodelDS.update(service);\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}", "public boolean updateAddress(Address address, long addressid) {\n\t\tAddress newaddress = addressdao.findOne(addressid);\r\n\t\t\r\n\t\tif(newaddress == null){\r\n\t\t\t//addressdao.save(address);\r\n\t\t\treturn false;\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\tnewaddress.setAddressLine(address.getAddressLine());\r\n\t\t\tnewaddress.setAddressArea(address.getAddressArea());\r\n\t\t\tnewaddress.setAddressCity(address.getAddressCity());\r\n\t\t\tnewaddress.setAddressCountry(address.getAddressCountry());\r\n\t\t\tnewaddress.setAddressState(address.getAddressState());\r\n\t\t\tnewaddress.setAddressPincode(address.getAddressPincode());\r\n\t\t\t\r\n\t\t\taddressdao.save(newaddress);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Test\r\n public void testEditOrder() throws FlooringMasteryPersistenceException{\r\n\r\n Order order = order1();\r\n order.setCustomerName(\"testName\");\r\n\r\n dao.editOrder(date);\r\n assertEquals(\"testName\", order.getCustomerName());\r\n\r\n }", "@Test\n public void testUpdateVehicleSold() {\n //Arrange\n Vehicle vehicle = new Vehicle();\n Model model = new Model();\n Make make = new Make();\n \n make.setMakeName(\"Ford\");\n \n Make createdMake = makeDao.addMake(make);\n \n model.setModelName(\"Explorer\");\n model.setMake(createdMake);\n \n Model createdModel = modelDao.addModel(model);\n \n vehicle.setYear(2018);\n vehicle.setTransmission(\"Automatic\");\n vehicle.setMileage(1000);\n vehicle.setColor(\"Blue\");\n vehicle.setInterior(\"Leather\");\n vehicle.setBodyType(\"SUV\");\n vehicle.setVin(\"W9D81KQ93N8Z0KS7\");\n vehicle.setSalesPrice(new BigDecimal(\"35000.00\"));\n vehicle.setMsrp(new BigDecimal(\"40000.00\"));\n vehicle.setDescription(\"A practical vehicle\");\n vehicle.setPicURL(\"http://www.sampleurl.com/samplepic\");\n vehicle.setModel(createdModel);\n\n Vehicle createdVehicle = vehicleDao.addVehicle(vehicle);\n\n createdVehicle.setSalesPrice(new BigDecimal (\"30000.00\"));\n createdVehicle.setInStock(false);\n \n //Act \n vehicleDao.updateVehicle(createdVehicle);\n \n //Assert\n Vehicle fetchedVehicle = vehicleDao.getVehicleById(createdVehicle.getVehicleId());\n \n assertEquals(vehicle.getSalesPrice(), fetchedVehicle.getSalesPrice());\n assertFalse(fetchedVehicle.isInStock());\n \n }", "@Override\r\n\tpublic Address updateAddress(Address address, int companyId) {\n\t\treturn getAddressDAO().updateAddress(address,companyId);\r\n\t}", "@Ignore\n\tpublic void testUpdateDriverAddressSave() throws MalBusinessException{\n\t // find the existing driver\n\t\tDriver existingDriver = driverService.getDriver(unallocatedDriverId);\n\t\t// get the existing drivers address\n\t\tList<DriverAddress> modifiedAddresses = new ArrayList<DriverAddress>();\n\t\tDriverAddress modifiedAddress = existingDriver.getDriverAddressList().get(0);\n\t\texistingDriver.getDriverAddressList().remove(0);\n\t\t\n\t\tmodifiedAddress.setAddressLine1(\"ASDF\");\n\t\tmodifiedAddresses.add(modifiedAddress);\n\t\t\n\t\t// save the driver\n\t\tDriver updatedDriver = driverService.saveOrUpdateDriver(existingDriver.getExternalAccount(), existingDriver.getDgdGradeCode(), existingDriver, modifiedAddresses, existingDriver.getPhoneNumbers(), userName, null);\n\t\t\n\t\t// verify a new entry in the address history table for today\n\t\tboolean historyRecordForToday = false;\n\t\tCalendar todayCal = new GregorianCalendar();\n\t\ttodayCal.set(Calendar.HOUR_OF_DAY, 0);\n\t\ttodayCal.set(Calendar.MINUTE, 0);\n\t\ttodayCal.set(Calendar.SECOND, 0);\n\t\ttodayCal.set(Calendar.MILLISECOND, 0);\n\t\tDate today = todayCal.getTime();\n\t\tfor(DriverAddressHistory hist : updatedDriver.getDriverAddressHistoryList())\n\t\t{\n\t\t\tif(hist.getInputDate().after(today)){\n\t\t\t\thistoryRecordForToday = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t assertTrue(\"Driver address history does not have a record for today, Address was not changed\", historyRecordForToday);\n\t}", "@Test\n public void updateById() {\n User user = new User();\n user.setId(1259474874313797634L);\n user.setAge(30);\n boolean ifUpdate = user.updateById();\n System.out.println(ifUpdate);\n }", "@Test\n public void updateTest12() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setAnimazione(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isAnimazione() ,\"Should return true if update Servizio\");\n }", "@Test\n public void testUpdateApartmentStatus() {\n System.out.println(\"updateApartmentStatus\");\n String status = \"Unavailable\";\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n instance.updateApartmentStatus(status, apartmentid);\n }", "@Test\n void updateSuccess() {\n String newDescription = \"December X-Large T-Shirt\";\n Order orderToUpdate = dao.getById(3);\n orderToUpdate.setDescription(newDescription);\n dao.saveOrUpdate(orderToUpdate);\n Order retrievedOrder = dao.getById(3);\n assertEquals(newDescription, retrievedOrder.getDescription());\n\n String resetDescription = \"February Small Long-Sleeve\";\n Order orderToReset = dao.getById(3);\n orderToUpdate.setDescription(resetDescription);\n dao.saveOrUpdate(orderToReset);\n }", "public void testupdateAddresses_EntityNotFoundException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n this.dao.updateAddresses(new Address[]{address}, false);\r\n fail(\"EntityNotFoundException expected\");\r\n } catch (EntityNotFoundException e) {\r\n //good\r\n }\r\n }" ]
[ "0.76920986", "0.75711864", "0.7426957", "0.7426516", "0.72418064", "0.722917", "0.722194", "0.71677184", "0.71546626", "0.7143981", "0.71313184", "0.71054685", "0.71027696", "0.7061836", "0.7027166", "0.7020874", "0.7020369", "0.69711417", "0.6971026", "0.6957903", "0.6943697", "0.6942972", "0.6930107", "0.6897466", "0.68960816", "0.68931437", "0.6885289", "0.6879632", "0.68673784", "0.68586665", "0.68432915", "0.6834206", "0.68280923", "0.68195266", "0.68042326", "0.67980313", "0.6779639", "0.6769732", "0.6766767", "0.6760424", "0.67552876", "0.6749323", "0.67464876", "0.6744725", "0.67386353", "0.67350936", "0.6732484", "0.6727154", "0.6726788", "0.67210966", "0.6689088", "0.66665435", "0.66624033", "0.6644459", "0.6638127", "0.6631587", "0.6629508", "0.66263914", "0.66262513", "0.6619495", "0.6603029", "0.6601666", "0.6596819", "0.6590848", "0.6573466", "0.65699506", "0.6560959", "0.65464693", "0.6541238", "0.65383816", "0.653516", "0.65350366", "0.6533588", "0.65252674", "0.65236926", "0.6516401", "0.6516148", "0.65155226", "0.65150166", "0.6514395", "0.64995056", "0.6479391", "0.647231", "0.6460604", "0.64604247", "0.64460766", "0.6445523", "0.64393336", "0.6433757", "0.64238435", "0.64218754", "0.6414611", "0.641178", "0.63899434", "0.63872206", "0.6386551", "0.6381885", "0.63788486", "0.63787484", "0.63714457" ]
0.8728518
0
Test of get method, of class AddressDAO.
@Test public void testGet() { System.out.println("get"); int id = 0; Address result = instance.get(id); assertTrue(result.validate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetAddress() throws Exception {\n final int addressId = 1;\n final Address expected = createMockedAddress(1);\n\n new Expectations() {{\n jdbcTemplate.queryForObject(anyString, new Object[]{addressId}, (RowMapper<?>) any);\n returns(expected);\n }};\n\n Address actual = addressService.getAddress(addressId);\n assertEquals(actual, expected);\n assertTrue(actual.getAddressId() == addressId);\n }", "AddressDao getAddressDao();", "@Test\r\n public void testGet() {\r\n System.out.println(\"get\");\r\n Long codigoCliente = null;\r\n ClienteDAO instance = new ClienteDAO();\r\n ClienteEmpresa expResult = null;\r\n ClienteEmpresa result = instance.get(codigoCliente);\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 public void testGetAdressByID() throws Exception {\n System.out.println(\"getAdressByID\");\n int adressID = 0;\n String result = instance.getAdressByID(adressID);\n assertTrue(!result.isEmpty());\n \n }", "@Test\n public void testFindByAddress() {\n System.out.println(\" Prueba de metodo findByAddress\");\n HeadquartersDAO dao = HeadquartersFactory.create(Headquarters.class);\n List<Headquarters> lista = dao.findByAddress(\"Cll. 69 #20-36\");\n assertTrue(!lista.isEmpty());\n for (Headquarters headquarters : lista) {\n assertEquals(headquarters.getAddress(), \"Cll. 69 #20-36\");\n }\n }", "public void testRetrieveAddress() throws Exception {\r\n try {\r\n this.dao.retrieveAddress(-1);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n public void testGetCoordinatesByAddressID() throws Exception {\n System.out.println(\"getCoordinatesByAddressID\");\n int adressID = 0;\n String result = instance.getCoordinatesByAddressID(adressID);\n assertTrue(!result.isEmpty());\n }", "@Test\n public void getPlace() {\n Place result = mDbHelper.getPlace(Realm.getInstance(testConfig), \"1234\");\n\n // Check place\n Assert.assertNotNull(result);\n\n // Check place id\n Assert.assertEquals(\"1234\", result.getId());\n\n }", "@Test\n void getByIdSuccess() {\n logger.info(\"running getByID test\");\n User retrievedUser = (User)genericDao.getById(2);\n\n assertEquals(\"BigAl\", retrievedUser.getUserName());\n assertEquals(\"Albert\", retrievedUser.getFirstName());\n assertEquals(2, retrievedUser.getId());\n assertEquals(\"Einstein\", retrievedUser.getLastName());\n assertEquals(\"11223\", retrievedUser.getZipCode());\n assertEquals(LocalDate.of(1879,3,14), retrievedUser.getBirthDate());\n\n }", "@Test\n void getByIdSuccess() {\n User retrievedUser = (User) dao.getById(1);\n //User retrievedUser = dao.getById(1);\n assertEquals(\"Dave\", retrievedUser.getFirstName());\n assertEquals(\"Queiser\", retrievedUser.getLastName());\n }", "@Test\n public void getAddress() {\n User u = new User(name, mail, pass, address, gender);\n Assert.assertEquals(u.getAddress(), address);\n }", "@Test\n\tpublic void testIndividualGettersAddress() {\n\t\tassertTrue(beanTester.testGetterForField(\"zipcode\"));\n\t}", "@Test\n public void testGetAllAddresses() throws Exception {\n List<Address> expected = new ArrayList<>();\n expected.add(createMockedAddress(1));\n\n new Expectations() {{\n jdbcTemplate.query(anyString, (RowMapperResultSetExtractor<?>) any);\n returns(expected);\n }};\n\n List<Address> actual = addressService.getAllAddresses();\n assertEquals(actual.size(), 1);\n assertEquals(actual.get(0), expected.get(0));\n }", "@Test\n public void testGetApartmentDetails() throws SQLException {\n System.out.println(\"getApartmentDetails\");\n int apartmentid = 2;\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.getApartmentDetails(apartmentid);\n assertTrue(result.next());\n \n }", "@Test\n void getByIdOrderSuccess() {\n Order retrievedOrder = dao.getById(2);\n assertNotNull(retrievedOrder);\n assertEquals(\"February Large Long-Sleeve\", retrievedOrder.getDescription());\n\n }", "@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }", "@Test(expected = NotFoundException.class)\n public void testBGetNotFound() throws NotFoundException {\n AddressModel addressModel = service.get(11);\n assertNull(addressModel);\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test CRUD Retrieve with Address 02\")\n public void testCRUDRetrieveWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n UuidUtilities utilities = new UuidUtilities();\n SBAddress02 address = null;\n\n\n Transaction transaction = null;\n try (Session session = HibernateUtil.getSessionFactory().openSession();) {\n transaction = session.beginTransaction();\n address = session.get(\n SBAddress02.class,\n utilities.getOrderedUUIDByteArrayFromUUIDWithApacheCommons(UUID.fromString(\n \"d0fd6f3d-f870-414b-9f3e-5bb6a63071bf\")));\n transaction.commit();\n\n } catch (Throwable throwable) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Address : \" + address.getAddress02Street());\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "@Test\n public void testGetAddress() {\n System.out.println(\"getAddress\");\n Member instance = member;\n \n String expResult = \"01 London Road, Littlemoore, Oxford\";\n String result = instance.getAddress();\n \n assertEquals(expResult, result);\n }", "@Test\n void getByIdSuccess() {\n //Get User\n GenericDao<User> userDao = new GenericDao(User.class);\n User user = userDao.getById(2);\n\n //Create Test Car\n Car testCar = new Car(1,user,\"2016\",\"Jeep\",\"Wrangler\",\"1C4BJWFG2GL133333\");\n\n //Ignore Create/Update times\n testCar.setCreateTime(null);\n testCar.setUpdateTime(null);\n\n //Get Existing Car\n Car retrievedCar = carDao.getById(1);\n assertNotNull(retrievedCar);\n\n //Compare Cars\n assertEquals(testCar,retrievedCar);\n }", "@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }", "@Test\n\tpublic void getBookingTest() {\n\n\t\tBooking outputBooking = bookingDao.getBooking(booking.getBookingId());\n\n\t\tAssert.assertEquals(2, outputBooking.getFlightId());\n\n\t}", "@Test\r\n public void testA0Get_0args() {\r\n System.out.println(\"get all\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> expResult = new ArrayList<>();\r\n List<Usuario> result = instance.get();\r\n \r\n assertEquals(expResult, result);\r\n }", "@Test\n void getByIdSuccess() {\n Event retrievedEvent = (Event)genericDao.getById(2);\n assertNotNull(retrievedEvent);\n assertEquals(\"Dentist\", retrievedEvent.getName());\n }", "@Test\n public void getCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Copy the customer added to the mock database using the CustomerAPI\n Customer customerCopy = service.findCustomer(customer.getCustomerId());\n\n // Test getCustomer() API method\n verify(customerDao, times(1)).getCustomer(customer.getCustomerId());\n TestCase.assertEquals(customerCopy, customer);\n }", "public void testMapGet() {\r\n }", "@Test\n void get_unavailableCity_butOnAPI() throws Exception{\n cityDAO.get(\"manchester\");\n assertThat(cityDAO.get(\"manchester\")).isNotNull();\n }", "public Address getAddress() { return address; }", "@DAO(catalog = \"ABC\")\npublic interface AddressDAO {\n static final String TABLE_NAME= \"address\";\n static final String FIELDS = \"id,type,user_id,city,province ,district,phone,address,create_time,update_time,user_device_id\" ;\n static final String INSERT_FIELDS = \"type,user_id,city,province ,district,phone,address,update_time,user_device_id\" ;\n\n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where id =:1\")\n public Address getAddress(long id);\n\n\t@SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where user_id =:1 order by type desc limit :2,:3\")\n\tpublic List<Address> getAddresses(long user_id, int start, int offset);\n\n @ReturnGeneratedKeys\n @SQL(\"insert into \" + TABLE_NAME + \"(\" + INSERT_FIELDS +\") values (:1.type,:1.user_id,:1.city,:1.province,:1.district,:1.phone,:1.address,:1.update_time,:1.user_device_id)\")\n public int addAddress(Address address);\n\n @SQL(\"update \" + TABLE_NAME + \" set city=:1.city,phone =:1.phone, address = :1.address ,update_time=now()\" + \" where id = :1.id\")\n public int updateAddress(Address address);\n\n @SQL(\"delete from \" + TABLE_NAME + \" where id = :1.id\")\n public int delAddress(long address_id);\n\n @SQL(\"update \" + TABLE_NAME + \" set type=1 where id = :1\")\n public int defaultAddress(long address_id);\n\n @SQL(\"update \" + TABLE_NAME + \" set type = 0 where user_id = :1\")\n public int cleanDefaultAddress(long user_id);\n \n @SQL(\"update \" + TABLE_NAME + \" set type = 0 where user_device_id = :1\")\n public int cleanDefaultAddressByUserDeviceId(long userDeviceId);\n \n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where device_user_id =:1\")\n\tpublic List<Address> getAddressesByDeviceUserId(long user_id);\n \n @SQL(\"select \"+ FIELDS +\" from \" + TABLE_NAME + \" where user_id =:1\")\n\tpublic List<Address> getAddresses(long user_id);\n \n @SQL(\"update \" + TABLE_NAME + \" set user_id=:1,user_device_id= -1 where user_device_id = :2\")\n public Integer bindAddress2User(long userId,long userDeviceId);\n \n @ReturnGeneratedKeys\n @SQL(\"insert into \" + TABLE_NAME + \"(\" + INSERT_FIELDS +\") values (:1.type,:1.user_id,:1.city,:1.province,:1.district,:1.phone,:1.address,:1.update_time,:1.user_device_id)\")\n public int addAddressByUserApp(Address address);\n\n}", "@org.junit.Test\r\n public void testGetSingleContact() {\r\n System.out.println(\"getSingleContact\");\r\n String emailid = \"[email protected]\";\r\n ContactDao instance = new ContactDao();\r\n List<ContactResponse> expResult = new ArrayList<ContactResponse>();\r\n ContactResponse cr = new ContactResponse(\"DN Verma1\",\"[email protected]\",\"9006847351\",\"DBG\");\r\n expResult.add(cr);\r\n List<ContactResponse> result = instance.getSingleContact(emailid);\r\n String s=\"No records Exists\";\r\n if(result.get(0).getMessage()==null)\r\n {\r\n assertEquals(expResult.get(0).getName(), result.get(0).getName());\r\n assertEquals(expResult.get(0).getMessage(), result.get(0).getMessage());\r\n assertEquals(expResult.get(0).getEmail(), result.get(0).getEmail());\r\n assertEquals(expResult.get(0).getCity(), result.get(0).getCity());\r\n assertEquals(expResult.get(0).getContact(), result.get(0).getContact());\r\n }\r\n // TODO review the generated test code and remove the default call to fail.\r\n }", "@Test\n void getByID() {\n Role role = (Role) roleDAO.getByID(1);\n assertEquals(\"Nerf Herder\", role.getRoleName());\n }", "@Test\n public void test_get_2() throws Exception {\n User user1 = createUser(1, true);\n\n User res = instance.get(user1.getId());\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Test\r\n public void testRetrieve() {\r\n\r\n PaymentDetailPojo expResult = instance.save(paymentDetail1);\r\n assertEquals(expResult, instance.retrieve(paymentDetail1));\r\n }", "public void testFindAuthorByID() {\r\n //given\r\n System.out.println(\"findAuthorByID\");\r\n int authorID = 18;\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n \r\n //when\r\n Author result = instance.findAuthorByID(authorID);\r\n \r\n //then\r\n assertEquals(\"Maksim Gorky\", result.getName()); \r\n }", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public interface IAddressDao {\n\n long save(Address address) throws DaoException;\n\n void update(Address address) throws DaoException;\n\n Address getAddressByContactId(long contactId) throws DaoException;\n\n}", "@Test\r\n public void getStreetNumberTest()\r\n {\r\n Assert.assertEquals(stub.getStreetNumber(), STREETNUMBER);\r\n }", "@Test(enabled = true)\n @UsingDataSet({\"datasets/base_data.xls\", \"datasets/data.xls\"})\n public void testEditAddressCase2() throws Exception {\n final String addrCode = \"30011400002\";\n final Address address = this.addressRepository.getAddressByAddressCode(addrCode);\n final ServiceResult<AddressDto> result = this.addressService.editAddress(address);\n\n Assert.assertNull(result);\n }", "@Repository\npublic interface AddressDao {\n void insert(AddressPojo addressPojo);\n\n AddressPojo queryAddressById(@Param(\"id\") Long id);\n\n Long queryId(AddressPojo addressPojo);\n}", "@Test\n public void getLocationById() throws Exception {\n }", "@Test\n public void testShowSearchedApartment() throws SQLException {\n System.out.println(\"showSearchedApartment\");\n String location = \"gokarna\";\n ApartmentBLL instance = new ApartmentBLL();\n ResultSet result = instance.showSearchedApartment(location);\n assertTrue(result.next());\n }", "@Override\n\tpublic List getByAddress(Integer address) throws DAOException {\n\t\treturn null;\n\t}", "public interface AddressDao {\n}", "@Test\n public void findByIdTest() {\n Long id = 1L;\n reservation1.setId(id);\n Mockito.when(reservationDao.findById(id)).thenReturn(reservation1);\n Reservation result = reservationService.findById(id);\n Assert.assertEquals(reservation1, result);\n Assert.assertEquals(id, reservation1.getId());\n }", "@Override\r\n\tpublic Address findById(Integer id) {\r\n\t\tValidationReturn validation = validator.findById(id);\r\n\t\t\r\n\t\tif (!validation.getStatus().equals(200)) {\r\n\t\t\tthrow new DBException(validation.toString());\r\n\t\t}\r\n\t\t\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\t\r\n\t\tResultSet item = DAOJDBCModel.singleCallReturn(\"SELECT * FROM address WHERE id='\" + id + \"';\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (item != null) {\r\n\t\t\t\treturn new Address(item.getInt(\"id\"), item.getString(\"street\"), item.getString(\"district\"),\r\n\t\t\t\t\t\titem.getInt(\"number\"), item.getString(\"note\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "@Test\n @Transactional\n public void getAllContactsWithInAddressBook() throws Exception {\n restAddressBookMockMvc.perform(\n get(\"/api/address-books/{id}/contacts\", \"1\").param(\"unique\", \"false\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[2]\").exists())\n .andExpect(jsonPath(\"$.[3]\").doesNotExist())\n ;\n }", "public void testRetrieveAddress_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddress(address.getId());\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\r\n public void testSelectById() {\r\n System.out.println(\"selectById\");\r\n int id = 1;\r\n AbonentDAL instance = new AbonentDAL();\r\n Abonent result = instance.selectById(id);\r\n assertTrue(result!=null && result.getId()==id);\r\n }", "@Test\n public void test_get_3() throws Exception {\n User user1 = createUser(1, false);\n\n User res = instance.get(user1.getId());\n\n assertEquals(\"'get' should be correct.\", user1.getUsername(), res.getUsername());\n assertEquals(\"'get' should be correct.\", user1.getDefaultTab(), res.getDefaultTab());\n assertEquals(\"'get' should be correct.\", user1.getNetworkId(), res.getNetworkId());\n assertEquals(\"'get' should be correct.\", user1.getRole().getId(), res.getRole().getId());\n assertEquals(\"'get' should be correct.\", user1.getFirstName(), res.getFirstName());\n assertEquals(\"'get' should be correct.\", user1.getLastName(), res.getLastName());\n assertEquals(\"'get' should be correct.\", user1.getEmail(), res.getEmail());\n assertEquals(\"'get' should be correct.\", user1.getTelephone(), res.getTelephone());\n assertEquals(\"'get' should be correct.\", user1.getStatus().getId(), res.getStatus().getId());\n }", "@Test\n public void test_get_1() throws Exception {\n clearDB();\n\n User res = instance.get(Long.MAX_VALUE);\n\n assertNull(\"'get' should be correct.\", res);\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedRole = (UserRoles)genericDAO.getByID(1);\n assertEquals(\"administrator\", retrievedRole.getRoleName());\n assertEquals(1, retrievedRole.getUserRoleId());\n assertEquals(\"admin\", retrievedRole.getUserName());\n }", "@Test\n\tpublic void searhEmpIdtoAddress() {\n\t\tEmployee employee = employeeService.searhEmpIdtoAddress();\n\t\tAssert.assertEquals(id.intValue(), employee.getId().intValue());\n\t\n\t}", "@Test\r\n public void getStreetNameTest()\r\n {\r\n Assert.assertEquals(stub.getStreetName(), STREETNAME);\r\n }", "private void testManagerDAO(){\n System.out.println(\"==========================\");\n System.out.println(\"test finding managerID by userID\");\n int managerID = managerDAO.getIdManager(1);\n System.out.println(managerID);\n System.out.println(\"\\n\");\n \n }", "@Test\n void getAllCarsSuccess() {\n List<Car> cars = carDao.getAll();\n assertNotNull(cars);\n assertEquals(1, cars.size());\n }", "@Test\n public void retriveByIdTest() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(1);\n assertNotNull(servizio,\"Should return true if return Servizio 1\");\n }", "@Test\n public void testGetCurso() {\n System.out.println(\"getCurso\");\n int cod = 0;\n cursoDAO instance = new cursoDAO();\n curso expResult = null;\n curso result = instance.getCurso(cod);\n assertEquals(expResult, result);\n \n }", "@Override\n\tpublic Address getAddressById(int id) {\n\t\treturn sqlSessionTemplate.selectOne(sqlId(\"getAddressById\"),id);\n\t}", "@Test\r\n public void UserServiceTest_Retrieve()\r\n {\r\n UserService service = new UserService(); \r\n List<User> users = null;\r\n try {\r\n users = service.getUserList();\r\n } catch (SQLException e) {\r\n fail();\r\n System.out.println(e);\r\n } \r\n }", "@Test \n\t public void testRetrieveAll(){\n\t\t try{\n\t\t\t List<Users> users = new ArrayList<Users>();\n\t\t\t users.add( BaseData.getUsers());\n\t\t\t\tusers.add(BaseData.getDBUsers());\n\t\t\t\tQuery mockQuery = mock(Query.class);\n\t\t\t\twhen(entityManager.createQuery(Mockito.anyString())).thenReturn(mockQuery);\n\t\t\t\twhen(mockQuery.getResultList()).thenReturn(users);\n\t\t\t\tList<Users> loadedUsers = (List<Users>)userDao.retrieveAll();\n\t\t\t\tassertNotNull(loadedUsers);\n\t\t\t\tassertTrue(loadedUsers.size() > 1);\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveAll:.\",se);\n\t\t }\n\t }", "@Test\n public void testAddGetOrg() {\n Organization org = new Organization();\n org.setOrgId(1);\n org.setOrgName(\"Avenger\");\n org.setDescription(\"blah blah\");\n org.setAddress(ad);\n dao.addOrg(org);\n Organization fromDao = dao.getOrg(org.getOrgId());\n assertEquals(org, fromDao);\n }", "public static Address get(Integer id) throws SQLException, Exception {\n\n String sql = \"SELECT * FROM address WHERE (id=? AND enabled=?)\";\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result = null;\n try {\n //Opens a connection to the DB\n con = ConnectionUtils.getConnection();\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql);\n\n stmt.setInt(1, id);\n stmt.setBoolean(2, true);\n\n result = stmt.executeQuery();\n\n if (result.next()) {\n\n // Create a Address instance and population with BD values\n Address address = new Address();\n\n address.setId(result.getInt(\"id\"));\n PublicPlaceType publicPlaceType = DAOPublicPlaceType.get(result.getInt(\"publicplace_type_id\"));\n address.setPublicPlaceType(publicPlaceType);\n City city = DAOCity.get(result.getInt(\"city_id\"));\n address.setCity(city);\n address.setPublicPlace(result.getString(\"publicplace\"));\n address.setNumber(result.getInt(\"number\"));\n address.setComplement(result.getString(\"complement\"));\n address.setDistrict(result.getString(\"district\"));\n address.setZipcode(result.getInt(\"zipcode\"));\n\n return address;\n }\n } finally {\n ConnectionUtils.finalize(result, stmt, con);\n }\n\n return null;\n }", "@Test\n @Override\n public void testMapGet() {\n }", "@Test\n void whenOrderIdIsValid_thenReturnDelivery_findByOrderId(){\n Delivery delivery = deliveryService.getDeliveryByOrderId(1L);\n assertThat(delivery.getOrder_id()).isEqualTo(1L);\n }", "@Test\r\n public void getPostalCodeTest()\r\n {\r\n Assert.assertEquals(stub.getPostalCode(), POSTALCODE);\r\n }", "@Test\n public void shouldRetrieveAPaymentViaGet() throws Exception {\n ResponseEntity<String> response = postTestPaymentAndGetResponse();\n String location = getLocationHeader(response);\n\n //when: the payment is fetched via get:\n ResponseEntity<Payment> getResponse = restTemplate.getForEntity(location, Payment.class);\n //then: the response status code should be OK:\n assertEquals(HttpStatus.OK, getResponse.getStatusCode());\n //and: the data on the response should be correct, e.g. check the orgainsation_id field:\n Payment payment = getResponse.getBody();\n assertEquals(testPaymentAsObject.getOrganisationId(), payment.getOrganisationId());\n }", "public interface AdresseDAO {\n\t/**\n\t * Speichert die übergebene Entity.\n\t * \n\t * @param entity\n\t * @return\n\t * @throws Exception\n\t */\n\tvoid save(Adresse entity) throws Exception;\n\n\t/**\n\t * Updatet die übergebene Entity.\n\t * \n\t * @param entity\n\t * @return\n\t * @throws Exception\n\t */\n\tAdresse update(Adresse entity) throws Exception;\n\n\t/**\n\t * Löscht die übergebene Entity.\n\t * \n\t * @param entity\n\t * @throws Exception\n\t */\n\tvoid delete(Adresse entity) throws Exception;\n\n\t/**\n\t * Löscht die Entity mit der übergebenen Id.\n\t * \n\t * @param entity\n\t * @throws Exception\n\t */\n\tvoid deleteAdresseById(Integer id) throws Exception;\n\t\n\t/**\n\t * Liefert die Adresse-Entity für den übergebenen Id-Wert zurück.\n\t * \n\t * @param id\n\t * @return\n\t */\n\tAdresse findAdresseById(Integer id);\n\n\t/**\n\t * Liefert alle Adresse-Objekte zurück.\n\t * \n\t * @return\n\t */\n\tList<Adresse> findAllAdresse();\n\n\n}", "@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}", "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyId() {\n\t\tCustomer customer = new Customer(1, \"jen\", \"cru\", \"951771122\", \"[email protected]\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tCustomer persistedCust = custService.viewCustomerbyId(1);\n\t\tassertEquals(\"jen\", persistedCust.getFirstName());\n\t}", "@Test\n public void selectById(){\n User user=iUserDao.selectById(\"158271202\");\n System.out.println(user.toString());\n }", "@Test\n void getAllOrdersSuccess() {\n List<Order> orders = dao.getAllOrders();\n assertEquals(3, orders.size());\n }", "@Test\n public void getHouseholdUsingGetTest() throws ApiException {\n UUID householdId = null;\n Household response = api.getHouseholdUsingGet(householdId);\n\n // TODO: test validations\n }", "public abstract Address getCustomerAddress();", "@Test\n public void testBeans(){\n Assert.assertNotNull(countryDao);\n }", "public void testRetrieveAddresses() throws Exception {\r\n try {\r\n this.dao.retrieveAddresses(new long[]{-1});\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n\tpublic void test_Fetch_All_Account_By_Id() throws DatabaseException, BadParameterException, NotFoundException {\n\t\ttry (MockedStatic<ConnectionUtil> mockedConnectionUtil = mockStatic(ConnectionUtil.class)) {\n\t\t\tmockedConnectionUtil.when(ConnectionUtil::connectToDB).thenReturn(mockConn);\n\t\t\t\n\t\t\tAccount actual = accountService.getAccountById(\"1\", \"1\");\n\t\t\t\n\t\t\tAccount expected = new Account(\"Savings\", 10101010, 100.50);\n\t\t\t\n\t\t\tassertEquals(expected, actual);\n\t\t}\n\t}", "public void testRetrieveAddress_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").retrieveAddress(1);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public void testSearchAddresses() throws Exception {\r\n try {\r\n this.dao.searchAddresses(null);\r\n fail(\"IllegalArgumentException expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "@Test\n public void test4FindPk() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n SpecialityDTO respuesta = dao.findPk(\"telecomunicaciones\");\n assertEquals(respuesta,spec2);\n }", "@Test\n public void testAddLocationGetLocationByIdDeleteLocation() {\n System.out.println(\"-------------------\");\n System.out.println(\"testGetLocationById\");\n System.out.println(\"-------------------\");\n\n Location loc1 = new Location();\n loc1.setLocationName(\"Mommas House\");\n loc1.setDescription(\"Like it says\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Hometown\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n\n locDao.addLocation(loc1);\n\n Location testLoc = locDao.getLocationById(loc1.getLocationId());\n\n assertEquals(loc1, testLoc);\n\n locDao.deleteLocation(loc1.getLocationId());\n\n assertNull(locDao.getLocationById(loc1.getLocationId()));\n\n }", "@Test\n public void testGetDal() {\n logger.info(\"getDal\");\n\n QuoteOfTheDayDAL expResult = dal;\n QuoteOfTheDayDAL result = instance.getDal();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testPersonGETMethod() {\n\n\t\tString emailId = \"[email protected]\";\n\t\tPerson person = null;\n\t\tClient client = Client.create();\n\t\tWebResource webResource2 = client\n\t\t\t\t.resource(\"http://localhost:8080/MeetingSchedulerProject/meeting/personservice/\"\n\t\t\t\t\t\t+ emailId);\n\t\tClientResponse response2 = webResource2.accept(\n\t\t\t\tMediaType.APPLICATION_JSON).get(ClientResponse.class);\n\t\tperson = response2.getEntity(Person.class);\n\t\tassertEquals(person.getEmailId(), \"[email protected]\");\n\t}", "@Test\n public void findByWrongId() throws DAOException {\n int id = 10;\n Country actual = countryDAO.findById(id);\n Assert.assertEquals(actual, null);\n }", "public void testRetrieveAddresses_AssociationException() throws Exception {\r\n Address address = this.getAddress();\r\n this.dao.addAddress(address, false);\r\n this.dao.associate(address, 1, false);\r\n this.executeUpdate(\"insert into address_relation (creation_user,modification_user,\"\r\n + \"creation_date,modification_date,address_id,address_type_id,entity_id) values ('u','u',current,current,\"\r\n + address.getId() + \",1,2) \");\r\n try {\r\n this.dao.retrieveAddresses(new long[]{address.getId()});\r\n fail(\"AssociationException expected\");\r\n } catch (AssociationException e) {\r\n //good\r\n this.executeUpdate(\"delete from address_relation\");\r\n this.executeUpdate(\"delete from address\");\r\n }\r\n }", "@Test\n public void getUserById() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n //test fetching of data\n assertNotNull(userResource.getUser(\"dummy\"));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }", "@Test\n void getNoteByIdSuccess() {\n Note retrievedNote = (Note) noteDao.getById(1);\n assertEquals(1, retrievedNote.getId());\n assertEquals(\"Amari Rodgers\", retrievedNote.getProspect());\n }", "public String getAddress()\n{\n return this.address;\n}", "public interface AddressMapper {\n public Address querybyId(int id);\n}", "@Test\n void getAllSuccess() {\n List<User> Users = dao.getAll();\n assertEquals(2, Users.size());\n }", "@Test\n void getByIdSuccess() {\n UserRoles retrievedUserRole = (UserRoles) genericDao.getById(2);\n assertEquals(\"all\", retrievedUserRole.getRoleName());\n assertEquals(\"fhensen\", retrievedUserRole.getUserName());\n\n assertNotNull(retrievedUserRole);\n }", "@Test\n public void testObtenerid() {\n System.out.println(\"obtenerid\");\n String usuario = \"\";\n cursoDAO instance = new cursoDAO();\n int expResult = 0;\n int result = instance.obtenerid(usuario);\n assertEquals(expResult, result);\n \n }", "@Test\r\n public void testGetAllEMployees() throws Exception {\r\n try {\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n List<Employee> result = instance.getAllEMployees();\r\n assertTrue(result != null);\r\n assertTrue(result.size() > 0);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"NoDataFromDatabase\"));\r\n }\r\n }", "@Test\r\n public void testGetEndereco() {\r\n System.out.println(\"getEndereco\");\r\n Integrante instance = new Integrante();\r\n String expResult = \"\";\r\n String result = instance.getEndereco();\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 void getUserBy() {\n List<Role> users = (List<Role>) roleDAO.getEntityBy(\"roleName\", \"o\");\n assertEquals(1, users.size());\n }", "@Test\r\n public void testGetClosestAddressTo() {\r\n System.out.println(\"getClosestAddressTo\");\r\n Customer testCustomer;\r\n testCustomer = new Customer(\"Test Customer\", testAddress4);\r\n \r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress1);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress3);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n testCustomer.addAddress(testAddress2);\r\n assertEquals(testAddress1, testCustomer.getClosestAddressTo(testDepot1));\r\n assertNotEquals(testAddress3, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress2, testCustomer.getClosestAddressTo(testDepot3));\r\n assertEquals(testAddress4, testCustomer.getClosestAddressTo(testDepot2));\r\n }", "@Test\n public void test2(){\n String sql = \"select order_id orderID, order_name orderName, order_date orderDate from order_table where order_id = ?\";\n Order order = getOrder(sql, 4);\n System.out.println(order);\n }", "@Test\n public void getAllCustomer() {\n Customer customer1 = new Customer();\n customer1.setFirstName(\"Dominick\");\n customer1.setLastName(\"DeChristofaro\");\n customer1.setEmail(\"[email protected]\");\n customer1.setCompany(\"Omni\");\n customer1.setPhone(\"999-999-9999\");\n customer1 = service.saveCustomer(customer1);\n\n // Add a second Customer to the mock database (customer2)\n Customer customer2 = new Customer();\n customer2.setFirstName(\"Michael\");\n customer2.setLastName(\"Stuckey\");\n customer2.setEmail(\"[email protected]\");\n customer2.setCompany(\"NuclearFuelServices\");\n customer2.setPhone(\"222-222-2222\");\n customer2 = service.saveCustomer(customer2);\n\n // Collect all the customers into a list using the Customer API\n List<Customer> customerList = service.findAllCustomers();\n\n // Test the getAllCustomer() API method\n TestCase.assertEquals(2,customerList.size());\n TestCase.assertEquals(customer1, customerList.get(0));\n TestCase.assertEquals(customer2, customerList.get(1));\n }", "@Test\n void testSuccess_saveAndLoadStreetLines() {\n assertAddress(saveAndLoad(entity).address, \"123 W 14th St\", \"8th Fl\", \"Rm 8\");\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "@Test\n\tpublic void testGettersAddress() {\n\t\tassertTrue(beanTester.testGetters());\n\t}" ]
[ "0.7283235", "0.7056776", "0.69908065", "0.68170375", "0.67860556", "0.6694487", "0.6686472", "0.66783226", "0.6565697", "0.651367", "0.650411", "0.63680875", "0.63421917", "0.63303256", "0.63100916", "0.62962306", "0.62866104", "0.62829214", "0.6276736", "0.62617993", "0.61846465", "0.6179139", "0.60862213", "0.6036014", "0.60329264", "0.6006687", "0.5998925", "0.59721833", "0.5954924", "0.59375894", "0.59361494", "0.59360915", "0.5933012", "0.5926693", "0.592335", "0.5886411", "0.5883716", "0.5868277", "0.5866519", "0.5859749", "0.58585477", "0.5852975", "0.5848299", "0.58370703", "0.5821518", "0.58114016", "0.58084035", "0.5801972", "0.5801703", "0.5798316", "0.5795577", "0.5790474", "0.57838386", "0.5751967", "0.5742079", "0.5742031", "0.57312274", "0.57308376", "0.57185024", "0.56942", "0.56920004", "0.56857264", "0.5684182", "0.5678692", "0.56746763", "0.56731683", "0.5659697", "0.565847", "0.5657285", "0.5656122", "0.5653533", "0.56497777", "0.56419605", "0.56343216", "0.5627966", "0.56273806", "0.562392", "0.5617167", "0.561692", "0.5607908", "0.5607115", "0.5605726", "0.5600349", "0.55910367", "0.55884385", "0.5581088", "0.55741197", "0.55738646", "0.55708474", "0.55708236", "0.55678475", "0.5566865", "0.55632055", "0.55603224", "0.5556819", "0.554897", "0.5544574", "0.5542244", "0.5531535", "0.5530221" ]
0.719205
1
Invoke Restaurant object to read restaurant menu from file.
public void setUpRestaurant() { Restaurant restaurantMenu = new Restaurant(); String filePath = environment.getFile(INPUT_FILE_PATH).getAbsolutePath(); try { restaurantMenu.readMenuFromFile(filePath); } catch (FileNotFoundException e) { Logger.error("Unable to import restaurant menu, file not found."); e.printStackTrace(); } catch (InvalidInputException e) { Logger.error("Importing restaurant menu failed. Invalid file contents"); e.printStackTrace(); } satisfactionAnalyzer = new SatisfactionAnalyzer(restaurantMenu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readFromRestaurantFile()\r\n {\r\n try(ObjectInputStream fromRestaurantFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/restaurant.dta\")))\r\n {\r\n restaurant = (Restaurant) fromRestaurantFile.readObject();\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n restaurant = new Restaurant();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av mat og \"\r\n + \"drikke objektene.\\nOppretter tomt \"\r\n + \"menyregister.\\n\" + cnfe.getMessage(), \r\n \"Feilmelding\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n restaurant = new Restaurant();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter tomt menyregister.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n restaurant = new Restaurant();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter tomt menyregister.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public void readTheMenu();", "public void readFile(String filePath) \r\n\t{\r\n\t\ttry (BufferedReader read = new BufferedReader(new FileReader(filePath)))\r\n\t\t{\r\n\t\t\t//each line\r\n\t\t\tString item = null;\r\n\t\t\t\r\n\t\t\t//As long as each line(item) is not null\r\n\t\t\twhile ((item = read.readLine()) !=null)\r\n\t\t\t{\r\n\t\t\t\t//Split the item line into separate parts after tab characters and store in temp array\r\n\t\t\t\tString items[] = item.split(\"\\t\");\r\n\t\t\t\t\r\n\t\t\t\t//Assigning each part of the line item to a variable\r\n\t\t\t\tString name = items[0];\r\n\t\t\t\tString type = items[1];\r\n\t\t\t\tString description = items[2];\r\n\t\t\t\tdouble price = Double.parseDouble(items[3]);\r\n\t\t\t\tboolean toRemove;\r\n\t\t\t\t\r\n\t\t\t\t//Deciding the removal boolean\r\n\t\t\t\tif (items[4].equalsIgnoreCase(\"yes\"))\r\n\t\t\t\t{\r\n\t\t\t\t\ttoRemove = true;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\ttoRemove = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//Create MenuItem\r\n\t\t\t\tMenuItem newItem = new MenuItem(name, type, description, price, toRemove);\r\n\t\t\t\t//Add MenuItem to arraylist of menu items\r\n\t\t\t\tmenuItems.add(newItem);\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "public Menu createFileMenu();", "public void retrieveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser(file);\r\n int userSelection = chooser.showOpenDialog(null);\r\n File f = chooser.getSelectedFile();\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n fileName = f.getAbsolutePath();\r\n reader = new MyTodoJsonReader(fileName);\r\n try {\r\n myTodo = reader.readMyToDoList();\r\n todoListGui();\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"File doesn't exist!\");\r\n }\r\n }\r\n }", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public static List<Restaurant> readRestaurants(File file) throws IOException {\n List<String> fileContent = readFile(file);\n return analyzedContent(fileContent);\n }", "public static void readMenu(){\n\t\tSystem.out.println(\"Menu....\");\n\t\tSystem.out.println(\"=====================\");\n\t\tSystem.out.println(\"1. Book A Ticket\\t2. See Settings\\n3. Withdraw\\t4. Deposit\");\n\n\t}", "private static void openSKERestaurant() {\n\n System.out.println(\" _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ \");\n System.out.println(\"| __| | | __| __ | __| __|_ _| _ | | | __ | _ | | |_ _|\");\n System.out.println(\"|__ | -| __| -| __|__ | | | | | | | -| | | | | | |\");\n System.out.println(\"|_____|__|__|_____|__|__|_____|_____| |_| |__|__|_____|__|__|__|__|_|___| |_|\");\n\n String input = \"?\";\n while (true) {\n switch (input) {\n case \"p\":\n placeOrder();\n break;\n case \"c\":\n checkOrder();\n break;\n case \"d\":\n checkPromotion();\n break;\n case \"o\":\n double total = checkOut();\n RestaurantManager.recordOrder(RestaurantManager.getOrderNum(), menuOrder, total);\n System.out.println(\"Have a nice day!!\");\n System.exit(0);\n break;\n case \"m\":\n RestaurantManager.manage();\n load();\n break;\n case \"?\":\n printMenu();\n break;\n case \"s\":\n System.exit(0);\n default:\n System.out.println(\"Invalid menu\");\n break;\n }\n System.out.print(\"cmd> \");\n input = sc.nextLine().trim();\n }\n }", "public static RawMenuItem getMenuForRestaurant() {\n\n AmazonDynamoDBClient ddb = SplashActivity.clientManager\n .ddb();\n DynamoDBMapper mapper = new DynamoDBMapper(ddb);\n\n try {\n RawMenuItem menuItem = mapper.load(RawMenuItem.class,\n Globals.getInstance().getBusinessName());\n\n return menuItem;\n\n } catch (AmazonServiceException ex) {\n SplashActivity.clientManager\n .wipeCredentialsOnAuthError(ex);\n }\n\n return null;\n }", "public void routeSelector(Menu menu) throws IOException,InvalidPathFactoryException,InterruptedException\n {\n String search;\n boolean done = false;\n System.out.println(\"# Route Tracker - Main Menu #\\n\");\n manager.displayRoutes();\n System.out.println(\"# Choose what route you want to take\\n\");\n while(!done)\n {\n search = input.nextLine();\n if(manager.containsRoute(search))\n {\n TrackingProgress trackingProgress = new TrackingProgress(manager.getRoute(search),manager.getGeoUtils(),search);\n GPSWrapper wrapper = new GPSWrapper();\n TrackingMenuState trackingMenuState = new TrackingMenuState(trackingProgress,wrapper);\n menu.setState(trackingMenuState);\n menu.showMenu();\n done = true;\n\n }\n else\n {\n System.out.println(\"Invalid Route name, Enter Valid Route name\");\n\n }\n\n }\n\n\n\n }", "Menu setMenuSectionsFromInfo(RestaurantFullInfo fullInfoOverride);", "Menu getMenuFile();", "public void readFromFile() {\n\n\t}", "public void readRestaurantDetail (BufferedReader reader) {\n\n\n try {\n // Each line of CSV will be stored in this String\n String line = \"\";\n reader.readLine();\n int id = 0;\n while ((line = reader.readLine()) != null) {\n// count++;\n\n // line will be split by \",\", into an array of String\n String[] eachDetailsOfRestaurant = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n\n // Restaurant object created with the tracking number and name.\n Restaurant restaurant = new Restaurant(eachDetailsOfRestaurant[0], eachDetailsOfRestaurant[1], id);\n\n// Log.e(\"checking..............\", count.toString() + \" \" + restaurant.getName());\n\n // Converting coordinates to double and creating Location object\n for (int i = 0; i < eachDetailsOfRestaurant.length; i++) {\n Log.e(TAG, \"\" + i + \":\" + eachDetailsOfRestaurant[i]);\n }\n Double latitude = Double.parseDouble(eachDetailsOfRestaurant[5]);\n Double longitude = Double.parseDouble(eachDetailsOfRestaurant[6]);\n Location location = new Location(eachDetailsOfRestaurant[2], eachDetailsOfRestaurant[3], latitude, longitude);\n\n // Setting Location of the restaurant and adding to the Arraylist\n restaurant.setLocation(location);\n restaurants.add(restaurant);\n id++;\n }\n Collections.sort(restaurants);\n } catch (IOException e) {\n// e.printStackTrace();\n }\n }", "public MenuManager(String dishesFile) {\r\n\r\n\t\tArrayList<MenuItem> menuItems=FileManager.readItems(dishesFile);\r\n\t\tfor(int i=0;i<menuItems.size();i++) {\r\n\t\t\tif(menuItems.get(i) instanceof Entree) {\r\n\t\t\t\tentrees.add((Entree) menuItems.get(i));\r\n\t\t\t}\r\n\t\t\tif(menuItems.get(i) instanceof Side) {\r\n\t\t\t\tsides.add((Side) menuItems.get(i));\r\n\t\t\t}\r\n\t\t\tif(menuItems.get(i) instanceof Salad) {\r\n\t\t\t\tsalads.add((Salad) menuItems.get(i));\r\n\t\t\t}\r\n\t\t\tif(menuItems.get(i) instanceof Dessert) {\r\n\t\t\t\tdesserts.add((Dessert) menuItems.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Restaurant getRestaurant();", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "public void viewMenu() {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\n\t\t\tmm.clear();\n\n\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\n\t\t\tString leftAlignFormat = \"| %-10s | %-37s | %-5s | %-12s | %n\";\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\n\t\t\t\n\t\t\tCollections.sort(mm); \n\t\t\tfor (AlacarteMenu item : mm) {\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tSystem.out.format(leftAlignFormat, item.getMenuName(), item.getMenuDesc(), item.getMenuPrice(),\n\t\t\t\t\t\titem.getMenuType());\n\t\t\t}\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (IOException e) {\n\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public void readFromFile() {\n FileInputStream fis = null;\n try {\n //reaad object\n fis = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fis);\n TravelAgent travelAgent = (TravelAgent)ois.readObject();\n travelGUI.setTravelAgent(travelAgent);\n ois.close();\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n }\n if (fis != null) {\n try {\n fis.close();\n }\n catch (IOException e2) {\n System.out.println(e2.getMessage());\n }\n }\n }", "private void readFile() {\n try (BufferedReader br = new BufferedReader(new FileReader(\"../CS2820/src/production/StartingInventory.txt\"))) {\n String line = br.readLine();\n while (line != null) {\n line = br.readLine();\n this.items.add(line);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void gestorMenu(String ruta) {\t\t\n\t\tFile f = new File (ruta);\n\t\t// establece el directorio padre\n\t\tString base = f.getPath();\n\t\truta = f.getPath();\n\t\t// Presenta por pantalla el menu del programa\n\t\tmostrarMenu();\n\t\t// Inicia el tiempo\n\t\tlong tiempoInicial = System.currentTimeMillis();\n\t\tMenu(ruta, base, tiempoInicial, 0);\n\t}", "public static void main(String[] args)\n {\n \n SequenceTest seqTest = new SequenceTest();\n \n try\n {\n \n //fr is an object of the FileReader class\n FileReader fr = new FileReader(\"input.txt\");\n \n //fileIn is an object of the BufferedReader class\n BufferedReader fileIn = new BufferedReader(fr); \n \n //inital read to start the loop\n String line = fileIn.readLine();\n \n while(line != null)\n {\n \n //send line to menu to determine what information the line\n //contains\n seqTest.menu(line);\n \n //read the next line\n line = fileIn.readLine();\n \n }//end while\n \n }//end try\n catch(IOException e)\n {\n \n System.out.println(\"The file was not found.\");\n \n }//end catch\n\n }", "public void goToMainMenuReservations() throws IOException {\n ApplicationDisplay.changeScene(\"/MainMenuReservations.fxml\");\n }", "private void handleInit() {\n\t\ttry {\n String filePath = \"/app/FOOD_DATA.txt\";\n String line = null;\n FileReader fileReader = new FileReader(filePath);\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n while ((line = bufferedReader.readLine()) != null) {\n System.out.println(line);\n\n String[] foodData = line.split(\"\\\\^\");\n \t\tfor (int i = 2; i < foodData.length; i++) {\n \t\t\tif (foodData[i].equals(\"\")) {\n \t\t\t\tfoodData[i] = \"-1\";\n \t\t\t}\n \t\t}\n String foodName = foodData[0];\n String category = foodData[1];\n double calories = Double.parseDouble(foodData[2]);\n double sodium = Double.parseDouble(foodData[3]);\n double fat = Double.parseDouble(foodData[4]);\n double protein = Double.parseDouble(foodData[5]);\n double carbohydrate = Double.parseDouble(foodData[6]);\n Food food = new Food();\n food.setName(foodName);\n food.setCategory(category);\n food.setCalories(calories);\n food.setSodium(sodium);\n food.setSaturatedFat(fat);\n food.setProtein(protein);\n food.setCarbohydrate(carbohydrate);\n foodRepository.save(food);\n }\n bufferedReader.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n \tcategories = Categories.MAIN_MENU;\n }\n\t}", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "@Override\n public void loadFoodItems(String filePath) {\n file = new File(filePath);\n \n // Check the file existence\n try {\n scnr = new Scanner(file);\n } catch (FileNotFoundException e1) {\n e1.printStackTrace();\n System.out.println(\"no such file\");\n }\n \n // Read the file and save the food info to food class\n try {\n while (scnr.hasNextLine()) {\n \t\n // read line by line\n String text = scnr.nextLine().trim();\n \n // if line is not empty\n \n // load the file to memory\n if (!text.isEmpty()) {\n \t\n String[] objects = text.split(\",\");\n \n //skip the data with wrong format\n if(objects.length != 12) continue;\n String id = objects[0];\n String name = objects[1];\n FoodItem food = new FoodItem(id, name);\n for(int i = 0; i < 5; i++) {\n \tfood.addNutrient(nutrition[i], Double.parseDouble(objects[2*(i+1)+1]));\n }\n foodItemList.add(food);\n \n }\n }\n \n // add the food item to nutrition BPTree\n \n Iterator<FoodItem> foodItr = foodItemList.iterator();\n while(foodItr.hasNext()) {\n \tIterator<BPTree<Double, FoodItem>> treeItr = nutriTree.iterator();\n \tFoodItem tempFood = foodItr.next();\n \tint i = 0;\n while(treeItr.hasNext()) {\n \ttreeItr.next().insert(tempFood.getNutrientValue(nutrition[i]), tempFood);\n \ti ++;\n }\n }\n \n \n scnr.close();\n } catch (Exception e) {\n System.out.println(e.getMessage());\n System.out.println(\"Error in food data processing\");\n }\n }", "public static void main(String[] args) {\n Appetizer fruit = new Appetizer(\"fresh fruit\", 5.9);\n Appetizer salad = new Appetizer(\"cesar salad\", 7);\n Appetizer bread = new Appetizer(\"butter and bred\", 3);\n Entree vagePizza = new Entree(\"vege pizza\",\"small\",10);\n Entree mashroomPizza = new Entree(\"mashroom pizza\", \"small\",12);\n Dessert iceCream = new Dessert(\"vanilla ice cearm\", 5);\n Dessert cake = new Dessert(\"banana cake\", false,4.5);\n\n Entree[] arrayOfEntree = {vagePizza,mashroomPizza};\n Appetizer [] arrayOfAppetizer= {fruit,salad,bread};\n Dessert[] arrayOfDessert= {iceCream,cake};\n\n Menu menu= new Menu(arrayOfAppetizer,arrayOfEntree,arrayOfDessert);\n Restaurant restaurant = new Restaurant(\"Mom Moj\", menu);\n restaurant.menu.printMenu();\n }", "private static ReminderMenuBar getReminderMenu(RemindersFileReader fileReader) {\r\n return new ReminderMenuBar(fileReader);\r\n }", "public void managerMenu() {\n try {\n do {\n System.out.println(EOL + \" ---------------------------------------------------\");\n System.out.println(\"| Manager Screen - Type one of the options below: |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 1. Add an employee |\");\n System.out.println(\"| 2. Remove an employee |\");\n System.out.println(\"| 3. View all employees |\");\n System.out.println(\"| 4. View employees' total salary cost |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 5. View total rent profit |\");\n System.out.println(\"| 6. View most profitable item |\");\n System.out.println(\"| 7. View most frequent rented item |\");\n System.out.println(\"| 8. View best customer |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 9. Load user, product data file |\");\n System.out.println(\"| 10. Load rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 11. Save DART data file |\");\n System.out.println(\"| 12. Save Rental history file |\");\n System.out.println(\"|---------------------------------------------------|\");\n System.out.println(\"| 13. Return to Main Menu |\");\n System.out.println(\" ---------------------------------------------------\");\n String[] menuAcceptSet = new String[]{\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\"}; // Accepted responses for menu options\n String userInput = getInput.getMenuInput(\"menuOptionPrompt\", menuAcceptSet); // Calling Helper method\n\n DartController dart = new DartController();\n\n switch (userInput.toLowerCase()) {\n case \"1\" -> userController.addEmployee();\n case \"2\" -> userController.deleteEmployee();\n case \"3\" -> userController.displayEmployees(false);\n case \"4\" -> userController.calculateSalary();\n case \"5\" -> dart.viewRentalTotalProfit();\n case \"6\" -> dart.viewRentalProfitable();\n case \"7\" -> dart.viewRentalFrequency();\n case \"8\" -> dart.viewRentalBestCustomer();\n case \"9\" -> dart.loadProductData();\n case \"10\" -> dart.loadRentalData();\n case \"11\" -> dart.saveProductData();\n case \"12\" -> dart.saveRentalData();\n case \"13\" -> mainMenu();\n\n default -> printlnInterfaceLabels(\"menuOptionNoMatch\");\n }\n } while (session);\n } catch (Exception e) {\n printlnInterfaceLabels(\"errorExceptionMainMenu\", String.valueOf(e));\n }\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "public ArrayList<Dish> ReadInEatery(String filepath, String name) {\n _dishes = new ArrayList<Dish>();\n try{\n int sucess = readMeals(name, filepath);\n if (sucess == -1) {\n JOptionPane.showMessageDialog(null, \"Failure to find, create, or parse text file of nutrition information in /tmp directory\");\n return null;\n } else if (sucess == 0) {\n return null;\n } else {\n return _dishes;\n }\n }catch(Exception e){\n return null;\n }\n\n }", "public static List<Restaurant> retrieveRestaurantsFromWorkBook(final File file)\r\n\t\t\tthrows InvalidFormatException, IOException {\r\n\t\tfinal Workbook workbook = WorkbookFactory.create(file);\r\n\t\tfinal List<Restaurant> restaurants = new ArrayList<Restaurant>();\r\n\r\n\t\tfinal Sheet sheet = workbook.getSheetAt(0);\r\n\r\n\t\tfor (final Row row : sheet) {\r\n\r\n\t\t\tif (null != row.getCell(0)) {\r\n\t\t\t\tfinal String name = row.getCell(0).getStringCellValue();\r\n\t\t\t\tfinal String address = row.getCell(1).getStringCellValue();\r\n\t\t\t\tfinal String city = row.getCell(2).getStringCellValue();\r\n\t\t\t\tfinal String state = row.getCell(3).getStringCellValue();\r\n\t\t\t\tfinal String zipCode = StringUtils.doubleToString(row.getCell(4).getNumericCellValue());\r\n\t\t\t\tfinal String telephoneNumber = row.getCell(5).getStringCellValue();\r\n\t\t\t\tfinal String website = row.getCell(6).getStringCellValue();\r\n\r\n\t\t\t\tfinal Restaurant restaurant = new Restaurant(name, address, city, state, zipCode, telephoneNumber,\r\n\t\t\t\t\t\twebsite);\r\n\r\n\t\t\t\trestaurants.add(restaurant);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn restaurants;\r\n\t}", "public static void main(String[] args) {\n\t\tFileIO a1 = new FileIO(\"/Users/StevenH/Desktop/Projects/cis36B/assignment336b/src/Salesdat.txt\");\r\n\t\tFranchise f = a1.readData();\r\n\t\tSystem.out.printf(\"\\n\");\r\n\t\tf.getStores(0).printdata();\r\n\t\tf.getStores(0).businessmethod();\r\n\t}", "public static void main(String[] args) {\n\t\tDocument doc = new Document(\"Sample.txt\");\n\t\tFileMenuOptions fileOptions = new FileMenuOptions(doc);\n\t\tfileOptions.doCommand(\"open\");\n\t\tfileOptions.doCommand(\"save\");\n\t\tfileOptions.doCommand(\"close\");\n\t\tfileOptions.doCommand(\"exit\");\n\n\t}", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "private void createRecipeFromFile() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers,\n // it would be \"*/*\".\n intent.setType(\"*/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public void editMenuItem() {\n\t\tviewMenu();\n\n\t\t// Clean arraylist so that you can neatly add data from saved file\n\t\tmm.clear();\n\t\t\n\t\tString menuEdit;\n\t\tint editC;\n\n\t\tSystem.out.println(\"Which one do you want to edit?\");\n\n\t\tString toChange;\n\t\tDouble changePrice;\n\t\tScanner menuE = new Scanner(System.in);\n\t\tmenuEdit = menuE.next();\n\n\t\ttry \n\t\t{\n\t\t\t// Get data contents from saved file\n\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n ObjectInputStream ois = new ObjectInputStream(fis);\n \n mm = (ArrayList<AlacarteMenu>) ois.readObject();\n \n ois.close();\n fis.close();\n \n try {\n \tfor (int i = 0; i < mm.size(); i++) {\n \t\t\tif (mm.get(i).getMenuName().equals(menuEdit.toUpperCase())) {\n \t\t\t\tSystem.out.println(\n \t\t\t\t\t\t\"Edit Option \\n 1 : Menu Description \\n 2 : Menu Price \\n 3 : Menu Type \");\n \t\t\t\teditC = menuE.nextInt();\n\n \t\t\t\tif (editC == 1) {\n \t\t\t\t\tmenuE.nextLine();\n \t\t\t\t\tSystem.out.println(\"Change in Menu Description : \");\n \t\t\t\t\ttoChange = menuE.nextLine();\n \t\t\t\t\tmm.get(i).setMenuDesc(toChange);\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t\telse if (editC == 2) {\n \t\t\t\t\tSystem.out.println(\"Change in Menu Price : \");\n \t\t\t\t\tchangePrice = menuE.nextDouble();\n \t\t\t\t\tmm.get(i).setMenuPrice(changePrice);\n \t\t\t\t\tbreak;\n \t\t\t\t} \n \t\t\t\telse if (editC == 3) {\n \t\t\t\t\tSystem.out.println(\"Change in Menu Type : \\n1 : Appetizers \\n2 : Main \\n3 : Sides \\n4 : Drinks\");\n \t\t\t\t\tchangePrice = menuE.nextDouble();\n \t\t\t\t\tif (changePrice == 1) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Appetizers\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\telse if (changePrice == 2) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Main\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\telse if (changePrice == 3) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Sides\");\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t} \n \t\t\t\t\telse if (changePrice == 4) {\n \t\t\t\t\t\tmm.get(i).setMenuType(\"Drinks\");\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\n \tFileOutputStream fos = new FileOutputStream(\"menuData\");\n\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\toos.writeObject(mm);\n\t\t\t\toos.close();\n\t\t\t\tfos.close();\n }\n catch (IOException e) {\n \t\t\tSystem.out.println(\"Error editing menu item!\");\n \t\t\treturn;\n \t\t}\n ois.close();\n fis.close();\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\treturn;\n\t\t}\n\t\tcatch (ClassNotFoundException c) {\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void load() {\n File file = new File(path + \"/\" + \"rooms.txt\"); //Hold file of the riddles. riddles.txt should be placed in the root folder.\n Scanner scanner = null; //if the scanner can't load the file.\n\n try {\n scanner = new Scanner(file); // scanner for the file\n } catch (FileNotFoundException ex) {\n try {\n //if not such file exists create it.\n file.createNewFile();\n } catch (IOException ex1) {\n Logger.getLogger(LoadRooms.class.getName()).log(Level.SEVERE, null, ex1);\n return;\n }\n }\n while (scanner.hasNextLine()) { //if scanner har fundt next line of text in the file\n switch (scanner.nextLine()) {\n case \"[Room]:\": //if scanner fundt \"[Room]:\" case, get rooms attributes\n state = LOAD_ATTRIBUTES;\n break;\n case \"[Connections]:\"://if scanner fundt \"[Connections]:\" case, get connections from file\n state = LOAD_CONNECTIONS;\n break;\n\n default:\n break;\n }\n switch (state) {\n case LOAD_ATTRIBUTES: //case, that get rooms attributes and add them to room_list\n String name = scanner.nextLine();\n int timeToTravel = Integer.parseInt(scanner.nextLine());\n boolean isLocked = Boolean.parseBoolean(scanner.nextLine());\n boolean isTransportRoom = Boolean.parseBoolean(scanner.nextLine());\n Room newRoom = new Room(name, timeToTravel, isLocked, isTransportRoom);\n if (newRoom.isTransportRoom()) {\n newRoom.setExit(\"exit\", newRoom);\n newRoom.setExitDir(\"west\", newRoom);\n }\n rooms_list.add(newRoom);\n break;\n case LOAD_CONNECTIONS: //case that get connections betweem rooms in game\n while (scanner.hasNextLine()) {\n String[] string = scanner.nextLine().split(\",\");\n Room room = this.getRoomByName(string[0]);\n room.setExit(string[1], this.getRoomByName(string[1]));\n if (!this.getRoomByName(string[1]).isTransportRoom() && !room.isTransportRoom()) {\n room.setExitDir(string[2], getRoomByName(string[1]));\n }\n }\n break;\n default:\n break;\n }\n }\n }", "public void addAlaCarteMenu() {\n\t\tboolean isRunning = true;\n\n\t\twhile (isRunning) {\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\tint menuTypeNo;\n\t\t\tString menuType = \" \";\n\t\t\t// When the user enters 1,2,3,4 - > The type gets automatically added.\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Please Enter Menu Type(-1 to Complete): \\n1 : Appetizers \\n2 : Main \\n3 : Sides \\n4 : Drinks\");\n\n\t\t\tmenuTypeNo = scan.nextInt();\n\t\t\t\n\t\t\tdo {\n\t\t\t\tif (menuTypeNo == -1) {\n\t\t\t\t\tisRunning = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (menuTypeNo == 1) {\n\t\t\t\t\tmenuType = \"Appetizers\";\n\t\t\t\t} else if (menuTypeNo == 2) {\n\t\t\t\t\tmenuType = \"Main\";\n\t\t\t\t} else if (menuTypeNo == 3) {\n\t\t\t\t\tmenuType = \"Sides\";\n\t\t\t\t} else if (menuTypeNo == 4) {\n\t\t\t\t\tmenuType = \"Drink\";\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Invalid Input, Try Again..\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tboolean idChecker = true;\n\t\t\t\t\n\t\t\t\t// Retrieve menuData to validate\n\t\t\t\tFile f = new File(\"menuData\");\n\n\t\t\t\tdo {\n\t\t\t\t\tif (f.isFile()) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tFileInputStream fis = new FileInputStream(\"menuData\");\n\t\t\t\t\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\t\t\t\t\tmm.clear();\n\t\t\t\t\t\t\tmm = (ArrayList<AlacarteMenu>) ois.readObject();\n\t\t\t\t\t\t\tois.close();\n\t\t\t\t\t\t\tfis.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\n\t\t\t\t\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\t\t\t\tSystem.out.format(\"| Menu ID | Description | Price | Type |%n\");\n\t\t\t\t\t\t\tSystem.out.format(\"+------------+---------------------------------------+-------+--------------+%n\");\n\t\t\t\t\t\t\t//System.out.println(\"No menu items found!\");\n\t\t\t\t\t\t} catch (ClassNotFoundException c) {\n\t\t\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print(\"Please Enter Menu ID: \\nM\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (idChecker) {\n\t\t\t\t\t\t\tscan.nextLine();\n\t\t\t\t\t\t\tmenuID = \"M\" + scan.nextLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (!idChecker) {\n\t\t\t\t\t\t\tmenuID = \"M\" + scan.next();\n\t\t\t\t\t\t\tscan.nextLine();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (final AlacarteMenu amItem: mm) {\n\t\t\t\t\t\t\tif (amItem.getMenuName().equalsIgnoreCase(menuID)) {\n\t\t\t\t\t\t\t\tidChecker = false;\n\t\t\t\t\t\t\t\tSystem.out.println(\"Duplicated ID found!\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tidChecker = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (!f.isFile()) {\n\t\t\t\t\t\tSystem.out.print(\"Please Enter Menu ID: \\nM\");\n\t\t\t\t\t\t scan.nextLine(); \n\t\t\t\t\t\tmenuID = \"M\" + scan.nextLine();\n\t\t\t\t\t\tidChecker = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile (!idChecker);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Please Enter Menu Item Description: \");\n\t\t\t\tString menuDesc = scan.nextLine();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Please Enter Menu Item Price: \");\n\t\t\t\tdouble menuPrice = scan.nextDouble();\n\n\t\t\t\tAlacarteMenu aam = new AlacarteMenu(menuID, menuDesc, menuPrice, menuType);\n\t\t\t\tmm.add(aam);\n\n\t\t\t\ttry {\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"menuData\");\n\t\t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t\t\t\toos.writeObject(mm);\n\t\t\t\t\toos.close();\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Failed to add menu item.\");\n\t\t\t\t}\n\t\t\t} while (menuTypeNo > 5 && menuTypeNo != -1);\n\t\t}\n\t}", "public static void main(String args[]) {\n // An object of TodoList to hold all tasks and their data\n TodoList todoList = new TodoList();\n\n //A string to hold the choice that will be entered by the user\n String menuChoice = \"-2\";\n\n try {\n Scanner input = new Scanner(System.in);\n\n // reading the date from task data file\n // if this is the first time, a message will be shown that no data file is found\n todoList.readTodoListFromObjectFile(filename);\n\n Menu.displayMessage(\"Welcome to ToDoList\", false);\n\n while (!menuChoice.equals(\"4\")) {\n Menu.showMainMenu(todoList.noOfPendingTodo(), todoList.noOfCompletedTodo());\n menuChoice = input.nextLine();\n\n switch (menuChoice) {\n case \"1\":\n Menu.showTodoMenuToSort();\n todoList.displayAllTodosSortedBy(input.nextLine());\n break;\n case \"2\":\n todoList.getTodoFromUserToAddInTodoList();\n break;\n case \"3\":\n Menu.editSelectedTodoMessage();\n todoList.displayAllTodosWithId();\n todoList.editTodo(input.nextLine());\n break;\n case \"4\":\n break;\n\n default:\n Menu.commandNotFoundMessage();\n }\n }\n\n todoList.saveTodoListToObjectFile(filename);\n Menu.exitMessage();\n\n } catch (Exception e) {\n Menu.displayMessage(\"UNCAUGHT EXCEPTION THROWN\", true);\n System.out.println(\"Trying to write the unsaved data of all todos in data file\");\n todoList.saveTodoListToObjectFile(filename);\n System.out.println(e.getMessage());\n System.out.println(e.getStackTrace());\n }\n }", "public void mainMenu()\n {\n\n System.out.println('\\u000C'); //clears screen\n System.out.println(\"<------------- Press 0 to return.\");\n System.out.println();\n System.out.println();\n System.out.println(\"\\t\\tTeacher Menu\");\n System.out.println(\"\\t1. View Names\");\n System.out.println(\"\\t2. Change Name\");\n System.out.println(\"\\t3. Add Teacher\");\n input = in.nextInt();\n in.nextLine();\n\n switch(input)\n {\n case 0: //call main menu -- create instance of menu class here to pass in current state of arraylist\n returnTo = new StartMenu(teachers);\n returnTo.enterId(teachers);\n break;\n\n case 1: //view names -- a subclass class that extends StudentMenu \n //temporary method that will view all names\n viewNames();\n break;\n\n case 2: //change names\n changeName();\n break;\n\n case 3: //change grade\n addNewPerson();\n break;\n\n } //ends switch statement\n\n }", "private void leituraTexto() {\n try {\n Context context = getApplicationContext();\n\n InputStream arquivo = context.getResources().openRawResource(R.raw.catalogo_restaurantes);\n InputStreamReader isr = new InputStreamReader(arquivo);\n\n BufferedReader br = new BufferedReader(isr);\n\n String linha = \"\";\n restaurantes = new ArrayList<>();\n\n while ((linha = br.readLine()) != null) {\n restaurante = new Restaurante(linha);\n String id = Biblioteca.parserNome(restaurante.getId());\n String nome = Biblioteca.parserNome(restaurante.getNome());\n String descricao = Biblioteca.parserNome(restaurante.getDescricao());\n// Log.i(\"NOME\", nome);\n String rank = Biblioteca.parserNome(restaurante.getRank());\n int imagem = context.getResources().getIdentifier(nome, \"mipmap\", context.getPackageName());\n restaurante.setLogo(imagem);\n\n int imgrank = context.getResources().getIdentifier(rank, \"drawable\", context.getPackageName());\n restaurante.setRank(String.valueOf(imgrank));\n\n restaurantes.add(restaurante);\n }\n carregarListView();\n br.close();\n isr.close();\n arquivo.close();\n// Log.i(\"Quantidade\", \"\" + produtos.size());\n } catch (Exception erro) {\n Log.e(\"FRUTARIA Erro\", erro.getMessage());\n }\n\n }", "public static void main(String[] args) throws Exception {\n\t\tFoodMenu();\n\t}", "@FXML\n void loadButtonClicked(ActionEvent event) throws FileNotFoundException\n {\n FileChooser file = new FileChooser();\n\n file.setTitle(\"Load file (.txt)\");\n\n file.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Text Files\", \"*.txt\"));\n\n File selectedFile = file.showOpenDialog(listView.getScene().getWindow());\n\n // Create new file with all info on file, do this in a method\n loadFile(selectedFile);\n\n // Send all this info to the list in order to create new one\n for(int i=0; i<Item.getToDoList().size(); i++)\n {\n // Display items\n display();\n\n }\n }", "public void goToRestaurantDetails(View view) {\n\t\t// Get current restaurant being displayed\n\t\tIntent intent = new Intent(this, RestaurantDetails.class);\n\t\tList<Business> currentSearchList = ApplicationData.getInstance().getListCurrentSearch();\n\n\t\t// Add restaurant information to the restaurant selection screen\n\t\tintent.putExtra(\"restaurantName\", currentSearchList.get(0).name());\n\t\tintent.putExtra(\"businessStreetAddress\", currentSearchList.get(0).location().displayAddress().get(0)); // example street address: 235 Boulevard St-Jean\n\t\tintent.putExtra(\"businessRegionalAddress\", currentSearchList.get(0).location().displayAddress().get(2)); // example regional address: Pointe-Claire, QC H9R 3J1\n\t\tintent.putExtra(\"restaurantDescription\", currentSearchList.get(0).snippetText());\n\t\tintent.putExtra(\"restaurantImage\", currentSearchList.get(0).imageUrl());\n\n\t\t// Transition to restaurant details screen\n\t\tstartActivity(intent);\n\t}", "public static void main(String[] args) throws IOException {\n\n\n Menu.displayMenu();\n }", "private void readItems() {\n }", "public void run()\n {\n getMenuChoice();\n }", "public static void main(String[] args) throws IOException {\n Scanner input = new Scanner(System.in);\n\n // Tells the user what the program does.\n System.out.println(\"\\nWelcome to Tiffany’s Restaurant. We offer an array of delicious food items. \" +\n \"Take a look at our menu below.\\n\");\n\n //Display Menu\n displayMenu();\n\n // Ask the User if they would like to start a new order\n Boolean answer = newOrder();\n\n //Depending on if they would like to start a new order or not either continue\n //ordering process or display good bye greeting\n if (answer) {\n //creates an order ArrayList so each of the Food items can be added\n ArrayList<Food> order = new ArrayList<>();\n\n// //Calls the addToOrder method with the Array to capture the order.\n// addToOrder(order);\n\n //Ask the user if they would like to continue ordering\n Boolean notDoneOrdering;\n do{\n addToOrder(order);\n notDoneOrdering = continueOrdering();\n\n }while(notDoneOrdering);\n\n //Once the order is complete write the order to a file\n try(PrintWriter data = new PrintWriter(\"order.txt\")){\n java.util.Date dateCreated = new java.util.Date();\n data.print(dateCreated);\n for(Food x : order){\n data.print( x.toString());\n }\n }\n //Read the order back from the file\n File myFile = new File(\"order.txt\");\n try (Scanner inputFile = new Scanner(myFile)) {\n while(inputFile.hasNextLine()){\n String line = inputFile.nextLine();\n System.out.println(line);\n }\n }\n\n //Show the goodbye Greeting.\n System.out.printf(\"\\nThank you for coming. Have a great day. See you next time!\");\n\n }\n else {\n System.out.printf(\"\\nThank you for coming. Have a great day. See you next time!\");\n }\n\n\n\n }", "private void buildMovementData(File crinkleViewerFile) {\n\t\t// read from a file\n\t\tScanner sc;\n\t\ttry {\n\t\t\tsc = new Scanner(crinkleViewerFile);\n\t\t\twhile (sc.hasNextLine()) {\n\t\t\t\trecieve(sc.nextLine());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_read, menu);\n return true;\n }", "public static void main(String[] args) throws Exception{\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Restaurant API Menu\");\n System.out.println(\"1. Get all menu sections\");\n System.out.println(\"2. Get a menu section by ID\");\n System.out.println(\"3. Add a new menu section\");\n System.out.println(\"4. Edit a menu section\");\n System.out.println(\"5. Delete a menu section\");\n System.out.println(\"6. Exit\");\n // continously print the menu, until the user quits\n while(sc.hasNextLine()) {\n // if input 1, go to getAll which calls the doGetList method that\n // shows all the records in the database\n String input = sc.nextLine();\n if (input.equals(\"1\")) {\n System.out.println(\"Response Body:\");\n System.out.println(getAll());\n }\n // if input 2, use read method to get the result from doGet method\n if (input.equals(\"2\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Response Body:\");\n System.out.println(read(id));\n }\n // if input 3, use assign method to get the result from doPost method\n if (input.equals(\"3\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Please insert the name\");\n String name = sc.nextLine();\n Result r = new Result();\n Boolean flag = assign(name, id, r);\n // print the error info when the user tends to add new menue which has the \n // id that already in the database\n if (flag == false) {\n System.out.println(\"Response Body:\");\n System.out.println(\"fail to add, there already exists a record with the same id\");\n }\n \n }\n // if input 3, use edit method to get the result from doPut method\n if (input.equals(\"4\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n System.out.println(\"Please insert the name\");\n String name = sc.nextLine(); \n Boolean flag = edit(name, id);\n // print the error info when the user tends to edit menue which has the \n // id that not in the database\n if (flag == false) {\n System.out.println(\"Response Body:\");\n System.out.println(\"fail to edit, there isn't a record with the id\");\n }\n }\n // if input 3, use clear method to call doDelete method\n if (input.equals(\"5\")) {\n System.out.println(\"Please insert the ID\");\n String id = sc.nextLine();\n Boolean flag = clear(id);\n JSONObject json = new JSONObject();\n json.put(\"success\", flag);\n System.out.println(json.toString());\n }\n // if input 6, quit\n if (input.equals(\"6\")) {\n System.out.println(\"quitting the client...\");\n break;\n }\n System.out.println();\n System.out.println(\"Restaurant API Menu\");\n System.out.println(\"1. Get all menu sections\");\n System.out.println(\"2. Get a menu section by ID\");\n System.out.println(\"3. Add a new menu section\");\n System.out.println(\"4. Edit a menu section\");\n System.out.println(\"5. Delete a menu section\");\n System.out.println(\"6. Exit\");\n }\n }", "public Elegir()\n {\n initComponents();\n\n try\n {\n ObjectInputStream directorios = new ObjectInputStream(new FileInputStream(\"dirFav.dat\"));\n directoriosFavoritos = (ArrayList<String>) directorios.readObject();\n if (directoriosFavoritos == null)\n {\n directoriosFavoritos = new ArrayList<>();\n } else\n {\n for (int i = 0; i < directoriosFavoritos.size(); i++)\n {\n JMenuItem menuItem = new JMenuItem(directoriosFavoritos.get(i));\n menuItem.addActionListener(this);\n jMenuFavoritos.add(menuItem);\n submenus.add(menuItem);\n }\n }\n directorios.close();\n } catch (Exception e)\n {\n }\n }", "public void displayMenu() {\n\t\tSystem.out.println(\"\\n1 to see vehicles in a date interval\");\n\t\tSystem.out.println(\"2 to see a specific reservation\");\n\t\tSystem.out.println(\"3 to see all reservations\");\n\t\tSystem.out.println(\"9 to exit\\n\");\n\t\ttry {\n\t\t\tString in = reader.readLine();\n\t\t\tswitch (in) {\n\t\t\tcase \"1\":\n\t\t\t\tdisplayCarsInInterval();\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdisplaySpecificBooking();\n\t\t\t\tbreak;\n\t\t\tcase \"3\":\n\t\t\t\tdisplayBookings();\n\t\t\t\tbreak;\n\t\t\tcase \"9\":\n\t\t\t\tSystem.out.println(\"Client application terminated\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Please insert a valid number\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Unexpected problem with reading your input, please try again.\");\n\t\t}\n\t\tdisplayMenu();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Intent restIntent = getIntent();\n RestaurantInfo rInfo = (RestaurantInfo)restIntent.getSerializableExtra(\"rest\");\n chosenItems=(ArrayList<MenuItem>)restIntent.getSerializableExtra(\"MealList\");\n if(chosenItems == null){\n chosenItems = new ArrayList<MenuItem>();\n }\n //need to use RestaurantInfo to create a data struct to give to contentView\n mp = apiInterface.getMenu(rInfo);\n\n //set up content view\n this.allData = mp.getMenu();\n setContentView(R.layout.activity_menu_of_restaurant);\n expt = (ExpandableListView) findViewById(R.id.expandableListView);\n expt.setAdapter(new FirstLevelAdapter(this, this.allData));\n //return to the Restaurant list\n Button back = (Button) findViewById(R.id.buttonBack);\n back.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n Intent myIntent = new Intent(view.getContext(), RestaurantChoices.class);\n startActivityForResult(myIntent, 0);\n }\n\n });\n //pass meals to visualization\n Button pushToViz = (Button) findViewById(R.id.buttonToViz);\n pushToViz.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n Intent myIntent = new Intent(view.getContext(), MainActivity.class);\n myIntent.putExtra(\"MealList\", chosenItems);\n startActivityForResult(myIntent, 0);\n }\n\n });\n }", "public void initialize(InputStream is) {\n // Get data out of the restaurants file and store it in a readable way.\n ArrayList<String> restaurantData = getFileData(is);\n\n // Fill arrayList with restaurant objects by properly initializing restaurants.\n initializeRestaurantList(restaurantData);\n }", "private void clickNewStateMachine(ARCEditor arcEditor, VMFile file) {\n ClickHandler clickHandler = new ClickHandler() {\n @Override\n public void onClick(MenuItemClickEvent event) {\n editResourceService.getDirId(file.getId(), new AsyncCallback<Long>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(Long dirID) {\n VMFile newFile = new VMFile();\n newFile.setExtension(Extension.FSM);\n String fileName = \"StateMachine\";\n\n editResourceService.getResources(dirID, new AsyncCallback<List<VMResource>>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(List<VMResource> result) {\n // check duplicate file name under same directory and set file name\n newFile.setName(checkDuplicateName(result, fileName, newFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FSMPackage.eNS_URI, FSMPackage.eINSTANCE);\n\n FSMDStateMachine machine = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n machine = (FSMDStateMachine) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n ARCState newState = ARCFactory.eINSTANCE.createARCState();\n newState.setFileId(machine.getId());\n newState.setTop(arcEditor.getStateTop());\n newState.setLeft(arcEditor.getStateLeft());\n newState.setHeight(40);\n newState.setWidth(80);\n newState.setEvalPriority(arcEditor.getMaxEvalPriority());\n\n CompoundCommand cmd = ARCEditorCommandProvider.getInstance().addState(arcEditor.getARCRoot(), newState,\n arcEditor.getARCRoot().getStates().size());\n arcEditor.getEditManager().execute(cmd.unwrap());\n arcEditor.refresh();\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }\n });\n }\n });\n }\n };\n arcEditor.addNewStateMachineHandler(clickHandler);\n }", "private void readItems() {\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n // try to find items to add\n try {\n items = new ArrayList<>(FileUtils.readLines(todoFile));\n } catch (IOException e) {\n items = new ArrayList<>();\n }\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "public void readDataFromFile(){\n try {\n weatherNow.clear();\n // Open File\n Scanner scan = new Scanner(context.openFileInput(fileSaveLoc));\n\n // Find all To Do items\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n\n // if line is not empty it is data, add item.\n if (!line.isEmpty()) {\n // first is the item name and then the item status.\n String[] readList = line.split(\",\");\n String city = readList[0];\n String countryCode = readList[1];\n double temp = Double.parseDouble(readList[2]);\n String id = readList[3];\n String description = readList[4];\n\n weatherNow.add(new WeatherNow(city,countryCode, temp, id, description));\n }\n }\n\n // done\n scan.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_restaurant, menu);\n return true;\n }", "public static void main(String[] args) throws IOException {\n\n ItemSet items = ItemSet.load(\"c:/temp/items.txt\");\n System.out.println(items);\n }", "void loadArticleMenuItem_actionPerformed(ActionEvent e) {\n\n // Action from Open... Show the OpenFileDialog\n openFileDialog.show();\n String fileName = openFileDialog.getFile();\n\n if (fileName != null) {\n NewsArticle art = new NewsArticle(fileName);\n\n art.readArticle(fileName);\n articles.addElement(art);\n filterAgent.score(art, filterType); // score the article\n refreshTable();\n articleTextArea.setText(art.getBody());\n articleTextArea.setCaretPosition(0); // move cursor to start of article\n }\n }", "public void load(){\n\t\t\tArrayList<String> entries = readEntriesFromFile(FILENAME);\n\t\t\t\n\t\t\tfor(int i = 1; i < entries.size(); i++){\n\t\t\t\tString entry = entries.get(i);\n\t\t\t\tString[] entryParts = entry.split(\",\");\n\t\t\t\tString name = entryParts[0];\n\t\t\t\tString power = entryParts[1];\n\t\t\t\tString gold = entryParts[2];\n\t\t\t\tString xp = entryParts[3];\n\t\t\t\tString location = entryParts[4];\n\t\t\t\tint powerInt = Integer.parseInt(power);\n\t\t\t\tint goldInt = Integer.parseInt(gold);\n\t\t\t\tint XPInt = Integer.parseInt(xp);\n\t\t\t\tRegion regionR = RM.getRegion(location);\n\t\t\t\tTrap trap = new Trap(name, powerInt, goldInt, XPInt, regionR);\n\t\t\t\ttrapList[i-1] = trap;\n\t\t\t}\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu)\n \t{\n \t\tgetMenuInflater().inflate(R.menu.edit_recipe, menu);\n \t\treturn true;\n \t}", "public static void reader() throws FileNotFoundException {\n\t\tSystem.out.println(\"Estamos calculando sua rota. Por favor aguarde...\");\n\t\tstops = GTFSReader.loadStops(\"bin/arquivos/stops.txt\");\n\t\tMap<String,Route>routes = GTFSReader.loadRoutes(\"bin/arquivos/routes.txt\");\n\t\tMap<String,Shape> shapes = GTFSReader.loadShapes(\"bin/arquivos/shapes.txt\");\n\t\tMap<String,Service> calendar = GTFSReader.loadServices(\"bin/arquivos/calendar.txt\");\n\t\ttrips = GTFSReader.loadTrips(\"bin/arquivos/trips.txt\",routes,calendar,shapes);\n\t\tGTFSReader.loadStopTimes(\"bin/arquivos/stop_times.txt\", trips, stops);\n\t\tSystem.out.println(\"Rota calculada!\\n\");\n\t}", "public static void main(String []args){\n miFichero = new Fichero(\"peliculas.xml\");\n //cargamos los datos del fichero\n misPeliculas = (ListaPeliculas) miFichero.leer();\n\n //si no habia fichero\n\n if(misPeliculas == null) {\n misPeliculas = new ListaPeliculas();\n }\n int opcion;\n do{\n mostrarMenu();\n opcion = InputData.pedirEntero(\"algo\");\n switch (opcion){\n case 1:\n altaPelicula();\n break;\n case 2:\n break;\n case 3:\n break;\n case 4:\n break;\n }\n\n }while(opcion!= 0);\n }", "public void handleLoad() throws IOException {\n File file = new File(this.path);\n\n // creates data directory if it does not exist\n file.getParentFile().mkdirs();\n\n // creates tasks.txt if it does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n\n Scanner sc = new Scanner(file);\n\n while (sc.hasNext()) {\n String longCommand = sc.nextLine();\n String[] keywords = longCommand.split(\" \\\\|\\\\| \");\n Task cur = null;\n switch (keywords[1]) {\n case \"todo\":\n cur = new Todo(keywords[2]);\n break;\n case \"deadline\":\n cur = new Deadline(keywords[2], keywords[3]);\n break;\n case \"event\":\n cur = new Event(keywords[2], keywords[3]);\n break;\n default:\n System.out.println(\"error\");\n break;\n }\n if (keywords[0].equals(\"1\")) {\n cur.markAsDone();\n }\n TaskList.getTaskLists().add(cur);\n }\n sc.close();\n }", "public Restaurant() {\n\t\t\n\t}", "public static void mainMenu() {\n\t\tSystem.out.println(\"1. Train the autocomplete algorithm with input text\");\r\n\t\tSystem.out.println(\"2. Test the algorithm by entering a word fragment\");\r\n\t\tSystem.out.println(\"3. Exit (The algorithm will be reset on subsequent runs of the program)\");\r\n\t\tint choice = getValidInt(1, 3); // get the user's selection\r\n\t\tSystem.out.println(\"\"); // for appearances\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t//evaluate the user's choice\r\n\t\tswitch (choice) {\r\n\t\tcase CONSTANTS.TRAIN:\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Enter a passage to train the algorithm (press enter to end the passage): \");\r\n\t\t\tString passage = scan.nextLine();\r\n\t\t\tprovider.train(passage);\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase CONSTANTS.TEST:\r\n\t\t\t\r\n\t\t\tString prefix;\r\n\t\t\tdo { // keep asking for input until a valid alphabetical string is given\r\n\t\t\t\tSystem.out.print(\"Enter a prefix to test autocomplete (alphabetic characters only): \");\r\n\t\t\t\tprefix = scan.nextLine();\r\n\t\t\t} while (!prefix.matches(\"[a-zA-z]+\"));\r\n\t\t\tSystem.out.println(\"\"); // for appearances\r\n\t\t\tshowResults(provider.getWords(prefix.toLowerCase()));\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase CONSTANTS.EXIT:\r\n\t\t\t\r\n\t\t\tSystem.exit(0);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tmainMenu();\r\n\t}", "public void enter(String path);", "public void onMenuOpen() {\n String initialDirectory = getInitialDirectory();\n System.out.println(initialDirectory);\n File file = FileChooserHelper.showOpenDialog(initialDirectory, this);\n\n if (file == null || !file.exists() || !file.isFile()) {\n return;\n }\n\n handleMenuOpen(file.getAbsolutePath());\n }", "public void run(String[] args){\n if (args.length > 0)\n {\n try{\n InputStreamReader is = new InputStreamReader(getClass().getResourceAsStream(\"/\" + args[0]));\n BufferedReader txtReader = new BufferedReader(is);\n Scanner inputScanner = new Scanner(txtReader);\n System.out.println(String.format(\"Processing file %s\", args[0]));\n ToyRobot toyRobot = new ToyRobot();\n ToyRobotController controller = new ToyRobotController(toyRobot);\n while (inputScanner.hasNext()){\n String line = inputScanner.nextLine().toUpperCase();\n if (line.contains(Constants.COMMAND_PLACE) && Utilities.isOnTable(Utilities.getCoordinateFromInput(line))){\n controller.place(Utilities.getCoordinateFromInput(line), Utilities.getDirectionFromInput(line));\n System.out.println(String.format(\"Robot placement at %s,%s\", controller.getRobot().getCoordinates().getxCoordinate(), controller.getRobot().getCoordinates().getyCoordinate() ));;\n } else if (line.contains(Constants.COMMAND_MOVE)){\n controller.move();\n System.out.println(String.format(\"Robot moving at direction %s\", controller.getRobot().getDirection()));\n } else if ((line.contains(Constants.COMMAND_TURN_LEFT) || line.contains(Constants.COMMAND_TURN_RIGHT))){\n controller.turn(line);\n System.out.println(String.format(\"Robot changed direction to %s\", controller.getRobot().getDirection()));\n } else if (line.contains(Constants.COMMAND_REPORT)){\n controller.location();\n }\n }\n } catch (Exception e){\n System.out.println(\"No input found\");\n }\n }\n else\n {\n System.out.println(\"No input found\");\n }\n }", "public static void main(String[] args){\n Menu iniciar_menu = new Menu();\r\n }", "public void readFromHotelRoomListFile()\r\n {\r\n try(ObjectInputStream fromHotelRoomListFile = \r\n new ObjectInputStream(new FileInputStream(\"listfiles/hotelRoomlist.dta\")))\r\n {\r\n hotelRoomList = (HotelRoomList) fromHotelRoomListFile.readObject();\r\n hotelRoomList.getSavedStaticPrice(fromHotelRoomListFile);\r\n }\r\n catch(ClassNotFoundException cnfe)\r\n {\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Fant ikke definisjon av hotelrom \"\r\n + \"objektene.\\nOppretter ny liste for \"\r\n + \"hotelrommene.\\n\" + cnfe.getMessage(), \r\n \"Feilmelding\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(FileNotFoundException fnfe)\r\n {\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Finner ikke angitt fil.\\n\"\r\n + \"Oppretter ny liste for hotelrommene.\\n\" \r\n + fnfe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n catch(IOException ioe)\r\n\t{\r\n hotelRoomList = new HotelRoomList();\r\n JOptionPane.showMessageDialog(null, \"Fikk ikke lest fra filen.\\n\"\r\n + \"Oppretter ny liste for hotelrommene.\\n\"\r\n + ioe.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n }", "public static void main(String[] args) {\n String[] List = new String[50];\n\n System.out.println(\"Hello! Here is a list with the actions that you can do! \");\n Agenda m = new Agenda();\n\n //create an object to show printMenu method\n m.printMenu();\n\n System.out.println(\"Select an option:\");\n Scanner intrare=new Scanner(System.in);\n\n\n do {\n\n //Option takes the entered value\n int option= intrare.nextInt();\n\n switch (option){\n case 1: m.listWholeList();\n break;\n\n case 2: m.searchNameAndDisplay();\n break;\n\n case 3: m.createItem();\n break;\n\n case 4: m.updateName();\n break;\n\n case 5: m.deleteName();\n break;\n\n case 6: m.exitList();\n break;\n }\n\n\n }\n while (true);\n\n\n\n\n\n}", "public void load()\r\n {\r\n \tfc.setAcceptAllFileFilterUsed(false);\r\n\t\tfc.setDialogTitle(\"Select the text file representing your organism!\");\r\n\t\tfc.setFileFilter(new FileNameExtensionFilter(\"Text Files (Organism)\", new String[]{\"txt\"}));\r\n\t\tif(fc.showOpenDialog(this)==JFileChooser.APPROVE_OPTION)\r\n\t\t\t//Try-Catch Block\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tbr=new BufferedReader(new FileReader(fc.getSelectedFile()));\r\n\t\t\t\tArrayList<Organism> treeTemp=new ArrayList<Organism>();\r\n\t\t \tString line=br.readLine();\r\n\t\t \tint x=0;\r\n\t\t \twhile(line!=null)\r\n\t\t \t{\r\n\t\t \t\t\tString[] genesSt=line.split(\" \");\r\n\t\t \t\t\tint[] genes=new int[genesSt.length];\r\n\t\t \t\t\tfor(int y=0; y<genesSt.length; y++)\r\n\t\t \t\t\t\tgenes[y]=Integer.parseInt(genesSt[y]);\r\n\t\t \t\t\t\t\r\n\t\t \t\t\ttreeTemp.add(new Organism(genes,x));\r\n\t\t \t\tline=br.readLine();\r\n\t\t \t\tx++;\r\n\t\t \t}\r\n\t\t \tbr.close();\r\n\t\t \te.setTree(treeTemp);\r\n\t\t \te.setParent(treeTemp.get(treeTemp.size()-1));\r\n\t\t\t\trepaint();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception ex)\r\n\t\t\t{\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n }", "public void loadTodoItems() throws IOException {\n //todoItems zmenime na observableArraylist, aby sme mohli pouzit metodu setItems() v Controlleri\n todoItems = FXCollections.observableArrayList();\n //vytvorime cestu k nasmu suboru\n Path path = Paths.get(filename);\n //vytvorime bufferedReader na citanie suboru\n BufferedReader br = Files.newBufferedReader(path);\n\n String input;\n\n //pokial subor obsahuje riadky na citanie, vytvorime pole, do ktoreho ulozime rozsekany citany riadok, nastavime datum\n //vytvorime novy item pomocou dát z citaneho suboru a tento item ulozime do nasho listu.\n try {\n while ((input = br.readLine()) != null) {\n String[] itemPieces = input.split(\"\\t\");\n String shortDescription = itemPieces[0];\n String details = itemPieces[1];\n String dateString = itemPieces[2];\n\n LocalDate date = LocalDate.parse(dateString, formatter);\n\n TodoItem todoItem = new TodoItem(shortDescription, details, date);\n todoItems.add(todoItem);\n }\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }", "private void runMenu() {\n\n Runnable commandLineTask = () -> {\n\n // YOUR MENU CODE GOES HERE\n String selection;\n String filename = \"footage.txt\";\n\n do{\n printMenu();\n selection = scanner.nextLine();\n selection = selection.toUpperCase();\n switch(selection){\n case \"L\":\n //Load footage file\n System.out.println(\"Which file do you want to load from?\");\n filename = scanner.nextLine();\n try{\n footage.load(filename);\n }\n catch(IOException e){\n System.out.println(\"Loading file footage failed, no file called\" + filename);\n }\n break;\n case \"S\":\n //Save footage file\n try{\n footage.save(filename);\n }\n catch(IOException e){\n //It shouldn't actually get to this point as it will just create the file.\n System.out.println(\"Saving file footage failed, no file called\" + filename);\n }\n break;\n case \"SA\":\n //Save as footage file\n System.out.println(\"What to call new file? (Don't forget the .txt)\");\n filename = scanner.nextLine();\n try{\n footage.save(filename);\n }\n catch(IOException e){\n //It shouldn't actually get to this point as it will just create the file.\n System.out.println(\"Saving file footage failed, no file called\" + filename);\n }\n break;\n case \"A\":\n //Run footage animation\n try{\n createGrid(); //What I have found is that if I input an int to change the size of the grid it fails to run.\n runAnimation();\n }catch(IndexOutOfBoundsException e){\n System.out.println(\"Try loading something first!\");\n }\n break;\n case \"T\":\n //Stop footage animation\n terminateAnimation();\n break;\n case \"E\":\n //Edit current footage\n //Run using a method submenu\n editMenu();\n break;\n }\n }while(!selection.equals(\"Q\"));\n System.out.println(\"Do you want to save before you exit (y/n)\");\n selection = scanner.nextLine();\n if(selection == \"y\"){\n try {\n footage.save(filename);\n }catch(IOException e){}\n }\n Platform.exit();\n //Cause the application to finish here, after the menu's execution.\n exit(0);\n // At some point you will call createGrid.\n // Here's an example\n //createGrid();\n\n };\n Thread commandLineThread = new Thread(commandLineTask);\n // This is how we start the thread.\n // This causes the run method to execute.\n commandLineThread.start();\n\n // You can stop javafx with the command\n // Platform.exit();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_menu_of_restaurant, menu);\n return true;\n }", "public void readFromFile() {\n //reading text from file\n\n try {\n Scanner scanner = new Scanner(openFileInput(\"myTextFile.txt\"));\n\n while(scanner.hasNextLine()){\n\n String line = scanner.nextLine();\n\n String[] lines = line.split(\"\\t\");\n\n System.out.println(lines[0] + \" \" + lines[1]);\n\n toDoBean newTask = new toDoBean(lines[0], lines[1], 0);\n // System.out.println(line);\n sendList.add(newTask);\n\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}", "Chef(String name, Restaurant restaurant) {\n super(name, restaurant);\n numChefs++;\n setId(numChefs);\n restaurant.getStaffSystem().addChef(this);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_restaurants, menu);\r\n return true;\r\n }", "public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }", "public static void main(String[] args) throws Exception, IOException{\n\t\tString inname = \"欧巴欧巴韩国年糕火锅(天津 津南区咸水沽月坛商厦)\";\n\t\tString restname = inname.replace(\":\", \" \");\n\t\tFile folder = new File(\"sourcefile/data/serialization\");\n\t\tFile[] list = folder.listFiles();\n\t\tfor(File f: list){\n\t\t\tif(f.getName().contains(restname))\n\t\t\t{\n\t\t\t\trestaurant res = DeserializeRestaurant(f.getAbsolutePath());\n\t\t\t\tSystem.out.println(res.getName());\n\t\t\t\tSystem.out.println(res.getAveragePrice());\n\t\t\t\tSystem.out.println(res.getEnvironment());\n\t\t\t\tSystem.out.println(res.getFlavor());\n\t\t\t\tSystem.out.println(res.getService());\n\t\t\t\tSystem.out.println(res.getReview());\n\t\t\t\tSystem.out.println(res.getSummary());\n\t\t\t\tString ss = res.getReview() + res.getSummary();\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"电视\"));\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"安静\"));\n\t\t\t\tSystem.out.println(count_StringContain(ss, \"舒适\"));\n\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void loadFile(){\n returnValue = this.showOpenDialog(null);\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n selected = new File(this.getSelectedFile().getAbsolutePath());\n Bank.customer=(new CustomerFileReader(selected)).readCustomer();\n }\n }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "private List<LevelInformation> getLevelListToRun(String path, SubMenuAnimation<Task<Void>> subMenu)\n throws IOException {\n List<LevelSpecificationReader> levelSpecificationReaderList = new ArrayList<>();\n LevelSetReader levelSetReader = new LevelSetReader(Paths.get(path));\n levelSetReader.fromReader(new FileReader(path));\n Map<String, List<String>> levelSetMap = levelSetReader.getMapToAdd();\n List<String> keyStringList = new ArrayList<>();\n List<String> messageStringList = new ArrayList<>();\n List<String> pathStringList = new ArrayList<>();\n\n for (Map.Entry<String, List<String>> entry : levelSetMap.entrySet()) {\n levelSpecificationReaderList.add(new LevelSpecificationReader(\n Paths.get(entry.getValue().get(1))));\n\n keyStringList.add(entry.getKey() + \"\");\n messageStringList.add(\"Press (\" + entry.getKey() + \") for \" + entry.getValue().get(0) + \" Level\");\n pathStringList.add(entry.getValue().get(1));\n\n\n }\n int i = 0;\n for (LevelSpecificationReader lsr : levelSpecificationReaderList) {\n subMenu.addSelection(keyStringList.get(i),\n messageStringList.get(i)\n , new StartTask(this,\n levelSpecificationReaderList.get(i).fromReader(new FileReader(pathStringList.get(i)))));\n i++;\n }\n\n return new ArrayList<>();\n }", "private static void executeMenuItem(int choice) { // From Assignment2 Starter Code by Dave Houtman\r\n\t\tswitch (choice) {\r\n\t\t\tcase ADD_NEW_REGISTRANT:\t\tviewAddNewRegistrant();\t\tbreak;\r\n\t\t\tcase FIND_REGISTRANT:\t\t\tviewFindRegistrant();\t\tbreak;\r\n\t\t\tcase LIST_REGISTRANTS:\t\t\tviewListOfRegistrants();\tbreak;\r\n\t\t\tcase DELETE_REGISTRANT:\t\t\tviewDeleteRegistrant();\t\tbreak;\r\n\t\t\tcase ADD_NEW_PROPERTY:\t\t\tviewAddNewProperty();\t\tbreak;\r\n\t\t\tcase DELETE_PROPERTY:\t\t\tviewDeleteProperty();\t\tbreak;\r\n\t\t\tcase CHANGE_PROPERTY_REGISTRANT:viewChangePropertyRegistrant();\tbreak;\r\n\t\t\tcase LIST_PROPERTY_BY_REGNUM:\tviewListPropertyByRegNum();\tbreak;\r\n\t\t\tcase LIST_ALL_PROPERTIES:\t\tviewListAllProperties();\tbreak;\r\n\t\t\tcase LOAD_LAND_REGISTRY_FROM_BACKUP:\r\n\t\t\t// Check if the user wants to overwrite the existing data\r\n\t\t\t\tSystem.out.print(\"You are about to overwrite existing records;\"\r\n\t\t\t\t\t\t\t\t+ \"do you wish to continue? (Enter ‘Y’ to proceed.) \");\r\n\t\t\t\tString input = getResponseTo(\"\");\r\n\t\t\t\tif (input.equals(\"Y\") || input.equals(\"y\")) {\r\n\t\t\t\tviewLoadLandRegistryFromBackUp();\r\n\t\t\t\tSystem.out.println(\"Land Registry has been loaded from backup file\");\r\n\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\tcase SAVE_LAND_REGISTRY_TO_BACKUP:\t\r\n\t\t\t\tviewSaveLandRegistryToBackUp();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EXIT:\r\n\t\t\t\t// backup the land registry to file before closing the program\r\n\t\t\t\tSystem.out.println(\"Exiting Land Registry\\n\");\r\n\t\t\t\tgetRegControl().saveToFile(getRegControl().listOfRegistrants(), REGISTRANTS_FILE);\r\n\t\t\t\tgetRegControl().saveToFile(getRegControl().listOfAllProperties(), PROPERTIES_FILE);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\"Invalid choice: try again. (Select \" + EXIT + \" to exit.)\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(); // add blank line after each output\r\n\t}", "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\r\n Ingredient ingredient=new Ingredient();\r\n\r\n Food pasta=new Pasta();\r\n String pastaItems=ingredient.getPastaItems();\r\n pasta.prepareFood(pastaItems);\r\n System.out.println(pasta.deliverFood());\r\n\r\n\r\n System.out.println(\"------------FACADE---------------\");\r\n\r\n System.out.println(Waiter.deliveryFood(FoodType.PASTA));\r\n\r\n\r\n\r\n\r\n\r\n\r\n }", "public void readStaffEntry()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner reader = new Scanner(new FileReader(\"StaffEntryRecords.txt\"));\r\n\t\t\twhile (reader.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(reader.nextLine());\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"FileNotFoundException\");\r\n\t\t}\r\n\t}", "public void showMenu(){\n\t\tSystem.out.println(\"******************************************************\");\n\t\tSystem.out.println(\"************Welcome to the holding program************\");\n\t\tSystem.out.println(\"******************************************************\");\n\t\tint option = -1;\n\t\twhile(option != 0){\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"***************Please, select an option***************\");\n\t\t\tSystem.out.println(\"******************************************************\");\n\t\t\tSystem.out.println(\"0. To exit of the program\");\n\t\t\tSystem.out.println(\"1. To add a public service company\");\n\t\t\tSystem.out.println(\"2. To add an university company\");\n\t\t\tSystem.out.println(\"3. To add a high school company\");\n\t\t\tSystem.out.println(\"4. To add a technological company\");\n\t\t\tSystem.out.println(\"5. To add a food company\");\n\t\t\tSystem.out.println(\"6. To add a medicine company\");\n\t\t\tSystem.out.println(\"7. Show the information of the holding\");\n\t\t\tSystem.out.println(\"8. Register a poll\");\n\t\t\tSystem.out.println(\"9. To add a employee\");\n\t\t\tSystem.out.println(\"10. Find the extension of a employee\");\n\t\t\tSystem.out.println(\"11. Find the mails of all the employees that are occupied a position\");\n\t\t\tSystem.out.println(\"12. To add a product\");\n\t\t\toption = reader.nextInt();\n\t\t\treader.nextLine();\n\t\t\tswitch(option){\n\t\t\t\tcase 0:\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tpublicService();\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tuniversity();\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\thighSchool();\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\ttechnological();\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\tfood();\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\tmedicine();\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\tSystem.out.println(theHolding.wholeInformation());\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\tregisterPoll();\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\taddEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\textensionEmployee();\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\tmailsPosition();\n\t\t\t\tbreak;\n\t\t\t\tcase 12:\n\t\t\t\taddProduct();\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Select a correct option\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n RecipeBox myRecipeBox = new RecipeBox();\r\n Scanner menuScnr = new Scanner(System.in);\r\n //request user to enter their selection\r\n System.out.println(\"Menu\\n\" + \"1. Add Recipe\\n\" + \"2. Print All Recipe Details\\n\" + \"3. Print All Recipe Names\\n\" \r\n + \"4. Print Adjusted Recipe Amount\\n\" + \"\\nPlease select a menu item:\");\r\n \r\n //a while loop that accepts integers, executes based upon input, and returns to the menu\r\n while (menuScnr.hasNextInt() || menuScnr.hasNextLine()) {\r\n System.out.println(\"Menu\\n\" + \"1. Add Recipe\\n\" + \"2. Print All Recipe Details\\n\" + \"3. Print All Recipe Names\\n\" \r\n + \"4. Print Adjusted Recipe Amount\\n\" + \"\\nPlease select a menu item:\");\r\n int input = menuScnr.nextInt();\r\n System.out.println(input);\r\n // selecting 1 creates new recipe using the myRecipeBox object and addNewRecipe method\r\n if (input == 1) {\r\n myRecipeBox.addNewRecipe();\r\n // selecting 2 uses the printAllRecipeDetails to print the details of the Recipe name entered\r\n } else if (input == 2) {\r\n System.out.println(\"Which recipe?\\n\");\r\n menuScnr.nextLine();\r\n String selectedRecipeName = menuScnr.nextLine();\r\n myRecipeBox.printAllRecipeDetails(selectedRecipeName);\r\n // selecting 3 prints the list of recipe names by iterating through and printing each\r\n } else if (input == 3) {\r\n for (int j = 0; j < myRecipeBox.listOfRecipes.size(); j++) {\r\n System.out.println((j + 1) + \": \" + myRecipeBox.listOfRecipes.get(j).getRecipeName());\r\n }\r\n // selecting 4 uses findRecipeDetails to scale the recipe indicated by the user\r\n } else if (input == 4) {\r\n System.out.println(\"Which recipe?\\n\");\r\n menuScnr.nextLine();\r\n String recipeName = menuScnr.nextLine();\r\n myRecipeBox.findRecipeDetails(recipeName);\r\n // all other input returns to the menu\r\n } else {\r\n System.out.println(\"Menu\\n\" + \"1. Add Recipe\\n\" + \"2. Print All Recipe Details\\n\" + \"3. Print All Recipe Names\\n\" \r\n + \"4. Print Adjusted Recipe Amount\\n\" + \"\\nPlease select a menu item:\");\r\n }\r\n //after selecting and exicuting a choice, this returns the user to the menu\r\n System.out.println(\"Menu\\n\" + \"1. Add Recipe\\n\" + \"2. Print All Recipe Details\\n\" + \"3. Print All Recipe Names\\n\" \r\n + \"4. Print Adjusted Recipe Amount\\n\" + \"\\nPlease select a menu item:\");\r\n\r\n }\r\n }", "@Override\n\t\tpublic void openMenu() {\n\t\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.retrieve, menu);\n\t\treturn true;\n\t}", "public void getMenuItems(){ \n\t\tParseUser user = ParseUser.getCurrentUser();\n\t\tmenu = user.getParseObject(\"menu\");\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"Item\");\n\t\tquery.whereEqualTo(\"menu\", menu);\n\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(List<ParseObject> menuItems, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tlistMenuItems(menuItems);\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public LoadRestItem(int fno,String fname,int masterno,String mastername,int itemCode,String itemName,double dUnitPrice,double dTaxPrice,\n int dtaxClass,double mUnitPrice,double mTaxPrice,int mTaxClass,int currencyId,int subMenu){\n this.familyNno = fno;\n this.familyName = fname;\n this.masterNo = masterno;\n this.masterName = mastername;\n this.itemCode = itemCode;\n this.itemName = itemName;\n this.dUnitPrice = dUnitPrice;\n this.dTaxPrice = dTaxPrice;\n this.dtaxClass = dtaxClass;\n this.mUnitPrice = mUnitPrice;\n this.mTaxPrice = mTaxPrice;\n this.mTaxClass = mTaxClass; \n this.currencyId = currencyId;\n this.subMenu = subMenu;\n }" ]
[ "0.6920002", "0.6336298", "0.5871181", "0.58560205", "0.58134294", "0.57740366", "0.5745183", "0.57275355", "0.572225", "0.5677413", "0.56681305", "0.560472", "0.5599045", "0.55528665", "0.5549766", "0.5549113", "0.5514847", "0.54795206", "0.54695225", "0.5450709", "0.5410512", "0.5410462", "0.54081994", "0.53517824", "0.5351574", "0.5347428", "0.5328141", "0.5322957", "0.5319384", "0.5319262", "0.53124493", "0.5308273", "0.52903706", "0.5288311", "0.5283777", "0.52800447", "0.5275443", "0.525331", "0.5248111", "0.5241337", "0.5235796", "0.5234687", "0.5234601", "0.52332044", "0.52299523", "0.5225534", "0.5215705", "0.51921034", "0.5171513", "0.5168328", "0.5164811", "0.51484495", "0.5144183", "0.51090544", "0.51045907", "0.508365", "0.5055542", "0.50494534", "0.5039206", "0.5035579", "0.50271755", "0.502083", "0.50122374", "0.50057477", "0.5003647", "0.50002706", "0.4999747", "0.49969557", "0.4996785", "0.4989152", "0.49785706", "0.49735376", "0.49701348", "0.49671522", "0.49526018", "0.49505094", "0.4949971", "0.49495345", "0.4948034", "0.49475947", "0.49452698", "0.49445733", "0.49420443", "0.49415427", "0.4941043", "0.49383998", "0.49383274", "0.4934928", "0.49264398", "0.49248362", "0.49238616", "0.4922996", "0.49226716", "0.4919985", "0.49185088", "0.49178514", "0.49158084", "0.49106", "0.49095792", "0.490812" ]
0.70703363
0
Makes call to SatisfactionAnalyzer to find the max satisfaction value.
public Integer findMaxSatisfaction(Integer timelimit) { return satisfactionAnalyzer.findMaxSatisfaction(timelimit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getMaximumResults();", "public int getResult() {\n return this.max;\n }", "int max();", "int getMaximum();", "public int GetMaxVal();", "public int findMax(){\n return nilaiMaks(this.root);\n }", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "protected final int getMax() {\n\treturn(this.max);\n }", "public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}", "int getMax();", "private RolapCalculation getAbsoluteMaxSolveOrder() {\n // Find member with the highest solve order.\n RolapCalculation maxSolveMember = calculations[0];\n for (int i = 1; i < calculationCount; i++) {\n RolapCalculation member = calculations[i];\n if (expandsBefore(member, maxSolveMember)) {\n maxSolveMember = member;\n }\n }\n return maxSolveMember;\n }", "public abstract int getMaximumValue();", "public int getMax()\n {\n return 0;\n }", "double getMax();", "double getMax();", "public double getMaximum() {\n return (max);\n }", "String getMax_res();", "E maxVal();", "public int getSumaMax() {\r\n\t\treturn sumaMax;\r\n\t}", "public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }", "public Integer getMax() {\n\t\t\tif (hotMinMax) {\n\t\t\t\tConfigValue rawMinMax = new ConfigValue();\n\t\t\t\ttry {\n\t\t\t\t\trawSrv.getCfgMinMax(name, rawMinMax);\n\t\t\t\t\t// TODO: FIX HERE\n\t\t\t\t\treturn 100;\n\t\t\t\t} catch (TVMException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn new Integer(max);\n\t\t\t}\n\t\t\t// ....\n\t\t\treturn 100;\n\t\t}", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "public int getMaximum() {\r\n return max;\r\n }", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public double getMaximumValue() { return this.maximumValue; }", "public double getAchievedMarksMax(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .max()\n .orElse(0);\n }", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "public int getMaxAmount() {\n return _max;\n }", "public float getMaxMana()\n {\n return maxMana;\n }", "public double getMaxValue() {\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value > max)\n\t\t\t\tmax = value;\n\t\t}\n\t\treturn max;\n\t}", "public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }", "public int getMaxDefense() {\n\t\treturn maxDefense;\n\t}", "Double getMaximumValue();", "public int max() {\n\t\treturn 0;\n\t}", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "private double getMax() {\n return Collections.max(values.values());\n }", "public AnyType findMax() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMax(root).element;\r\n\t}", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "int askForTempMax();", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "public int getMax()\n\t{\n\t\treturn max;\n\t}", "protected IExpressionValue max()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MAX FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2>ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,true);\r\n\t\t\r\n\t}", "public float getMax()\n {\n parse_text();\n return max;\n }", "public float getHighestFitness() {\r\n\t\treturn highestScore;\r\n\t}", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public int getMaxFans()\n {\n\treturn maxFans;\n }", "public BigInteger getMaxUses() {\r\n return maxUses;\r\n }", "public int getMax() {\n\t\treturn max;\n\t}", "public int getMax() {\n\t\treturn max;\n\t}", "protected int getHighestInnovation() {\n\t\treturn highest;\n\t}", "public int getMaximum() {\n return this.iMaximum;\n }", "public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }", "public synchronized int getMax() {\r\n\t\treturn mMax;\r\n\t}", "int getMaxMana();", "public int getMax(){\n return tab[rangMax()];\n }", "public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }", "public float getMaximumFloat() {\n/* 266 */ return (float)this.max;\n/* */ }", "int getMax( int max );", "public int getMaxScore() {\r\n return maxScore;\r\n\t}", "public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }", "public long getMax() {\n return m_Max;\n }", "public float getMax() {\n/* 3085 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public int getMaximum() {\n \tcheckWidget();\n \treturn maximum;\n }", "public double getMaxRating() {\n return max;\n }", "public int getMaxAmount() {\n return maxAmount;\n }", "public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }", "public String findMax(String[] vals)\r\n\t{\r\n\t\treturn \"nothing yet\";\r\n\t}", "public int getBestValue() {\n return bestValue;\n }", "public Integer getMaxResults() {\n return maxResults;\n }", "private static void solve() {\n\t\tList<Integer> rgtMax= new ArrayList<>();\n\t\tList<Integer> lftMax= new ArrayList<>();\n\t\t\n\t\tpopulateRgtMax(rgtMax);\n\t\tpopulateLftMax(lftMax);\n\t\t\t\t\n\t\tint area=findMaxArea(lftMax,rgtMax);\n\t\tSystem.out.println(area);\n\t\t\n\t}", "public int getMaxValue() {\n return maxValue;\n }", "public ArrayList<Configuration> choixMax()\r\n\t{\r\n\t\tArrayList<Configuration> Filles=ConfigurationsFilles();\r\n\t\tArrayList<Configuration> FillesMax = new ArrayList<>();\r\n\t\tif(Filles==null) return null;\r\n\t\tint max = Filles.get(0).maxscore;\r\n\t\tfor(Configuration c : Filles)\r\n\t\t{\r\n\t\t\tif(max == c.maxscore)\r\n\t\t\t{\r\n\t\t\t\tFillesMax.add(c);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FillesMax;\r\n\t}", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "public Double getMaximum() {\n\t\treturn maximum;\n\t}", "@Override\n\tpublic Food NnmMax() {\n\t\treturn fb.NnmMax();\n\t}", "public float getSalinityMax() {\n return salinityMax;\n }", "public void SetMaxVal(int max_val);", "public int getMaxValue(){\n\t\treturn maxValue;\n\t}", "public double getMaxVal() {\n return maxVal;\n }", "int getMaxResults();", "public int setSilicateMax(Float silicateMax) {\n try {\n setSilicateMax(silicateMax.floatValue());\n } catch (Exception e) {\n setSilicateMaxError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMaxError;\n }", "public Integer max() {\n return this.max;\n }", "public final double getMax() {\r\n\t\treturn this.m_max;\r\n\t}", "public void setSumaMax(int sumaMax) {\r\n\t\tthis.sumaMax = sumaMax;\r\n\t}", "int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}", "public float getSilicateMax() {\n return silicateMax;\n }", "public double max() {\n return max(0.0);\n }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "public int getMaxIntValue();", "public int getMax() {\n\t\treturn mMax;\n\t}", "public int findHighestScore() {\n int highest = 0;\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) > 0) {\n highest = (int) allQuizTakers.get(i).getScore(0);\n }\n\n }\n return highest;\n }", "public T max();", "public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }" ]
[ "0.6380199", "0.6329474", "0.6315256", "0.6301898", "0.6294271", "0.62633663", "0.62141025", "0.61949307", "0.6193887", "0.61915654", "0.61902994", "0.6186875", "0.617815", "0.61561656", "0.6152692", "0.6152692", "0.61443985", "0.6137297", "0.611838", "0.61055994", "0.609445", "0.608127", "0.6059723", "0.60552883", "0.60536695", "0.60530853", "0.6046024", "0.6036754", "0.601724", "0.6009553", "0.5998732", "0.59782", "0.59765494", "0.5972405", "0.59648687", "0.5955261", "0.5946906", "0.5942011", "0.59401625", "0.59308577", "0.59188366", "0.5917594", "0.5917594", "0.5917594", "0.59126", "0.58993", "0.5875442", "0.587421", "0.5866609", "0.58553094", "0.58489466", "0.5848001", "0.5846663", "0.5843561", "0.5843561", "0.58383197", "0.5808224", "0.5807204", "0.5805233", "0.57987154", "0.5797279", "0.57936484", "0.5792847", "0.57900983", "0.5789623", "0.57826114", "0.5781705", "0.5766672", "0.5766137", "0.5757406", "0.5746876", "0.5743957", "0.57342684", "0.57328284", "0.5729557", "0.5725936", "0.57166004", "0.5716044", "0.5715189", "0.57119507", "0.5711203", "0.57101804", "0.57074356", "0.57039785", "0.57032084", "0.5691927", "0.56888634", "0.5683548", "0.5680801", "0.5675622", "0.5671288", "0.56710184", "0.56702447", "0.56687593", "0.5668126", "0.56641924", "0.566281", "0.5660804", "0.56545925", "0.56404734" ]
0.72205174
0
TODO Autogenerated method stub cut rope to maximize product look why we need not made call for (f5 f6)
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int no = sc.nextInt(); System.out.println(maxproduct(no)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF7() {\n\t\t\r\n\t}", "static void feladat6() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void doF3() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "static void feladat4() {\n\t}", "public void mo7206b() {\n this.f2975f.mo7325a();\n }", "static void feladat5() {\n\t}", "static void feladat7() {\n\t}", "private void m50366E() {\n }", "protected void mo6255a() {\n }", "public void mo4359a() {\n }", "public void mo42331g() {\n mo42335f();\n }", "private void level7() {\n }", "public void mo21781F() {\n }", "public final void mo8775b() {\n }", "static void feladat9() {\n\t}", "void mo21075f();", "private void level6() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void skystonePos6() {\n }", "private final void step6()\n\t { j = k;\n\t if (b[k] == 'e')\n\t { int a = m();\n\t if (a > 1 || a == 1 && !cvc(k-1)) k--;\n\t }\n\t if (b[k] == 'l' && doublec(k) && m() > 1) k--;\n\t }", "private void mo3747b() {\n this.f1427B.add(this.f1490s);\n this.f1427B.add(this.f1491t);\n this.f1427B.add(this.f1492u);\n this.f1427B.add(this.f1493v);\n this.f1427B.add(this.f1495x);\n this.f1427B.add(this.f1496y);\n this.f1427B.add(this.f1497z);\n this.f1427B.add(this.f1494w);\n }", "private void m76766d() {\n m76765c();\n this.f61649f += this.f61648e;\n if (this.f61649f > this.f61647d) {\n this.f61649f = this.f61647d;\n }\n m76768f();\n }", "@Override\r\n\tprotected void doF9() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tprotected void doF2() {\n\t\t\r\n\t}", "public void mo1406f() {\n }", "private void m3611b() {\r\n this.f4269y.clear();\r\n for (Object add : C1194i.f5603g) {\r\n this.f4269y.add(add);\r\n }\r\n }", "public void mo10714f() {\n if (!this.f10687i) {\n this.f10687i = true;\n this.f10685g.mo10714f();\n }\n }", "static void feladat3() {\n\t}", "public void mo1290f() {\n int size = this.f2112j.size();\n while (true) {\n size--;\n if (size < 0) {\n break;\n }\n C0467b bVar = this.f2112j.get(size);\n View view = bVar.f2127a.f996a;\n view.setTranslationY(0.0f);\n view.setTranslationX(0.0f);\n mo1287c(bVar.f2127a);\n this.f2112j.remove(size);\n }\n int size2 = this.f2110h.size();\n while (true) {\n size2--;\n if (size2 < 0) {\n break;\n }\n mo1287c(this.f2110h.get(size2));\n this.f2110h.remove(size2);\n }\n int size3 = this.f2111i.size();\n while (true) {\n size3--;\n if (size3 < 0) {\n break;\n }\n RecyclerView.C0145a0 a0Var = this.f2111i.get(size3);\n a0Var.f996a.setAlpha(1.0f);\n mo1287c(a0Var);\n this.f2111i.remove(size3);\n }\n int size4 = this.f2113k.size();\n while (true) {\n size4--;\n if (size4 < 0) {\n break;\n }\n C0466a aVar = this.f2113k.get(size4);\n RecyclerView.C0145a0 a0Var2 = aVar.f2121a;\n if (a0Var2 != null) {\n mo2786m(aVar, a0Var2);\n }\n RecyclerView.C0145a0 a0Var3 = aVar.f2122b;\n if (a0Var3 != null) {\n mo2786m(aVar, a0Var3);\n }\n }\n this.f2113k.clear();\n if (mo1291g()) {\n int size5 = this.f2115m.size();\n while (true) {\n size5--;\n if (size5 < 0) {\n break;\n }\n ArrayList arrayList = this.f2115m.get(size5);\n int size6 = arrayList.size();\n while (true) {\n size6--;\n if (size6 >= 0) {\n C0467b bVar2 = (C0467b) arrayList.get(size6);\n View view2 = bVar2.f2127a.f996a;\n view2.setTranslationY(0.0f);\n view2.setTranslationX(0.0f);\n mo1287c(bVar2.f2127a);\n arrayList.remove(size6);\n if (arrayList.isEmpty()) {\n this.f2115m.remove(arrayList);\n }\n }\n }\n }\n int size7 = this.f2114l.size();\n while (true) {\n size7--;\n if (size7 < 0) {\n break;\n }\n ArrayList arrayList2 = this.f2114l.get(size7);\n int size8 = arrayList2.size();\n while (true) {\n size8--;\n if (size8 >= 0) {\n RecyclerView.C0145a0 a0Var4 = (RecyclerView.C0145a0) arrayList2.get(size8);\n a0Var4.f996a.setAlpha(1.0f);\n mo1287c(a0Var4);\n arrayList2.remove(size8);\n if (arrayList2.isEmpty()) {\n this.f2114l.remove(arrayList2);\n }\n }\n }\n }\n int size9 = this.f2116n.size();\n while (true) {\n size9--;\n if (size9 >= 0) {\n ArrayList arrayList3 = this.f2116n.get(size9);\n int size10 = arrayList3.size();\n while (true) {\n size10--;\n if (size10 >= 0) {\n C0466a aVar2 = (C0466a) arrayList3.get(size10);\n RecyclerView.C0145a0 a0Var5 = aVar2.f2121a;\n if (a0Var5 != null) {\n mo2786m(aVar2, a0Var5);\n }\n RecyclerView.C0145a0 a0Var6 = aVar2.f2122b;\n if (a0Var6 != null) {\n mo2786m(aVar2, a0Var6);\n }\n if (arrayList3.isEmpty()) {\n this.f2116n.remove(arrayList3);\n }\n }\n }\n } else {\n mo2783j(this.f2119q);\n mo2783j(this.f2118p);\n mo2783j(this.f2117o);\n mo2783j(this.f2120r);\n mo1288d();\n return;\n }\n }\n }\n }", "private final void m707c() {\n this.f538w = false;\n ajf ajf = this.f528m;\n ajf.f448f = true;\n ajf.f443a.mo2107a();\n for (akx e : this.f535t) {\n e.mo357e();\n }\n }", "public void m3288a() {\n mo855a(this.f2272b);\n }", "private void m106723d() {\n if (this.f86018e != null) {\n this.f86018e.mo7085f();\n }\n C23487o.m77150b(this.f86017d, 8);\n }", "public void mo3771F() {\n ConstraintWidget l = mo3820l();\n if (l == null || !(l instanceof ConstraintWidgetContainer) || !((ConstraintWidgetContainer) mo3820l()).mo3853S()) {\n int size = this.f1427B.size();\n for (int i = 0; i < size; i++) {\n this.f1427B.get(i).mo3763i();\n }\n }\n }", "public void mo55177a() {\n C3496e5.m699h().mo55344a(C3633q.this.f1485a);\n }", "static void feladat8() {\n\t}", "public void mo21890a() {\n mo21891a(this.f24566d);\n }", "protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }", "private void m27469e() {\n int i;\n int i2 = this.f25262I * this.f25259F;\n if (this.f25281ae) {\n i = Integer.MIN_VALUE;\n } else {\n i = ((-this.f25259F) * (this.f25301p.size() - 1)) + i2;\n }\n this.f25264K = i;\n if (this.f25281ae) {\n i2 = Integer.MAX_VALUE;\n }\n this.f25265L = i2;\n }", "private void m76767e() {\n m76765c();\n this.f61649f -= this.f61648e;\n if (this.f61649f < 0) {\n this.f61649f = 0;\n }\n m76768f();\n }", "public void mo3376r() {\n }", "public void mo4361Y() {\n this.f3169c = -1;\n }", "public void mo8483f() {\n mo8472a((List<C1070b>) this.f3532b);\n mo8472a((List<C1070b>) this.f3533c);\n this.f3538h = 0;\n }", "public void m23075a() {\n }", "public void mo3370l() {\n }", "protected void o()\r\n/* 156: */ {\r\n/* 157:179 */ int i = 15 - aib.b(this);\r\n/* 158:180 */ float f = 0.98F + i * 0.001F;\r\n/* 159: */ \r\n/* 160:182 */ this.xVelocity *= f;\r\n/* 161:183 */ this.yVelocity *= 0.0D;\r\n/* 162:184 */ this.zVelocity *= f;\r\n/* 163: */ }", "private void m20210g() {\n C8466a aVar = this.f18650f;\n if (aVar != null && this.f18666v > 0) {\n aVar.mo25957a(this.f18645a.mo25936a(), this.f18666v);\n this.f18666v = 0;\n }\n }", "private void kk12() {\n\n\t}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "final void mo6078b() {\n if (this.f2346p == null) {\n C0926z c0926z = this.f2341d == Integer.class ? f2331i : this.f2341d == Float.class ? f2332j : null;\n this.f2346p = c0926z;\n }\n if (this.f2346p != null) {\n this.f2342e.f2296f = this.f2346p;\n }\n }", "private final void m577c() {\n this.f1236i.mo44145a().execute(new C2965g(this));\n this.f1238k = true;\n }", "public void mo12628c() {\n }", "private static void m106725f() {\n C32960dc.m106543k(false);\n }", "private void m25426f() {\n C0396d.m1465a(this.f19104f).m1469a(this.f19111m, this.f19111m.m6587a());\n }", "protected float method_4216() {\r\n return 5.0F;\r\n }", "private void m6590G() {\n if (!this.f5429m) {\n m6589F();\n }\n }", "public void redibujarAlgoformers() {\n\t\t\n\t}", "public final void mo5384q() {\n if (this.f9712e) {\n this.f9712e = false;\n this.f9713f = 0;\n RecyclerView recyclerView = this.f9709b;\n if (recyclerView != null) {\n recyclerView.f1041a.mo5397b();\n }\n }\n }", "public void func_70305_f() {}", "public int F()\r\n/* 24: */ {\r\n/* 25: 39 */ return aqt.a(0.5D, 1.0D);\r\n/* 26: */ }", "private final void m718m() {\n boolean z;\n akl akl = this.f531p.f603f;\n if (this.f539x) {\n z = true;\n } else {\n z = akl != null && akl.f577a.mo1491f();\n }\n akp akp = this.f533r;\n if (z != akp.f617g) {\n this.f533r = new akp(akp.f611a, akp.f612b, akp.f613c, akp.f614d, akp.f615e, akp.f616f, z, akp.f618h, akp.f619i, akp.f620j, akp.f621k, akp.f622l, akp.f623m);\n }\n }", "private void arretes_fW(){\n\t\tthis.cube[4] = this.cube[1]; \n\t\tthis.cube[1] = this.cube[3];\n\t\tthis.cube[3] = this.cube[7];\n\t\tthis.cube[7] = this.cube[5];\n\t\tthis.cube[5] = this.cube[4];\n\t}", "private void m76768f() {\n m76770h();\n m76769g();\n }", "public void mo4348a() {\n int i;\n if (this.f3149d) {\n i = this.f3146a.mo5112b();\n } else {\n i = this.f3146a.mo5120f();\n }\n this.f3148c = i;\n }", "protected float l()\r\n/* 72: */ {\r\n/* 73: 84 */ return 0.0F;\r\n/* 74: */ }", "public void mo3946e() {\n if (this.f19003f != null) {\n this.f19003f.m6643b();\n }\n }", "public void mo12746c() {\n float f = this.f13706a;\n float f2 = this.f13708c;\n if (f == f2) {\n this.f13718m = this.f13710e.itemView.getTranslationX();\n } else if (this.f13712g != null) {\n this.f13718m = f + (this.f13722q * (f2 - f));\n } else {\n this.f13718m = this.f13714i.mo3670a();\n }\n float f3 = this.f13707b;\n float f4 = this.f13709d;\n if (f3 == f4) {\n this.f13719n = this.f13710e.itemView.getTranslationY();\n } else if (this.f13712g != null) {\n this.f13719n = f3 + (this.f13722q * (f4 - f3));\n } else {\n this.f13719n = this.f13715j.mo3670a();\n }\n }", "public void mo6081a() {\n }", "public void mo21779D() {\n }", "public void mo21792Q() {\n }", "public void mo9848a() {\n }", "private void m7223b(float f) {\n int[] h = m7232h();\n float max = Math.max((float) h[0], Math.min((float) h[1], f));\n if (Math.abs(((float) this.f5589i) - max) >= 2.0f) {\n int a = m7217a(this.f5590j, max, h, this.f5601w.computeHorizontalScrollRange(), this.f5601w.computeHorizontalScrollOffset(), this.f5599u);\n if (a != 0) {\n this.f5601w.scrollBy(a, 0);\n }\n this.f5590j = max;\n }\n }", "public void mo3724f() {\n this.f1902b.mo3743a();\n }", "public void mo21787L() {\n }", "public void method_2451(ahb var1, int var2, int var3, int var4, class_1343 var5, List var6, class_689 var7) {\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n super.method_2451(var1, var2, var3, var4, var5, var6, var7);\r\n }", "public void mo1531a() {\n }", "public void mo37873b() {\n C13262e eVar = C13262e.this;\n eVar.f34192f.mo38031a(eVar);\n }", "public final void mo1285b() {\n }", "@Override\n public void toogleFold() {\n }", "public void skystonePos4() {\n }", "public void mo12930a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void skystonePos5() {\n }", "public void mo21825b() {\n }", "private void arretes_fG(){\n\t\tthis.cube[31] = this.cube[28]; \n\t\tthis.cube[28] = this.cube[30];\n\t\tthis.cube[30] = this.cube[34];\n\t\tthis.cube[34] = this.cube[32];\n\t\tthis.cube[32] = this.cube[31];\n\t}", "private void m20467b() {\n C6502h.CamembertauCalvados unused = this.f16562a.f16549f;\n C6502h a = C6502h.CamembertauCalvados.m21397a(this.f16563b);\n a.mo35508e(this.f16564c);\n Machecoulais.m20446b(this.f16562a.f16546c, a);\n this.f16562a.m20436a(this.f16563b, a);\n }", "public void mo35052a() {\n this.f30707l = true;\n }", "private void m7218a(float f) {\n int[] g = m7231g();\n float max = Math.max((float) g[0], Math.min((float) g[1], f));\n if (Math.abs(((float) this.f5586f) - max) >= 2.0f) {\n int a = m7217a(this.f5587g, max, g, this.f5601w.computeVerticalScrollRange(), this.f5601w.computeVerticalScrollOffset(), this.f5600v);\n if (a != 0) {\n this.f5601w.scrollBy(0, a);\n }\n this.f5587g = max;\n }\n }" ]
[ "0.7250335", "0.6826835", "0.6797232", "0.65713817", "0.6542468", "0.65268415", "0.63988996", "0.63874704", "0.6345174", "0.6331426", "0.6324528", "0.6321203", "0.62705404", "0.6269154", "0.61369395", "0.6126611", "0.6114025", "0.61106783", "0.6089711", "0.60814553", "0.6069396", "0.6067174", "0.6061323", "0.60579854", "0.6050042", "0.604248", "0.60387224", "0.6030508", "0.60178494", "0.60118437", "0.60112906", "0.6008301", "0.6006572", "0.599463", "0.5992479", "0.5974593", "0.5969285", "0.59645474", "0.5956469", "0.5951096", "0.5942581", "0.59244555", "0.5916525", "0.5912161", "0.5906283", "0.58994347", "0.58989877", "0.589697", "0.58806026", "0.58774245", "0.5851641", "0.58396804", "0.5825824", "0.58228606", "0.5821356", "0.5820456", "0.5819006", "0.58168596", "0.5815694", "0.5810239", "0.5808751", "0.5805749", "0.5805029", "0.5798424", "0.5792254", "0.57841855", "0.57830435", "0.57763517", "0.57762736", "0.5774688", "0.57656366", "0.57632506", "0.5762795", "0.57566994", "0.5756011", "0.57541615", "0.57524484", "0.57509565", "0.5745761", "0.57451475", "0.5742746", "0.57408404", "0.5737374", "0.57353026", "0.5730848", "0.572913", "0.57282454", "0.5727161", "0.5727161", "0.5727161", "0.5727161", "0.5727161", "0.5727161", "0.5727161", "0.5726606", "0.57240653", "0.571836", "0.5702934", "0.5701232", "0.56977177", "0.56964374" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, 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 getMenuInflater().inflate(R.menu.menu, 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_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.home_action_bar, 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 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\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 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}", "@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 }", "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\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\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\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }" ]
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644464", "0.68644464", "0.68644464", "0.6855815", "0.68494046", "0.68220186", "0.68183845", "0.68154365", "0.6815009", "0.6815009", "0.68082577", "0.6802161", "0.68002385", "0.67936224", "0.67918605", "0.679087", "0.67849934", "0.6760954", "0.67599845", "0.67507833", "0.67461413", "0.67461413", "0.67431796", "0.67413616", "0.6728648", "0.672732", "0.67251813", "0.67251813", "0.67232496", "0.67152804", "0.67092025", "0.67071015", "0.6702423", "0.6701286", "0.66991764", "0.66969806", "0.66888016", "0.66863585", "0.6686101", "0.6686101", "0.66828436", "0.6681769", "0.6679519", "0.6671908", "0.66700244", "0.6665301", "0.66587126", "0.66587126", "0.66587126", "0.6658098", "0.66570866", "0.66570866", "0.66570866", "0.665458", "0.66533303", "0.66528934", "0.66513336", "0.66495234", "0.66490155", "0.6648172", "0.6648159", "0.6647816", "0.6647625", "0.6645882", "0.66453695", "0.66441536", "0.66413796", "0.66374624", "0.66360414", "0.6635178", "0.66346484", "0.66346484", "0.66346484", "0.6632149", "0.66308904", "0.66287386", "0.66283447", "0.6627003", "0.6624185", "0.6621111", "0.662078" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n 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 // 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 int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n 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.7904231", "0.78061396", "0.7767007", "0.77273244", "0.76318634", "0.7621818", "0.7585249", "0.7531511", "0.7488678", "0.74574006", "0.74574006", "0.7439257", "0.7421747", "0.7403457", "0.73920685", "0.7387285", "0.7379893", "0.73710734", "0.7363068", "0.73565257", "0.7346117", "0.73421544", "0.73308754", "0.7328614", "0.7326444", "0.73191214", "0.7316894", "0.73141056", "0.7304816", "0.7304816", "0.73023325", "0.7298775", "0.7294159", "0.72872293", "0.7283658", "0.72814363", "0.72793216", "0.72604835", "0.72604835", "0.72604835", "0.72604495", "0.7260065", "0.72506464", "0.7223512", "0.7220288", "0.721808", "0.7204778", "0.72007537", "0.7199708", "0.7193875", "0.7185878", "0.7178243", "0.7169468", "0.7168278", "0.71544755", "0.7154114", "0.71363086", "0.7135266", "0.7135266", "0.7129425", "0.71291506", "0.712514", "0.71239674", "0.7123848", "0.71223545", "0.7118021", "0.7117761", "0.7117381", "0.7117381", "0.7117381", "0.7117381", "0.7117378", "0.71157014", "0.7112743", "0.71105623", "0.710936", "0.7106081", "0.7100549", "0.7099009", "0.70957214", "0.7094029", "0.7094029", "0.7086948", "0.70828027", "0.70810676", "0.7080609", "0.707419", "0.70687926", "0.7062512", "0.70614976", "0.70604354", "0.7051683", "0.7037832", "0.7037832", "0.7036669", "0.70357877", "0.70357877", "0.7033191", "0.7030764", "0.70303047", "0.70192975" ]
0.0
-1
Urls contain mutable parts (parameter 'sessionToken') and stable video's id (parameter 'videoId'). e. g. "
@Override public String generate(String url) { int startIndex = url.lastIndexOf("/"); int endIndex = url.indexOf(".mp4"); try { return url.substring(startIndex, endIndex) + ".temp"; } catch (Exception e) { e.printStackTrace(); return url + ".temp"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVideoUrl() {\n return videoUrl;\n }", "public void setVideoUrl(String newVideoUrl) {\n this.videoUrl = newVideoUrl;\n }", "@NonNull\n public String getVideoUrl() {\n return videoUrl;\n }", "private String getVideoApiLink(String id) {\n String videoLink = \"https://api.themoviedb.org/3/movie/\" + id + \"/videos?api_key=8f067240d8717f510b4c79abe9f714b7&language=en-US\";\n return videoLink;\n }", "public static String getDongtuServerUrl() {\n return BaseAppServerUrl.videoUrl + \"?service=\";\n }", "public void startYoutubePlayer(Context context, String url) {\n if (url.contains(\"http:\") || url.contains(\"https:\")) {\n\n String pattern = \"(?<=watch\\\\?v=|/videos/|embed\\\\/|youtu.be\\\\/|\\\\/v\\\\/|\\\\/e\\\\/|watch\\\\?v%3D|watch\\\\?feature=player_embedded&v=|%2Fvideos%2F|embed%\\u200C\\u200B2F|youtu.be%2F|%2Fv%2F)[^#\\\\&\\\\?\\\\n]*\";\n\n Pattern compiledPattern = Pattern.compile(pattern);\n Matcher matcher = compiledPattern.matcher(url); //url is youtube url for which you want to extract the id.\n if (matcher.find()) {\n String videoId = matcher.group();\n FavouriteResource favouriteResource = new FavouriteResource();\n favouriteResource.setName(videoId);\n favouriteResource.setUrlThumbnail(ConstantUtil.BLANK);\n context.startActivity(PlayYouTubeFullScreenActivity.getStartIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, favouriteResource));\n }\n\n } else {\n FavouriteResource favouriteResource = new FavouriteResource();\n favouriteResource.setName(url);\n favouriteResource.setUrlThumbnail(ConstantUtil.BLANK);\n context.startActivity(PlayYouTubeFullScreenActivity.getStartIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, favouriteResource));\n }\n }", "private void parseJsonAndReturnUrl(String jsonData){\n String videoUri, videoName;\n videos = new ArrayList<>();\n Video video = null;\n try {\n JSONObject root = new JSONObject(jsonData);\n JSONArray topicsArray = root.getJSONArray(\"topic_data\");\n if(topicsArray.length() == 0){\n return;\n }\n for(int i=0; i< topicsArray.length(); i++){\n JSONArray topics = topicsArray.getJSONArray(i);\n videoUri = topics.getString(3);\n\n Log.d(TAG, \"video path: \"+videoUri);\n\n videoName = topics.getString(0);\n\n Log.d(TAG, \"video name: \"+videoUri);\n\n video = new Video();\n\n video.setmVideoName(videoName);\n video.setmVideoUrl(videoUri);\n\n videos.add(video);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "String getVideoId() {\r\n return videoId;\r\n }", "public void setVideo(String video) {\n this.video = video;\n }", "protected static String[] parseVideoUrl(String url) {\n Pattern youtubePattern1 = Pattern.compile(\"youtube\\\\.com\\\\/watch\\\\?v=([^&#]+)\");\n Pattern youtubePattern2 = Pattern.compile(\"youtu\\\\.be\\\\/([^&#]+)\");\n Pattern youtubePlaylist = Pattern.compile(\"youtube\\\\.com\\\\/playlist\\\\?list=([^&#]+)\");\n Pattern twitchPattern = Pattern.compile(\"twitch\\\\.tv\\\\/([^&#]+)\");\n Pattern justintvPattern = Pattern.compile(\"justin\\\\.tv\\\\/([^&#]+)\");\n Pattern livestreamPattern = Pattern.compile(\"livestream\\\\.com\\\\/([^&#]+)\");\n Pattern ustreamPattern = Pattern.compile(\"ustream\\\\.tv\\\\/([^&#]+)\");\n Pattern vimeoPattern = Pattern.compile(\"vimeo\\\\.com\\\\/([^&#]+)\");\n Pattern dailymotionPattern = Pattern.compile(\"dailymotion\\\\.com\\\\/video\\\\/([^&#]+)\");\n Pattern soundcloudPattern = Pattern.compile(\"soundcloud\\\\.com\\\\/([^&#]+)\");\n Pattern googlePattern = Pattern.compile(\"docs\\\\.google\\\\.com\\\\/file\\\\/d\\\\/(.*?)\\\\/edit\");\n\n Matcher matcher1 = youtubePattern1.matcher(url);\n Matcher matcher2 = youtubePattern2.matcher(url);\n Matcher matcher3 = youtubePlaylist.matcher(url);\n Matcher matcher4 = twitchPattern.matcher(url);\n Matcher matcher5 = justintvPattern.matcher(url);\n Matcher matcher6 = livestreamPattern.matcher(url);\n Matcher matcher7 = ustreamPattern.matcher(url);\n Matcher matcher8 = vimeoPattern.matcher(url);\n Matcher matcher9 = dailymotionPattern.matcher(url);\n Matcher matcher10 = soundcloudPattern.matcher(url);\n Matcher matcher11 = googlePattern.matcher(url);\n\n if (matcher1.find()) {\n return new String[]{matcher1.group(1), \"yt\"};\n }\n\n if (matcher2.find()) {\n return new String[]{matcher2.group(1), \"yt\"};\n }\n\n if (matcher3.find()) {\n return new String[]{matcher3.group(1), \"yp\"};\n }\n\n if (matcher4.find()) {\n return new String[]{matcher4.group(1), \"tw\"};\n }\n\n if (matcher5.find()) {\n return new String[]{matcher5.group(1), \"jt\"};\n }\n\n if (matcher6.find()) {\n return new String[]{matcher6.group(1), \"li\"};\n }\n\n if (matcher7.find()) {\n return new String[]{matcher7.group(1), \"us\"};\n }\n\n if (matcher8.find()) {\n return new String[]{matcher8.group(1), \"vm\"};\n }\n\n if (matcher9.find()) {\n return new String[]{matcher9.group(1), \"dm\"};\n }\n\n if (matcher10.find()) {\n return new String[]{url, \"sc\"};\n }\n\n if (matcher11.find()) {\n return new String[]{matcher11.group(1), \"gd\"};\n }\n\n return null;\n }", "String getVideoId() {\n return videoId;\n }", "public void uriParse() {\n uri = Uri.parse(getUrlVideo());\n }", "Builder addVideo(String value);", "@Override\n public void onResponse(String response) {\n response = response.substring(response.indexOf(\"og:video:url\\\" content=\\\"\") + 23);\n response = response.substring(0, response.indexOf(\".mp4\") + 4);\n UrlFilm = response;\n Log.i(\"HTML\", \" \" + response);\n }", "@Override\n public void onResponse(String response) {\n response = response.substring(response.indexOf(\"og:video:url\\\" content=\\\"\") + 23);\n response = response.substring(0, response.indexOf(\".mp4\") + 4);\n UrlFilm = response;\n Log.i(\"HTML\", \" \" + response);\n }", "public static String getRandomVideoUrl() {\n int index = RandomNumberGenerator.getRandomInt(0, videos.length - 1);\n return videos[index];\n }", "public String getVideo() {\n return video;\n }", "public interface VideoApiInterface {\n\n @GET(\"playlists?part=snippet&maxResults=50&key=\"+ Const.API_KEY+\"&channelId=\"+Const.CHANNEL_ID_EN)\n Call<ChannelInfoResult> getChannelInfoResult();\n\n @GET(\"playlistItems?part=snippet&maxResults=20\")\n Call<PlayListItem> getListVideoPlayList(@Query(\"playlistId\") String playlistID, @Query(\"key\") String key);\n\n @GET(\"videos\")\n Call<VideoStatistic> getVideoStatistic(@Query(\"id\") String videoID,\n @Query(\"key\") String key,\n @Query(\"part\") String part);\n\n @GET(\"channels?part=snippet&id=\"+Const.CHANNEL_ID_EN\n +\"&fields=items%2Fsnippet%2Fthumbnails&key=\"+Const.API_KEY)\n Call<Channel> getChannelAvatar();\n\n}", "private void getVideo() {\n // create the url\n String temp = movie.getId().toString();\n String url = API_BASE_URL+\"/movie/\"+temp+\"/videos\";\n // set the request parameters\n RequestParams params = new RequestParams();\n params.put(API_KEY_PARAM, getString(R.string.api_key)); // Always needs API key\n // request a GET response expecting a JSON object response\n\n client.get(url,params, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n // load the results into movies list\n\n try {\n JSONArray results = response.getJSONArray(\"results\");\n JSONObject curMovie = results.getJSONObject(0);\n key = curMovie.getString(\"key\");\n\n } catch (JSONException e) {\n logError(\"Failed to parse play_video endpoint\", e, true);\n }\n\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n logError(\"Failed to get data from Now_playing endpoint\", throwable, true);\n }\n });\n\n }", "public interface Url {\n String BASE_URL = \"http://v3.wufazhuce.com:8000/api/\";\n\n //获取最新 idlist(返回的字段用于下个接口获取某一天的onelist,一共10个返回值,也就是10天的数据)\n String ID_LIST = \"onelist/idlist/\";\n //获取某天的 onelist\n String ONE_LIST = \"onelist/\";\n\n //阅读列表\n String READ_LIST = \"channel/reading/more/0\";\n //音乐列表\n String MUSIC_LIST = \"channel/music/more/0\";\n //影视列表\n String MOVIE_LIST = \"channel/movie/more/0\";\n\n //阅读相关详情\n String READ_DETAIL = \"essay/\";\n //阅读详情(问答)\n String READ_QUESTION = \"question/itemId\";\n //音乐详情\n String MUSIC_DETAIL = \"music/detail/\";\n //影视详情\n String MOVIE_DETAIL = \"movie/itemId/story/1/0\";\n //影视详情(图片和视频)\n String MOVIE_DETAIL_PIC = \"movie/detail/itemId\";\n\n //阅读评论\n String READ_COMMENT = \"comment/praiseandtime/essay/\";\n //音乐评论\n String MUSIC_COMMENT = \"comment/praiseandtime/music/\";\n //影视评论\n String MOVIE_COMMENT = \"comment/praiseandtime/movie/itemId/0\";\n\n //http://v3.wufazhuce.com:8000/api/praise/add?channel=update&source_id=9598&source=summary&version=4.0.7&\n //uuid=ffffffff-a90e-706a-63f7-ccf973aae5ee&platform=android\n\n // 点赞\n String MUSIC_PRAISE = \"praise/add\";\n}", "public abstract String extractDirectVideoUrl(String url, VideoContentExtractorProgressCallback progressCallback);", "public String getCourseVideo() {\n return courseVideo;\n }", "public static String buildYouTubeUrl(String movieKey){\n return YOUTUBE_BASE_URL + YOUTUBE_PARAM_QUERY + movieKey;\n }", "@Override\n public void onServerStart(String videoStreamUrl)\n {\n\n\n\n Log.d(\"Activity\",\"URL: \"+ videoStreamUrl);\n\n\n video = (VideoView)findViewById(R.id.video);\n\n Uri uri = Uri.parse(videoStreamUrl);\n video.setVideoURI(uri);\n video.start();\n\n\n\n }", "private URL createUrl(String movieId) {\n URL url = null;\n try {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"api.themoviedb.org\")\n .appendPath(\"3\")\n .appendPath(\"movie\")\n .appendPath(movieId)\n .appendQueryParameter(\"api_key\", getString(R.string.moviedb_api_key));\n url = new URL(builder.build().toString());\n } catch (Exception exception) {\n Log.e(LOG_TAG, \"Error with creating URL\", exception);\n return null;\n }\n return url;\n }", "public java.lang.String getVideoGuid() {\n return videoGuid;\n }", "public String setTestURL(int position) {\n if (position == 0) {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n } else if (position == 1) {\n return \"http://webcam.st-malo.com/axis-cgi/mjpg/video.cgi?resolution=640x480\";\n } else if (position == 2) {\n return \"http://webcams.hotelcozumel.com.mx:6003/axis-cgi/mjpg/video.cgi?resolution=320x240&dummy=1458771208837\";\n } else if (position == 3) {\n return \"http://iris.not.iac.es/axis-cgi/mjpg/video.cgi?resolution=320x240\";\n } else if (position == 4) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1111\";\n } else if (position == 5) {\n return \"http://bma-itic1.iticfoundation.org/mjpeg2.php?camid=61.91.182.114:1112\";\n } else {\n return \"http://plazacam.studentaffairs.duke.edu/mjpg/video.mjpg\";\n }\n }", "Builder addVideo(VideoObject value);", "VideosClient getVideos();", "public final VideoUrl mo96789a() {\n return this.f75940a;\n }", "private static String apiUrl(String sessionID, boolean xmlOrJson) {\n\t\tString url;\n\t\ttry {\n\t\t\turl = pmaUrl(sessionID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\turl = null;\n\t\t}\n\t\tif (url == null) {\n\t\t\t// sort of a hopeless situation; there is no URL to refer to\n\t\t\treturn null;\n\t\t}\n\t\t// remember, _pma_url is guaranteed to return a URL that ends with \"/\"\n\t\tif (xmlOrJson) {\n\t\t\treturn PMA.join(url, \"api/xml/\");\n\t\t} else {\n\t\t\treturn PMA.join(url, \"api/json/\");\n\t\t}\n\t}", "private void setVideo(){\n /* if(detailsBean==null){\n showToast(\"没有获取到信息\");\n return;\n }\n UserManager.getInstance().setDetailsBean(detailsBean);\n upCallShowSetVideoData = new UpCallShowSetVideoData();\n upCallShowSetVideoData.smobile = Preferences.getString(Preferences.UserMobile,null);\n upCallShowSetVideoData.iringid = detailsBean.iringid;\n if (callShowSetVideoProtocol == null) {\n callShowSetVideoProtocol = new CallShowSetVideoProtocol(null, upCallShowSetVideoData, handler);\n callShowSetVideoProtocol.showWaitDialog();\n }\n callShowSetVideoProtocol.stratDownloadThread(null, ServiceUri.Spcl, upCallShowSetVideoData, handler,true);*/\n }", "public void SetUrl(String url)\n\t{\n\t if (video_view.isPlaying())\n\t {\n\t video_view.stopPlayback();\n\t }\n\t \n Uri uri = Uri.parse(url);\n video_view.setVideoURI(uri);\n\t}", "public String getYouTubeUrl() {\n return youTubeUrl;\n }", "public static void geturl(String url) {\n PlayList_ID = url;\n }", "public abstract String makeReplayURI(final String datespec, final String url);", "public interface IVideoApi {\n\n /**\n * 获取视频标题等信息\n * http://toutiao.com/api/article/recent/?source=2&category=类型&as=A105177907376A5&cp=5797C7865AD54E1&count=20\"\n */\n @GET(\"api/article/recent/?source=2&as=A105177907376A5&cp=5797C7865AD54E1&count=30\")\n Observable<ResponseBody> getVideoArticle(\n @Query(\"category\") String category,\n @Query(\"_\") String time);\n\n /**\n * 获取视频信息\n * Api 生成较复杂 详情查看 {@linkplain com.meiji.toutiao.module.video.content.VideoContentPresenter#doLoadVideoData(String)}\n * http://ib.365yg.com/video/urls/v/1/toutiao/mp4/视频ID?r=17位随机数&s=加密结果\n */\n @GET\n Observable<VideoContentBean> getVideoContent(@Url String url);\n\n}", "String getSpecUrl();", "public String calculateYouTubeUrl(String pYouTubeFmtQuality, boolean pFallback, String pYouTubeVideoId) throws IOException, UnsupportedEncodingException {\n\n String lUriStr = null;\n HttpClient lClient = new DefaultHttpClient();\n\n HttpGet lGetMethod = new HttpGet(YOUTUBE_VIDEO_INFORMATION_URL +\n pYouTubeVideoId);\n\n HttpResponse lResp = null;\n\n lResp = lClient.execute(lGetMethod);\n\n ByteArrayOutputStream lBOS = new ByteArrayOutputStream();\n String lInfoStr = null;\n\n lResp.getEntity().writeTo(lBOS);\n lInfoStr = new String(lBOS.toString(\"UTF-8\"));\n\n String[] lArgs = lInfoStr.split(\"&\");\n Map<String, String> lArgMap = new HashMap<String, String>();\n for (int i = 0; i < lArgs.length; i++) {\n String[] lArgValStrArr = lArgs[i].split(\"=\");\n if (lArgValStrArr != null) {\n if (lArgValStrArr.length >= 2) {\n lArgMap.put(lArgValStrArr[0], URLDecoder.decode(lArgValStrArr[1]));\n }\n }\n }\n\n //Find out the URI string from the parameters\n\n //Populate the list of formats for the video\n String lFmtList = URLDecoder.decode(lArgMap.get(\"fmt_list\"));\n ArrayList<Format> lFormats = new ArrayList<Format>();\n if (null != lFmtList) {\n String lFormatStrs[] = lFmtList.split(\",\");\n\n for (String lFormatStr : lFormatStrs) {\n Format lFormat = new Format(lFormatStr);\n lFormats.add(lFormat);\n }\n }\n\n //Populate the list of streams for the video\n String lStreamList = lArgMap.get(\"url_encoded_fmt_stream_map\");\n if (null != lStreamList) {\n String lStreamStrs[] = lStreamList.split(\",\");\n ArrayList<VideoStream> lStreams = new ArrayList<VideoStream>();\n for (String lStreamStr : lStreamStrs) {\n VideoStream lStream = new VideoStream(lStreamStr);\n lStreams.add(lStream);\n }\n\n //Search for the given format in the list of video formats\n // if it is there, select the corresponding stream\n // otherwise if fallback is requested, check for next lower format\n int lFormatId = Integer.parseInt(pYouTubeFmtQuality);\n\n Format lSearchFormat = new Format(lFormatId);\n while (!lFormats.contains(lSearchFormat) && pFallback) {\n int lOldId = lSearchFormat.getId();\n int lNewId = getSupportedFallbackId(lOldId);\n\n if (lOldId == lNewId) {\n break;\n }\n lSearchFormat = new Format(lNewId);\n }\n\n int lIndex = lFormats.indexOf(lSearchFormat);\n if (lIndex >= 0) {\n VideoStream lSearchStream = lStreams.get(lIndex);\n lUriStr = lSearchStream.getUrl();\n }\n\n }\n //Return the URI string. It may be null if the format (or a fallback format if enabled)\n // is not found in the list of formats for the video\n return lUriStr;\n }", "void setVideoUri(@Nullable Uri uri);", "public String mopUrl2RealUrl(String url) {\n LOG.mo8825d(\"url \" + url);\n String ret = url.substring(6);\n if (StringUtils.isEmpty(this.mTerminalid)) {\n this.mTerminalid = SystemProperties.get(\"ro.serialno\");\n }\n String user = SWSysProp.getStringParam(\"user_name\", XmlPullParser.NO_NAMESPACE);\n LOG.mo8825d(\"user \" + user);\n String curOisUrl = this.mSdkRemoteManager.getCurOisUrl();\n LOG.mo8825d(\"curOisUrl \" + curOisUrl);\n String ret2 = \"http://\" + curOisUrl.replace(\"5001\", \"5000/\") + ret + \".m3u8?protocal=hls&user=\" + user + \"&tid=\" + this.mTerminalid + \"&sid=\" + ((MediaBean) this.mAllChannelList.get(this.clickIndex)).getId() + \"&type=stb&token=\" + this.mSdkRemoteManager.getOisToken();\n LOG.mo8825d(\"mopUrl2RealUrl \" + ret2);\n return ret2;\n }", "MovieVideo getMovieVideoByVideoid(String videoid);", "public void setUpVideo() {\n\n videosViewPager.setVisibility(VISIBLE);\n StorageReference filePath = storageReference.child(\"images\").child(new ArrayList<>(videos.keySet()).get(position));\n filePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n videosViewPager.setVideoURI(uri);\n videosViewPager.setMediaController(mediaController);\n mediaController.setAnchorView(videosViewPager);\n videosViewPager.requestFocus();\n }\n });\n //String videoPath = \"android.resource://\"+activity.getPackageName()+\"/\";\n //Uri uri = Uri.parse(videoPath);\n\n// DisplayMetrics displayMetrics = new DisplayMetrics();\n// activity.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n// int height = displayMetrics.heightPixels;\n// int width = displayMetrics.widthPixels;\n//\n//\n// videosViewPager.setMinimumHeight(height);\n// videosViewPager.setMinimumWidth(width);\n// videosViewPager.setVideoURI(uri);\n// videosViewPager.setMediaController(mediaController);\n// mediaController.setAnchorView(videosViewPager);\n// videosViewPager.requestFocus();\n //videosViewPager.start();\n\n\n\n }", "private String getMediaPageUrl(String url) {\n\t\tfor(int idx=url.length()-1; idx > 0; idx--) {\n\t\t\tif (!Character.isDigit(url.charAt(idx))) {\n\t\t\t\tString clipId = url.substring(idx+1);\n\t\t\t\turl = VimeoConverter.ROOT_URL + \"/\" + clipId;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn url;\n\t}", "private static URL buildFinalMovieDbURL(String urlString){\n Uri movieDbBuiltUri = Uri.parse(urlString).buildUpon()\n .appendQueryParameter(APIKEY_PARAM, BuildConfig.MOVIE_DB_API_KEY)\n .build();\n\n //Now creates an URL based on the created Uri\n URL finalMovieDbURL = null;\n\n try {\n finalMovieDbURL = new URL(movieDbBuiltUri.toString());\n } catch (MalformedURLException e) {\n Log.e(ERROR_TAG, e.getMessage());\n }\n\n return finalMovieDbURL;\n }", "@Test\n\tpublic void testYoutubeContentWithInValidVideoUrl_03(){\n\t\t//Create Content\n\t\tsetURI();\n\t\tString createValidContent = \"{\\\"request\\\": {\\\"content\\\": {\\\"identifier\\\": \\\"LP_FT_\" + rn\n\t\t\t\t+ \"\\\",\\\"osId\\\": \\\"org.ekstep.quiz.app\\\", \\\"mediaType\\\": \\\"content\\\",\\\"visibility\\\": \\\"Default\\\",\\\"description\\\": \\\"Test_QA\\\",\\\"name\\\": \\\"LP_FT_\"\n\t\t\t\t+ rn\n\t\t\t\t+ \"\\\",\\\"language\\\":[\\\"English\\\"],\\\"contentType\\\": \\\"Resource\\\",\\\"code\\\": \\\"Test_QA\\\",\\\"mimeType\\\": \\\"video/x-youtube\\\",\\\"tags\\\":[\\\"LP_functionalTest\\\"], \\\"owner\\\": \\\"EkStep\\\"}}}\";\n\t\tResponse res = \n\t\t\t\tgiven().\n\t\t\t\tspec(getRequestSpecification(contentType, validuserId, APIToken, channelId, appId)).\n\t\t\t\tbody(createValidContent).\n\t\t\t\twith().\n\t\t\t\tcontentType(JSON).\n\t\t\t\twhen().\n\t\t\t\tpost(\"content/v3/create\").\n\t\t\t\tthen().//log().all().\n\t\t\t\textract().\n\t\t\t\tresponse();\n\t\tJsonPath jp = res.jsonPath();\n\t\tString identifier = jp.get(\"result.node_id\");\n\t\t\n\t\t//Upload Youtube Video to the Content\n\t\tsetURI();\n\t\tgiven().\n\t\tspec(getRequestSpecification(uploadContentType, userId, APIToken)).\n\t\tmultiPart(\"fileUrl\",\"http://www.youtube.com/attribution_link?a=JdfC0C9V6ZI&u=%2Fwatch%3Fv%3DEhxJLojIE_o%26feature%3Dshare\").\n\t\twhen().\n\t\tpost(\"/content/v3/upload/\" + identifier).\n\t\tthen()\n\t\t//.log().all()\n\t\t.spec(get400ResponseSpec());\n\t\t\n\t}", "private void showOST(int position) {\n\t\tString youtubeUrl = \"\";\n\t\tString youtubeId = \"\";\n\t\tString rtsp_link = \"\";\n\t\t\n\t\t//urlYoutube = ost_links[position];\n\t\t//youtubeUrl = \"http://www.youtube.com/watch?v=MV5qvrxmegY\";\n\t\t//rtsp_link = getUrlVideoRTSP(youtubeUrl);\n\t\t//rtsp_link = \"rtsp://r1---sn-a5m7zu7e.c.youtube.com/CiILENy73wIaGQkGema8vmpeMRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp\";\n\t\t//rtsp_link = \"https://archive.org/download/Pbtestfilemp4videotestmp4/video_test_512kb.mp4\";\n\t\t//rtsp_link = \"rtsp://r3---sn-a5m7zu7d.c.youtube.com/CiILENy73wIaGQn061BlwOVsxRMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp\";\n\t\trtsp_link = ost_links[position];\t\t\n\t\tVideoView videoView = (VideoView) this.findViewById(R.id.videoView1);\n\t\tLog.v(\"Video\", \"***Video to Play:: \" + rtsp_link);\n\t\t\n\t\t// add controls to a MediaPlayer like play, pause.\n\t\tMediaController mc = new MediaController(this);\n\t\tvideoView.setMediaController(mc);\n\t\n\t\t// Set the path of Video or URI\n\t\tmc.setAnchorView(videoView);\n\t\tUri videoPath = null;\n\t\tvideoPath = Uri.parse(rtsp_link);\n\t\t\n\t\tvideoView.setVideoURI(videoPath);\n\t\tvideoView.requestFocus();\n\t\tvideoView.start();\t\n\t\tmc.show();\n\t}", "private String getTokenizedUrl() {\n SharedPreferences sharedPreferences = getSharedPreferences();\n String tokenKey = MainActivity.sharedPrefKeys.TOKENIZED_URL.toString();\n\n if (sharedPreferences.contains(tokenKey)) {\n return sharedPreferences.getString(tokenKey, \"\");\n }\n return \"\";\n }", "public final VideoUrl mo96791c() {\n return this.f75940a;\n }", "String getServerUrl();", "public void setVid(java.lang.String param) {\r\n localVidTracker = param != null;\r\n\r\n this.localVid = param;\r\n }", "public java.lang.String getVid() {\r\n return localVid;\r\n }", "public interface VideoApi {\n\n @GET(\"tabs/selected\")\n Observable<Video> getVideoList(@Query(\"date\") String date);\n\n}", "public Single<Uri> video(@NonNull FragmentActivity activity) {\n return requestImage(\n activity,\n false,\n MimeType.VIDEO)\n .map(uris -> uris.get(0)\n );\n }", "public static String getUrlMovie(Context context) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n return CommonConstants.MOVIE_URL_PREFIX.replace(\"#size#\",\n sharedPreferences.getString(context.getString(R.string.key_pref_size),\n CommonConstants.THEMOVIEDB_SIZE_W185)\n );\n }", "public PlaybackVideoUrl(Parcel parcel) {\n this((VideoUrl) r0, parcel.readInt(), parcel.readInt());\n C32569u.m150519b(parcel, C6969H.m41409d(\"G7982C719BA3C\"));\n Parcelable readParcelable = parcel.readParcelable(VideoUrl.class.getClassLoader());\n if (readParcelable != null) {\n return;\n }\n throw new TypeCastException(C6969H.m41409d(\"G6796D916FF33AA27E8018408F0E083D46890C15AAB3FEB27E900DD46E7E9CF977D9AC51FFF33A424A8149841FAF08DD66787C715B634E53FEF0A9547BCF5CFD67086C748F13DA42DE302DE7EFBE1C6D85C91D9\"));\n }", "public PlaybackVideoUrl createFromParcel(Parcel parcel) {\n C32569u.m150519b(parcel, C6969H.m41409d(\"G7982C719BA3C\"));\n return new PlaybackVideoUrl(parcel);\n }", "private void updateDownloadUrls() {\n VideoData videoData = VideoHelper.getFullData(getContentResolver(), mVideoId);\n if (!videoData.isOnAir()) {\n if (ZypeConfiguration.isDownloadsEnabled(this)\n && (ZypeConfiguration.isDownloadsForGuestsEnabled(this) || SettingsProvider.getInstance().isLoggedIn())) {\n getDownloadUrls(mVideoId);\n }\n }\n }", "@Override\n public String getUrl(int connectionCount) {\n String url = super.getUrl(connectionCount);\n // Detect if we have a session in a cookie and pass it on the url, because XDomainRequest does not\n // send cookies\n if (url.toLowerCase().contains(\";jsessionid\") == false) {\n String sessionid = Cookies.getCookie(\"JSESSIONID\");\n if (sessionid != null) {\n String parm = \";jsessionid=\" + sessionid;\n int p = url.indexOf('?');\n if (p > 0) {\n return url.substring(0, p) + parm + url.substring(p);\n } else {\n return url + parm;\n }\n }\n }\n if (!url.toUpperCase().contains(\"PHPSESSID\")) {\n String sessionid = Cookies.getCookie(\"PHPSESSID\");\n if (sessionid != null) {\n int p = url.indexOf('?');\n String param = \"PHPSESSID=\" + sessionid;\n if (p > 0) {\n return url.substring(0, p + 1) + param + \"&\" + url.substring(p + 1);\n } else {\n return url + \"?\" + param;\n }\n }\n }\n\n return url;\n }", "public ContentCard video(String video) {\n this.video = video;\n return this;\n }", "public YouTubeVideo(\n String userId,\n String channelTitle,\n String title,\n String description,\n String thumbnail,\n String videoId,\n String channelId,\n int currentIndex,\n int videosDisplayedPerPage,\n int currentPage,\n int totalPages) {\n this.userId = userId;\n this.channelTitle = channelTitle;\n this.title = title;\n this.description = description;\n this.thumbnail = thumbnail;\n this.videoId = videoId;\n this.currentIndex = currentIndex;\n this.videosDisplayedPerPage = videosDisplayedPerPage;\n this.currentPage = currentPage;\n this.totalPages = totalPages;\n videoURL += videoId;\n channelURL += channelId;\n }", "public MentorConnectRequestCompose addVideo()\n\t{\n\t\tmentorConnectRequestObjects.videoButton.click();\n\t\tmentorConnectRequestObjects.videoURLField.sendKeys(mentorConnectRequestObjects.videoURL);\n\t\tmentorConnectRequestObjects.postVideoButton.click();\n\t\treturn new MentorConnectRequestCompose(driver);\n\t}", "com.google.ads.googleads.v6.resources.Video getVideo();", "public void startVideoPlayer(Context context, String url) {\n Resource item = new Resource();\n item.setType(context.getString(R.string.typeVideo));\n item.setUrlMain(url);\n context.startActivity(PlayVideoFullScreenActivity.getStartActivityIntent(context, ConstantUtil.BLANK, ConstantUtil.BLANK, PlayVideoFullScreenActivity.NETWORK_TYPE_ONLINE, (Resource) item));\n }", "public interface Config {\n\n String API_KEY = \"api_key\";\n String POPULAR = \"popular\";\n String TOP_RATED = \"top_rated\";\n String BASE_URL = \"http://api.themoviedb.org/3/movie/\";\n String IMAGE_BASE_URL = \"http://image.tmdb.org/t/p/w185\";\n\n String ID = \"id\";\n String TRAILER_VIDEOS = \"{id}/videos\";\n String MOVIE_REVIEWS = \"{id}/reviews\";\n String SORT_API = \"{sort}\";\n}", "public String convertString() {\n\t\tString urlToConvert = tfURL.getText();\n\t\tString is_youtube_link_s = \"youtu.be\";\n\t\tif (urlToConvert.contains(\"watch?v=\")) {\n\t\t\tnew_URL = urlToConvert.replace(\"watch?v=\", \"embed/\");\n\t\t} else if (urlToConvert.contains(is_youtube_link_s)) {\n\t\t\tnew_URL = urlToConvert.replace(\"youtu.be\", \"youtube.com/embed\");\n\t\t}\n\t\ttfNewURL.setText(new_URL);\n\t\tSystem.out.println(new_URL);\n\t\treturn new_URL;\n\t}", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "java.lang.String getUrl();", "public YouTubeVideo(\n String channelTitle,\n String title,\n String description,\n String thumbnail,\n String videoId,\n String channelId,\n int currentIndex,\n int videosDisplayedPerPage,\n int currentPage,\n int totalPages) {\n this.channelTitle = channelTitle;\n this.title = title;\n this.description = description;\n this.thumbnail = thumbnail;\n this.videoId = videoId;\n this.currentIndex = currentIndex;\n this.videosDisplayedPerPage = videosDisplayedPerPage;\n this.currentPage = currentPage;\n this.totalPages = totalPages;\n videoURL += videoId;\n channelURL += channelId;\n }", "public java.lang.String getVideoUserGuid() {\n return videoUserGuid;\n }", "public void setUrl(String url);", "public void setUrl(String url);", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "public void setVideoGuid(java.lang.String videoGuid) {\n this.videoGuid = videoGuid;\n }", "public void setVideourl(String videourl) {\n this.videourl = videourl;\n }", "public TokenRequest setTokenServerUrl(GenericUrl var1) {\n return this.setTokenServerUrl(var1);\n }", "protected List<Video> processInputURL(String url) {\n videos = new ArrayList<Video>();\n videos.add(new Video(url));\n retrieveSubtitles();\n return videos;\n }", "@Test\n\tpublic void testYoutubeContentWithValidVideoUrl_02(){\n\t\t//Create Content\n\t\tsetURI();\n\t\tString createValidContent = \"{\\\"request\\\": {\\\"content\\\": {\\\"identifier\\\": \\\"LP_FT_\" + rn\n\t\t\t\t+ \"\\\",\\\"osId\\\": \\\"org.ekstep.quiz.app\\\", \\\"mediaType\\\": \\\"content\\\",\\\"visibility\\\": \\\"Default\\\",\\\"description\\\": \\\"Test_QA\\\",\\\"name\\\": \\\"LP_FT_\"\n\t\t\t\t+ rn\n\t\t\t\t+ \"\\\",\\\"language\\\":[\\\"English\\\"],\\\"contentType\\\": \\\"Resource\\\",\\\"code\\\": \\\"Test_QA\\\",\\\"mimeType\\\": \\\"video/x-youtube\\\",\\\"tags\\\":[\\\"LP_functionalTest\\\"], \\\"owner\\\": \\\"EkStep\\\"}}}\";\n\t\tResponse res = \n\t\t\t\tgiven().\n\t\t\t\tspec(getRequestSpecification(contentType, validuserId, APIToken, channelId, appId)).\n\t\t\t\tbody(createValidContent).\n\t\t\t\twith().\n\t\t\t\tcontentType(JSON).\n\t\t\t\twhen().\n\t\t\t\tpost(\"content/v3/create\").\n\t\t\t\tthen().//log().all().\n\t\t\t\textract().\n\t\t\t\tresponse();\n\t\tJsonPath jp = res.jsonPath();\n\t\tString identifier = jp.get(\"result.node_id\");\n\t\t\n\t\t//Upload Youtube Video to the Content\n\t\tsetURI();\n\t\tgiven().\n\t\tspec(getRequestSpecification(uploadContentType, userId, APIToken)).\n\t\tmultiPart(\"fileUrl\",\"https://www.youtube.com/watch?v=owr198WQpM8\").\n\t\twhen().\n\t\tpost(\"/content/v3/upload/\" + identifier).\n\t\tthen()\n\t\t//.log().all()\n\t\t.spec(get200ResponseSpec());\n\t\t\n\t\t// Get content and validate\n\t\tsetURI();\n\t\tResponse R1 = given().\n\t\t\t\tspec(getRequestSpecification(contentType, userId, APIToken)).\n\t\t\t\twhen().\n\t\t\t\tget(\"/content/v3/read/\" + identifier).\n\t\t\t\tthen().\n\t\t\t\t//log().all().\n\t\t\t\tspec(get200ResponseSpec()).\n\t\t\t\textract().response();\n\n\t\tJsonPath jP1 = R1.jsonPath();\n\t\tString status = jP1.get(\"result.content.status\");\n\t\tString license=jP1.get(\"result.content.license\");\n\t\tAssert.assertEquals(status, \"Draft\");\n\t\tAssert.assertEquals(license, \"Creative Commons Attribution (CC BY)\");\n\t\t\n\t}", "@Test\n\tpublic void testYoutubeContentWithValidVideoUrl_01(){\n\t\t//Create Content\n\t\tsetURI();\n\t\tString createValidContent = \"{\\\"request\\\": {\\\"content\\\": {\\\"identifier\\\": \\\"LP_FT_\" + rn\n\t\t\t\t+ \"\\\",\\\"osId\\\": \\\"org.ekstep.quiz.app\\\", \\\"mediaType\\\": \\\"content\\\",\\\"visibility\\\": \\\"Default\\\",\\\"description\\\": \\\"Test_QA\\\",\\\"name\\\": \\\"LP_FT_\"\n\t\t\t\t+ rn\n\t\t\t\t+ \"\\\",\\\"language\\\":[\\\"English\\\"],\\\"contentType\\\": \\\"Resource\\\",\\\"code\\\": \\\"Test_QA\\\",\\\"mimeType\\\": \\\"video/x-youtube\\\",\\\"tags\\\":[\\\"LP_functionalTest\\\"], \\\"owner\\\": \\\"EkStep\\\"}}}\";\n\t\tResponse res = \n\t\t\t\tgiven().\n\t\t\t\tspec(getRequestSpecification(contentType, validuserId, APIToken, channelId, appId)).\n\t\t\t\tbody(createValidContent).\n\t\t\t\twith().\n\t\t\t\tcontentType(JSON).\n\t\t\t\twhen().\n\t\t\t\t//post(\"v3/content/create\").\n\t\t\t\tpost(\"content/v3/create\").\n\t\t\t\tthen().//log().all().\n\t\t\t\textract().\n\t\t\t\tresponse();\n\t\tJsonPath jp = res.jsonPath();\n\t\tString identifier = jp.get(\"result.node_id\");\n\t\t\n\t\t//Upload Youtube Video to the Content\n\t\tsetURI();\n\t\tgiven().\n\t\tspec(getRequestSpecification(uploadContentType, userId, APIToken)).\n\t\tmultiPart(\"fileUrl\",\"http://youtu.be/-wtIMTCHWuI\").\n\t\twhen().\n\t\t//post(\"v3/content/upload/\" + identifier).\n\t\tpost(\"/content/v3/upload/\" + identifier).\n\t\tthen().\n\t\t//log().all().\n\t\tspec(get200ResponseSpec());\n\t\t\n\t\t// Get content and validate\n\t\tsetURI();\n\t\tResponse R1 = given().\n\t\t\t\tspec(getRequestSpecification(contentType, userId, APIToken)).\n\t\t\t\twhen().\n\t\t\t\tget(\"/content/v3/read/\" + identifier).\n\t\t\t\tthen().\n\t\t\t\t//log().all().\n\t\t\t\tspec(get200ResponseSpec()).\n\t\t\t\textract().response();\n\n\t\tJsonPath jP1 = R1.jsonPath();\n\t\tString status = jP1.get(\"result.content.status\");\n\t\tString license=jP1.get(\"result.content.license\");\n\t\tAssert.assertEquals(status, \"Draft\");\n\t\tAssert.assertEquals(license, \"Standard YouTube License\");\n\t\t\n\t}", "@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)\n public Single<List<Uri>> multipleVideos(@NonNull FragmentActivity activity) {\n return requestImage(activity, true, MimeType.VIDEO);\n }", "@Override\n public void onSubmit(EasyVideoPlayer player, Uri source) {\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n\n try {\n JSONArray results = response.getJSONArray(\"results\");\n JSONObject curMovie = results.getJSONObject(0);\n key = curMovie.getString(\"key\");\n\n } catch (JSONException e) {\n logError(\"Failed to parse play_video endpoint\", e, true);\n }\n\n\n }", "public void setURL(String url);", "@Override\n\t\t\t\t\t\t\t\tpublic void onLoadVideo(String result) {\n\n\t\t\t\t\t\t\t\t}", "String getUrl(String key);", "private static String getDeprecatedUrlKey(int id) {\n return id + \"_url\";\n }", "public String getUrl(){\n return urlsText;\n }", "public GetVideoRequest(UUID requestUUID, Video video) {\n super(requestUUID, video.getVidUrl());\n this.video = video;\n getVideoRequestCount += 1;\n }", "String getVmUrl();", "public void setURL(String _url) { url = _url; }", "public interface YouTubeService {\n\n\n @GET(\"/youtube/v3/channels?part=snippet,brandingSettings,contentDetails\")\n void getChannel(@Query(\"id\") String id, Callback<ChannelList> cb);\n @GET(\"/youtube/v3/channels?part=snippet,brandingSettings,contentDetails\")\n ChannelList getChannel(@Query(\"id\") String id);\n\n @GET(\"/youtube/v3/search?part=snippet,id&order=date&maxResults=50\")\n void getVideos(@Query(\"channelId\") String channelId, Callback<VideoList> cb);\n @GET(\"/youtube/v3/search?part=snippet,id&order=date&maxResults=50\")\n VideoList getVideos(@Query(\"channelId\") String channelId);\n @GET(\"/youtube/v3/search?part=snippet,id&order=date&maxResults=50\")\n VideoList getVideos(@Query(\"channelId\") String channelId, @Query(\"pageToken\") String nextPageToken);\n @GET(\"/youtube/v3/videos\")\n void getVideo(@Query(\"id\") String id, Callback<VideoList> cb);\n\n\n @GET(\"/youtube/v3/commentThreads?part=id%2Creplies%2Csnippet\")\n void getComments(@Query(\"videoId\") String videoId, @Query(\"pageToken\") String nextPageToken, Callback<CommentList> cb);\n @GET(\"/youtube/v3/commentThreads?part=id%2Creplies%2Csnippet\")\n void getComments(@Query(\"videoId\") String videoId, Callback<CommentList> cb);\n\n\n @GET(\"/youtube/v3/playlists?part=contentDetails%2Cid%2Cplayer%2Csnippet%2Cstatus\")\n void getPlaylists(@Query(\"channelId\") String channelId, Callback<SeriesList> cb);\n @GET(\"/youtube/v3/playlists?part=contentDetails%2Cid%2Cplayer%2Csnippet%2Cstatus\")\n void getPlaylists(@Query(\"channelId\") String channelId, @Query(\"pageToken\") String nextPageToken, Callback<SeriesList> cb);\n\n\n @GET(\"/youtube/v3/playlistItems?part=contentDetails%2Cid%2Csnippet%2Cstatus&maxResults=50\")\n void getPlaylistItems(@Query(\"playlistId\") String playlistId, Callback<VideoList> cb);\n @GET(\"/youtube/v3/playlistItems?part=contentDetails%2Cid%2Csnippet%2Cstatus&maxResults=50\")\n void getPlaylistItems(@Query(\"playlistId\") String playlistId, @Query(\"pageToken\") String nextPageToken, Callback<VideoList> cb);\n @GET(\"/youtube/v3/playlistItems?part=contentDetails%2Cid%2Csnippet%2Cstatus&maxResults=50\")\n VideoList getPlaylistItems(@Query(\"playlistId\") String playlistId);\n @GET(\"/youtube/v3/playlistItems?part=contentDetails%2Cid%2Csnippet%2Cstatus&maxResults=50\")\n VideoList getPlaylistItems(@Query(\"playlistId\") String playlistId, @Query(\"pageToken\") String nextPageToken);\n\n @GET(\"/youtube/v3/channels?part=snippet%2CcontentDetails%2Cstatistics\")\n void getAboutUsInfo(@Query(\"id\") String channelId, Callback<About> cb);\n}", "public String getUrl() { return url; }", "default void setVideoPath(@Nullable String path) {\n setVideoUri(TextUtils.isEmpty(path) ? null : Uri.parse(path));\n }", "public Html5Video(String id, IModel<List<MediaSource>> model)\n\t{\n\t\tsuper(id, model);\n\t}", "@Override\n public String toString()\n {\n return \"Video: \" + videoTitle + \"\\nCreated By: \" + videoCreator;\n }", "public void getPublishVideoData(String uid,File videoFile,File coverFile,String videoDesc,String latitude,String longitude){\n\n ApiService myQusetUtils = new HttpUtils.Builder()\n .addCallAdapterFactory()\n .addConverterFactory()\n .build()\n .getMyQusetUtils();\n /**\n * uid\n videoFile\n coverFile\n videoDesc\n latitude\n longitude\n\n */\n MultipartBody.Builder build = new MultipartBody.Builder().setType(MultipartBody.FORM);\n build.addFormDataPart(\"uid\",uid);\n build.addFormDataPart(\"videoDesc\",videoDesc);\n build.addFormDataPart(\"latitude\",latitude);\n build.addFormDataPart(\"longitude\",longitude);\n RequestBody requestFile = RequestBody.create(MediaType.parse(\"multipart/form-data\"), videoFile);\n build.addFormDataPart(\"videoFile\", videoFile.getName(), requestFile);\n RequestBody re = RequestBody.create(MediaType.parse(\"multipart/form-data\"), coverFile);\n build.addFormDataPart(\"coverFile\", coverFile.getName(),re);\n List<MultipartBody.Part> parts = build.build().parts();\n myQusetUtils.getPublishVideo(parts)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Observer<PublishVideo>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(PublishVideo publishVideo) {\n\n if(publishVideo.code.equals(\"0\")){\n getPublishVideoMessage.getPublishVideoSuccess(publishVideo);\n }else {\n getPublishVideoMessage.getPublishVideoFailure(publishVideo.msg);\n }\n }\n\n @Override\n public void onError(Throwable e) {\n\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n }", "Builder addUrl(String value);" ]
[ "0.62758666", "0.62150306", "0.615028", "0.6000557", "0.5981158", "0.5930217", "0.5889478", "0.5886001", "0.5795329", "0.5782922", "0.5662864", "0.5646624", "0.56145877", "0.5592621", "0.5592621", "0.55254114", "0.54865193", "0.5461574", "0.54358685", "0.5399734", "0.53885674", "0.5387271", "0.5370248", "0.5347985", "0.52702934", "0.5214542", "0.5203549", "0.5192607", "0.51754826", "0.5174365", "0.51527053", "0.51489407", "0.5125989", "0.51249754", "0.5124887", "0.51208854", "0.51106554", "0.5106474", "0.5102832", "0.50758725", "0.5067878", "0.50482327", "0.5021539", "0.5006265", "0.50057584", "0.49999404", "0.49900392", "0.49876696", "0.49795702", "0.49775884", "0.4976287", "0.49671412", "0.49530506", "0.49485952", "0.4948533", "0.49450535", "0.49449053", "0.49358526", "0.49331298", "0.4931837", "0.4919583", "0.49162865", "0.491604", "0.4915886", "0.49155867", "0.49132466", "0.4912829", "0.4912829", "0.4912829", "0.4912829", "0.4912829", "0.4912829", "0.49121156", "0.49068728", "0.4888724", "0.4888724", "0.48829746", "0.48809677", "0.48775387", "0.48764494", "0.48655316", "0.4863871", "0.48590404", "0.4852409", "0.48472562", "0.48389566", "0.48217088", "0.48212925", "0.4820091", "0.4813841", "0.47940257", "0.47936156", "0.4783087", "0.47830823", "0.47777662", "0.47724274", "0.4768632", "0.4768122", "0.47670665", "0.47615317", "0.4755264" ]
0.0
-1
TODO: Move to an abstract class
public static String genotypeToString(Map<Allele, String> allelesMap, htsjdk.variant.variantcontext.Genotype genotype) { String genotypeValue; StringBuilder gt = new StringBuilder(); for (Allele allele : genotype.getAlleles()) { if (gt.length() > 0) { gt.append(genotype.isPhased() ? VCFConstants.PHASED : VCFConstants.UNPHASED); } gt.append(allelesMap.get(allele)); } genotypeValue = gt.toString(); return genotypeValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n protected void prot() {\n }", "public abstract String use();", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private stendhal() {\n\t}", "public abstract void mo70713b();", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "abstract int pregnancy();", "@Override\n void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public abstract void mo56925d();", "abstract public String named();", "protected abstract Set method_1559();", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n\n }", "protected abstract String name ();", "@Override\n public void init() {}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo27386d();", "public abstract Object mo26777y();", "public abstract String mo41079d();", "public abstract void mo30696a();", "@Override\n public int describeContents() { return 0; }", "public abstract void mo35054b();", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public abstract String mo118046b();", "public abstract void mo27385c();", "protected OpinionFinding() {/* intentionally empty block */}", "public abstract void mo6549b();", "public void smell() {\n\t\t\n\t}", "public abstract String mo9239aw();", "abstract String getName();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private Util() { }", "@Override\n public void memoria() {\n \n }", "protected abstract void construct();", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract String mo13682d();", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "public abstract Object mo1771a();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void get() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "abstract String name();", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "abstract String getContent();", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}" ]
[ "0.59613246", "0.5906246", "0.58677256", "0.5859313", "0.5761497", "0.5744678", "0.57240194", "0.572132", "0.56602967", "0.5614027", "0.56047887", "0.5599166", "0.558903", "0.5568174", "0.5568174", "0.5566224", "0.5566224", "0.5563337", "0.5542321", "0.5542321", "0.5542321", "0.5542321", "0.5542321", "0.5542321", "0.55371124", "0.55128145", "0.54963183", "0.548819", "0.5485643", "0.5468855", "0.5467341", "0.5451493", "0.5449569", "0.5442413", "0.5431569", "0.5421312", "0.5420372", "0.54188734", "0.54184115", "0.54166603", "0.5410775", "0.5405606", "0.5388314", "0.53718954", "0.5371633", "0.5362096", "0.5353961", "0.5348293", "0.53479034", "0.5346928", "0.53435564", "0.5334324", "0.5333785", "0.53309304", "0.53293246", "0.53293246", "0.5328271", "0.5302212", "0.529223", "0.52905375", "0.5288601", "0.52812004", "0.52803546", "0.52784073", "0.5277375", "0.52739424", "0.5273466", "0.52657765", "0.5264612", "0.52637744", "0.5262813", "0.5262813", "0.52616346", "0.52616346", "0.52616346", "0.52616346", "0.52616346", "0.52569693", "0.5254651", "0.5253822", "0.52507627", "0.5249878", "0.52339494", "0.5228438", "0.5225292", "0.52213264", "0.52213264", "0.52213264", "0.5218988", "0.5218479", "0.52126884", "0.52126884", "0.5212515", "0.52120894", "0.5210536", "0.5210536", "0.5210536", "0.520284", "0.51978326", "0.5193319", "0.51911944" ]
0.0
-1
Set element type and reserialize element if required. Should only be called before serialization/deserialization of this function.
@Override public void setOutputType(TypeInformation<T> outTypeInfo, ExecutionConfig executionConfig) { Preconditions.checkState( elements != null, "The output type should've been specified before shipping the graph to the cluster"); checkIterable(elements, outTypeInfo.getTypeClass()); TypeSerializer<T> newSerializer = outTypeInfo.createSerializer(executionConfig); if (Objects.equals(serializer, newSerializer)) { return; } serializer = newSerializer; try { serializeElements(); } catch (IOException ex) { throw new UncheckedIOException(ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setElement(T elem)\n {\n\n element = elem;\n }", "public void setElementType(String element_type) {\n\t\tthis.element_type = element_type;\n\t}", "protected abstract Type loadDefaultElement();", "public void addElement() {\n\t\tXmlNode newNode = new XmlNode(rootNode, this);// make a new default-type field\n\t\taddElement(newNode);\n\t}", "@Override\n\tpublic void setElement(Element element) {\n\t\t\n\t}", "public void setElement (T element) {\r\n\t\t\r\n\t\tthis.element = element;\r\n\t\r\n\t}", "public void setElement(T element) {\n\t\tthis.element = element;\n\t}", "public ElementSerializer() {\n _lock = new Object();\n }", "public final void setElementType(solarpowerconversioncalculator.proxies.ElementType elementtype)\n\t{\n\t\tsetElementType(getContext(), elementtype);\n\t}", "public void setElement(T newvalue);", "public final void setElementType(com.mendix.systemwideinterfaces.core.IContext context, solarpowerconversioncalculator.proxies.ElementType elementtype)\n\t{\n\t\tif (elementtype != null)\n\t\t\tgetMendixObject().setValue(context, MemberNames.ElementType.toString(), elementtype.toString());\n\t\telse\n\t\t\tgetMendixObject().setValue(context, MemberNames.ElementType.toString(), null);\n\t}", "public void setElement(E element)\n\t{\n\t\tthis.data = element;\n\t}", "public void setElement(String newElem) { element = newElem;}", "public void setElementClass (String elementClass) throws ModelException;", "@XmlAttribute(name=\"elementClass\")\n public void setElementType(String elementType)\n {\n this.elementType = elementType;\n }", "public void setElement(Object e) {\n element = e;\n }", "public void setElement(Element element) {\n this.element = element;\n }", "public void setElementNeeded(ExternalElements pElementNeeded){\n\t\telementNeeded = pElementNeeded;\n\t}", "protected abstract T _createWithSingleElement(DeserializationContext ctxt, Object value);", "public void setElement(E element) {\n\t\t\tthis.element = element;\n\t\t}", "public void setElement(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/element\",v);\n\t\t_Element=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void settInn(T element);", "protected void setType(String requiredType){\r\n type = requiredType;\r\n }", "public void setElementType(QName elementType) {\n this.fieldElementType = elementType;\n }", "public void setElement(Element Element) {\n\t\telement = Element;\n\t}", "final protected boolean addElement(Object pID, TypeElement<?> pTypeElement) {\n\t\t\tif(!this.verifySecretID(pID)) return false;\n\t\t\t\n\t\t\tif((pTypeElement == null) || this.TypeElements.containsKey(pTypeElement.getIdentity())) return false;\n\t\t\tthis.TypeElements.put(pTypeElement.getIdentity(), pTypeElement);\n\t\t\treturn true;\n\t\t}", "@Override\n public abstract void addToXmlElement(Element element);", "@SuppressWarnings(\"unchecked\")\n private void initElements() {\n\n try {\n\n Elements marker = null;\n\n for (Annotation annotation : this.getClass().getDeclaredAnnotations()) {\n if(annotation instanceof Elements) {\n marker = (Elements) annotation;\n }\n }\n\n if(marker == null) {\n String msg = \"Expected @Elements annotation on Screen class\";\n log.error(msg);\n throw new FrameworkException(msg);\n }\n\n PlatformType platform = DriverWrapper.getActivePlatform();\n Validate.notNull(platform);\n\n Class<? extends BaseElements> elementsClass = null;\n\n if(marker.elements().equals(BaseElements.class)) {\n // do we have individual iOS or Android elements?\n if(PlatformType.ANDROID == platform) {\n elementsClass = marker.androidElements();\n\n } else if(PlatformType.IOS == platform) {\n elementsClass = marker.iosElements();\n } else {\n throw new IllegalArgumentException(\"Un-supported platform\");\n }\n\n } else {\n // just take combined merged elements\n elementsClass = marker.elements();\n }\n\n if(marker.elements().equals(BaseElements.class)) {\n throw new IllegalArgumentException(\"Expected that you provide an elements class\");\n }\n\n Constructor<? extends BaseElements> constructor = elementsClass.getConstructor();\n this.elements = constructor.newInstance();\n\n PageFactory.initElements(new AppiumFieldDecorator(driver), elements);\n\n this.elements.init(driver);\n\n } catch(Exception e) {\n\n log.error(\"Failed to initialize page elements\", e);\n throw new FrameworkException(e);\n }\n }", "public GenericElement() {\n\t}", "ElementSetNameType createElementSetNameType();", "public void setElementType(QName elementType) {\n\t\tmFieldElementType = elementType;\n\t}", "public void setValue(T element) {\n\t\t\n\t}", "TypeElement getTypeElement();", "Element getGenericElement();", "@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}", "public abstract void setUpElementsWithData();", "public void newElement() {\n Location = null;\n Name = null;\n MyFont = FontList.FONT_LABEL;\n }", "DOMType() {\n // Constructs an empty type node\n }", "public void readXML(org.dom4j.Element el) throws Exception {\n String name,value;\n org.dom4j.Element node=el;\n\n if (el.attribute(\"type\") != null)\n setType(el.attribute(\"type\").getText());\n if (el.attribute(\"action\") != null)\n setAction(ActionList.valueOf(el.attribute(\"action\").getText()));\n if (el.attribute(\"direction\") != null)\n setDirection(DirectionList.valueOf(el.attribute(\"direction\").getText()));\n if (el.attribute(\"content\") != null)\n setContent(el.attribute(\"content\").getText());\n if (el.attribute(\"iterations\") != null)\n setIterations(org.jbrain.xml.binding._TypeConverter.parseInteger(el.attribute(\"iterations\").getText(), sObjName, \"Iterations\"));\n if (el.attribute(\"asynchronous\") != null)\n setAsynchronous(org.jbrain.xml.binding._TypeConverter.parseBoolean(el.attribute(\"asynchronous\").getText(), sObjName, \"Asynchronous\"));\n }", "@Override\n\tpublic Element toElement() {\n\t\treturn null;\n\t}", "protected void setElement (XmlNode thisNode, Object obj, XmlDescriptor desc, UnmarshalContext context) throws Exception {\n String elName = thisNode.getName (); //getTagName();\n\n JField jf = (JField)desc.elementList.get(elName);\n if (jf == null)\n throw new FieldNotFoundException (\"ephman.abra.tools.nofield\", \n\t\t\t\t\t\t\t\t\t\t\t new Object[]{elName, desc.className});\n\n\t\tif (jf.isArray ()) return ; // will do seperately..\n Class thisClass = obj.getClass();\n\n Object value = null;\n Method m = null;\n if (jf.isCollection()) {\n m = getASetMethod (thisClass, \"addTo\" + jf.getGetSet(), jf.getObjectType());\n } else {\n m = getASetMethod (thisClass, \"set\" + jf.getGetSet(), jf.getObjectType());\n }\n\n if (jf instanceof JCompositeField) {\n XmlDescriptor fieldDesc = (XmlDescriptor)this.classList.get (jf.getObjectType());\n value = unmarshal (thisNode, context, fieldDesc);\n }\n else {\n\t\t\tvalue = getPrimitive (thisNode, jf, context);\n \n }\n\n m.invoke(obj, new Object[]{value});\n\t\t//\t\tif (jf.getObjectType ().equals (\"char\"))\n\t\t//System.out.println (\"was ok\");\n }", "public void setValue(T v){\n \telement = v;\n }", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "@Override\n\tvoid internalStorage(Class type,String line) throws NotEnoughElements {\n\t T t = createInternalT(type);\n\t t.load(line);\n\t insert(t);\n\t}", "public Element addElement(Element rootElement,String type,Document document){\n\t\t// define school elements \n\t\tElement node = document.createElement(type); \n\t\trootElement.appendChild(node);\n\t\treturn node;\n\t}", "protected abstract M createNewElement();", "@TimeComplexity(\"O(1)\")\n\tpublic E setElement(E eT)\n\t{\n\t\t//TCJ: the cost does not vary with input size so it is constant\n\t\tE temp = element;\n\t\telement = eT;\n\t\treturn temp;\n\t}", "public void setElement(WebElement element) {\n\t\t\r\n\t}", "public void setElement(String element) {\n this.element = element;\n }", "public void setElement(E e){\r\n\t\trotulo = e;\r\n\t}", "public void rbListAddElement() {\n rbProductType.clear();\n rbProductType.add(rbScs);\n rbProductType.add(rbSko);\n rbProductType.add(rbMko);\n rbProductType.add(rbZko);\n }", "public void addElement(Object ob) {\r\n\t\tif (ob == null) {\r\n\t\t\telements.add(TObject.nullVal());\r\n\t\t} else if (ob instanceof TObject || ob instanceof ParameterSubstitution || ob instanceof Variable || ob instanceof FunctionDef || ob instanceof Operator || ob instanceof StatementTree || ob instanceof TableSelectExpression) {\r\n\t\t\telements.add(ob);\r\n\t\t} else {\r\n\t\t\tthrow new Error(\"Unknown element type added to expression: \" + ob.getClass());\r\n\t\t}\r\n\t}", "public void newElement() {\r\n }", "public void setType (String type) { n.setAttribute(ATTNAMECOMMONPREFIX + ATTNAMESUFFIX_TYPE , type); }", "protected void processTypes()\n {\n wsdl.setWsdlTypes(new XSModelTypes());\n }", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "public void setType(String type)\n\t\t{\n\t\t\tElement typeElement = XMLUtils.findChild(mediaElement, TYPE_ELEMENT_NAME);\n\t\t\tif (type == null || type.equals(\"\")) {\n\t\t\t\tif (typeElement != null)\n\t\t\t\t\tmediaElement.removeChild(typeElement);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (typeElement == null) {\n\t\t\t\t\ttypeElement = document.createElement(TYPE_ELEMENT_NAME);\n\t\t\t\t\tmediaElement.appendChild(typeElement);\n\t\t\t\t}\n\t\t\t\ttypeElement.setTextContent(type);\n\t\t\t}\n\t\t}", "public ExtraJaxbClassModel setClazz(Class<?> clazz);", "public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}", "ObjectElement createObjectElement();", "@Override\r\n public void freeze(String nestedElement) {\n }", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "protected abstract void onElementRegistered(Level level, T element);", "void xsetType(org.apache.xmlbeans.XmlString type);", "Element() {\n\t}", "ProductUnit() {\n _elements = new Element[0];\n }", "private void setTipo() {\n if (getNumElementos() <= 0) {\n restartCelda();\n } else if (getNumElementos() > 1) { // Queda más de un elemento\n this.setTipoCelda(Juego.TVARIOS);\n } else { // Si queda solo un tipo de elemento, miramos si es un CR, edificio o un personaje\n if (this.contRecurso != null) {\n this.setTipoCelda(this.contRecurso.getTipo());\n } else if (this.edificio != null) {\n this.setTipoCelda(this.edificio.getTipo());\n } else if (!this.getPersonajes().isEmpty()) {\n this.setTipoCelda(this.getPersonajes().get(0).getTipo());\n }\n }\n }", "public void setRequiredType(SequenceType required) {\n requiredType = required;\n }", "public void setFieldElementType(QName fieldElementType) {\n this.fieldElementType = fieldElementType;\n }", "<T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);", "@Override\n\tpublic void setElementSize(int elementSize) {\n\t\t\n\t}", "public void setupSerialization(final X10ClassType astType, final ClassType firmType) {\n\t\tassert !astType.flags().isInterface();\n\n\t\tif (!astType.flags().isStruct()) {\n\t\t\tOO.setClassUID(firmType, maxClassUid++);\n\t\t}\n\n\t\tfinal SegmentType global = Program.getGlobalType();\n\n\t\tfinal String serializeMethodName =\n\t\t\t\tNameMangler.mangleGeneratedMethodName(astType, SERIALIZE_METHOD_NAME, SERIALIZE_METHOD_SIGNATURE);\n\t\tif (serializeMethodType == null)\n\t\t\tserializeMethodType = new MethodType(new firm.Type[] {Mode.getP().getType(), Mode.getP().getType()},\n\t\t\t\t\tnew firm.Type[] {});\n\n\t\tassert !serializeFunctions.containsKey(firmType);\n\n\t\tfinal Entity serEntity = new Entity(global, serializeMethodName, serializeMethodType);\n\t\tOO.setEntityBinding(serEntity, ddispatch_binding.bind_static);\n\t\tOO.setMethodExcludeFromVTable(serEntity, true);\n\t\tserializeFunctions.put(firmType, serEntity);\n\n\t\tfinal String deserializeMethodName =\n\t\t\t\tNameMangler.mangleGeneratedMethodName(astType, DESERIALIZE_METHOD_NAME, DESERIALIZE_METHOD_SIGNATURE);\n\t\tif (deserializeMethodType == null)\n\t\t\tdeserializeMethodType = new MethodType(new firm.Type[] {Mode.getP().getType(), Mode.getP().getType()},\n\t\t\t\t\tnew firm.Type[] {});\n\n\t\tfinal Entity deserEntity = new Entity(global, deserializeMethodName, deserializeMethodType);\n\t\tOO.setEntityBinding(deserEntity, ddispatch_binding.bind_static);\n\t\tOO.setMethodExcludeFromVTable(deserEntity, true);\n\t\tdeserializeFunctions.put(firmType, deserEntity);\n\t}", "private Object addElement(XmlElement e, Method method, Object[] args) {\n/* 167 */ Class<?> rt = method.getReturnType();\n/* */ \n/* */ \n/* 170 */ String nsUri = \"##default\";\n/* 171 */ String localName = method.getName();\n/* */ \n/* 173 */ if (e != null) {\n/* */ \n/* 175 */ if (e.value().length() != 0)\n/* 176 */ localName = e.value(); \n/* 177 */ nsUri = e.ns();\n/* */ } \n/* */ \n/* 180 */ if (nsUri.equals(\"##default\")) {\n/* */ \n/* 182 */ Class<?> c = method.getDeclaringClass();\n/* 183 */ XmlElement ce = c.<XmlElement>getAnnotation(XmlElement.class);\n/* 184 */ if (ce != null) {\n/* 185 */ nsUri = ce.ns();\n/* */ }\n/* */ \n/* 188 */ if (nsUri.equals(\"##default\"))\n/* */ {\n/* 190 */ nsUri = getNamespace(c.getPackage());\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 195 */ if (rt == void.class) {\n/* */ \n/* */ \n/* 198 */ boolean isCDATA = (method.getAnnotation(XmlCDATA.class) != null);\n/* */ \n/* 200 */ StartTag st = new StartTag(this.document, nsUri, localName);\n/* 201 */ addChild(st);\n/* 202 */ for (Object arg : args) {\n/* */ Text text;\n/* 204 */ if (isCDATA) { text = new Cdata(this.document, st, arg); }\n/* 205 */ else { text = new Pcdata(this.document, st, arg); }\n/* 206 */ addChild(text);\n/* */ } \n/* 208 */ addChild(new EndTag());\n/* 209 */ return null;\n/* */ } \n/* 211 */ if (TypedXmlWriter.class.isAssignableFrom(rt))\n/* */ {\n/* 213 */ return _element(nsUri, localName, rt);\n/* */ }\n/* */ \n/* 216 */ throw new IllegalSignatureException(\"Illegal return type: \" + rt);\n/* */ }", "public StringDt getTypeElement() { \n\t\tif (myType == null) {\n\t\t\tmyType = new StringDt();\n\t\t}\n\t\treturn myType;\n\t}", "public XmlElement() {\n }", "public void setElement(boolean value) {\r\n this.element = value;\r\n }", "ElementType getElementType();", "protected CollectionLikeType(TypeBase base, JavaType elemT)\n/* */ {\n/* 44 */ super(base);\n/* 45 */ this._elementType = elemT;\n/* */ }", "E createDefaultElement();", "public XmlElementDefinition(String elementName, XmlFieldSerializer serializer) {\r\n super();\r\n this.elementName = elementName;\r\n this.serializer = serializer;\r\n }", "protected void normalizeElemTypeForEquiv()\r\n\t\t\tthrows RestrizioniSpecException {\r\n\t\ttry {\r\n\t\t\tScope scope = new Scope(this.archiType);\r\n\t\t\tNormalizeParts normalizeParts = new NormalizeParts(scope);\r\n\t\t\tElemType elemType = normalizeParts.normalizeElemTypeFromAEI(this.idecl);\r\n\t\t\tthis.equivalenza.setEt(elemType);\r\n\t\t\t}\r\n\t\tcatch (NormalizeException e)\r\n\t\t\t{\r\n\t\t\tthrow new RestrizioniSpecException(e);\r\n\t\t\t}\r\n\t}", "public void setElementType(final GraphElementType elementType);", "@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}", "public ElementObjectSupport(ContainerI c, Element element) {\r\n\t\tthis(c, null, element);\r\n\t}", "@Override\n\tpublic Element getElement() {\n\t\treturn null;\n\t}", "public ElementObject(WebElement element) {\n // check null value\n super(0); //0 : Element is THERE\n this.element = element;\n this._originalStyle = element.getAttribute(\"style\");\n }", "public WModelObject getElementObject()\n\t{\n\t\tWModelObject elementObject = null;\n\n\t\ttry\n\t\t{\n\t\t\t//Class objClass = Class.forName(m_elementObjectClassName);\n\t\t\t//elementObject = (WModelObject)objClass.newInstance();\n\t\t\t//elementObject.setParent(this);\n\t\t\t//return elementObject;\n\n\t\t\tClass modelObjectClass = Class.forName(m_elementObjectClassName);\n\t\t\tClass[] parameterClass = {Class.forName(\"java.lang.String\"), Class.forName(\"java.lang.String\")};\n\t\t\tConstructor constructor = modelObjectClass.getConstructor(parameterClass);\n\t\t\tObject[] parameterObj = {\"\", getImplTypeName()}; //the first parameter is blank to indicate no driver\n\t\t\t\t\t\t\t\t\t //provided this model object\n\t\t\telementObject = (WModelObject)constructor.newInstance(parameterObj);\n\t\t\telementObject.setParent(this);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (NoSuchMethodException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InvocationTargetException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (ClassNotFoundException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot load element object class for WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (InstantiationException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Cannot instantiate element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t\tcatch (IllegalAccessException e)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(\"Illegal access when instantiating element object in WCollection: \" + m_elementObjectClassName + \" \" + e);\n\t\t\treturn elementObject;\n\t\t}\n\t}", "Object create(Element element) throws IOException, SAXException, ParserConfigurationException;", "@Override\n public void setElementId(String arg0)\n {\n \n }", "public RingBuffer(Class<T> element_type, int capacity) {\n int c=Util.getNextHigherPowerOfTwo(capacity); // power of 2 for faster mod operation\n buf=(T[])Array.newInstance(element_type, c);\n }", "public void addElement(Object obj);", "public boolean addTypeWithElements(Object pID, TypeWithElements pTypeWithElements) {\n\t\t\tif(!this.verifySecretID(pID)) return false;\n\t\t\t\n\t\t\tif((pTypeWithElements == null) || this.TypeWithElements.containsKey(pTypeWithElements.getTypeName()))\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tthis.TypeWithElements.put(pTypeWithElements.getTypeName(), pTypeWithElements);\n\t\t\treturn true;\n\t\t}", "ElementDefinition createElementDefinition();", "void emptyType(ComplexTypeSG type) throws SAXException;", "Type getElementType();", "public AbstractElement() {\n }", "public void type(WebElement ElementToType, String StringToType)\n\t{\n\t\ttry {\n\t\t\tif(ElementToType !=null)\n\t\t\t{\n\t\t\t\twait.until(ExpectedConditions. visibilityOf(ElementToType));\n\t\t\t\tElementToType.clear();\n\t\t\t\tElementToType.sendKeys(StringToType);\n\t\t\t\tLog.info(\"Enter the text, \"+StringToType);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\tLog.error(\"Element could not found\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLog.error( \"Error while writing the element\" + e.toString() );\n\t\t}\n\t}", "protected Frozen(TypeDescription typeDescription, LoadedTypeInitializer loadedTypeInitializer) {\n this.typeDescription = typeDescription;\n this.loadedTypeInitializer = loadedTypeInitializer;\n }", "public Element toXMLElement() {\n return null;\n }" ]
[ "0.6294139", "0.617699", "0.6153292", "0.61425567", "0.60393727", "0.60037494", "0.59537053", "0.586415", "0.58630884", "0.5858521", "0.58054453", "0.5801496", "0.57742757", "0.5758869", "0.5742853", "0.5742139", "0.55839837", "0.55671555", "0.5492812", "0.5485424", "0.5463173", "0.546091", "0.5455461", "0.54343104", "0.54233265", "0.54099065", "0.54078054", "0.5387961", "0.5383016", "0.5380116", "0.5276269", "0.52559924", "0.5217773", "0.5203962", "0.5180418", "0.5163063", "0.5151771", "0.50903606", "0.50791526", "0.507375", "0.5073424", "0.506738", "0.5067046", "0.5063768", "0.502922", "0.50177944", "0.5006436", "0.5004435", "0.4983967", "0.49801984", "0.4976798", "0.49602664", "0.4959024", "0.49539173", "0.49473292", "0.49422848", "0.49306524", "0.49266642", "0.49244684", "0.49228907", "0.49118942", "0.49107036", "0.49006104", "0.48882756", "0.488706", "0.4876333", "0.48630172", "0.4861428", "0.48413798", "0.48252872", "0.4819024", "0.481302", "0.4809609", "0.48067886", "0.47939092", "0.47931024", "0.47902575", "0.47856015", "0.47823694", "0.47775018", "0.4776118", "0.4768961", "0.4761804", "0.47453755", "0.4730478", "0.4723203", "0.4719363", "0.47131684", "0.47123826", "0.47023273", "0.4695739", "0.46887317", "0.46666962", "0.46590415", "0.46564507", "0.46543506", "0.46536878", "0.46483806", "0.46467355", "0.46442732" ]
0.49321753
56
Gets the number of elements produced in total by this function.
public int getNumElements() { return numElements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTotalElements();", "public long getTotal() {\r\n\t\treturn page.getTotalElements();\r\n\t}", "Long getNumberOfElement();", "public int totalNum(){\n return wp.size();\n }", "public synchronized int getNumberOfItems(){\n int totalItems=0;\n \n for(ShoppingCartItem item : getItems()){\n //we sum the quantity of products for each item\n totalItems += item.getQuantity();\n }\n \n return totalItems;\n }", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "int getTotalCount();", "public int getTotalCount() {\n return totalCount;\n }", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public abstract Integer getNumberOfElements();", "public int getTotal () {\n\t\treturn total;\n\t}", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "@Override\r\n\tpublic int totalCount() {\n\t\treturn sqlSession.selectOne(namespace + \".totalCount\");\r\n\t}", "public int getTotal()\n\t{\n\t\treturn total;\n\t\t\n\t}", "public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }", "public int getUnitCount() {\n return _elements.length;\n }", "public int getNumberOfElements();", "public int getTotalSize();", "public int getTotal() {\n\t\treturn total;\n\t}", "private int numberOfStudents() {\n int sum = 0;\n for (int student : this.studentList) {\n sum += student;\n }\n return sum;\n }", "@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "public int getTotal () {\n return total;\n }", "public int getTotal() {\n\t\t\treturn total;\n\t\t}", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "int getTotalSize();", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n return total;\n }", "public int getTotalItems()\n {\n return totalItems;\n }", "public int getTotal() {\n\t\treturn this.total;\n\t}", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "Integer total();", "public int totalAllocatedOrders();", "public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}", "public int getTotRuptures();", "public int getNumOfElements() {\n return numOfElements;\n }", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "public Long getTotalCount() {\n\t\treturn this.totalCount;\n\t}", "public long getTotalCount() {\n return _totalCount;\n }", "public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }", "public Long getTotalCount() {\r\n return totalCount;\r\n }", "@Override\r\n\tpublic long getTotal() {\n\t\treturn 0;\r\n\t}", "public int total() {\n return _total;\n }", "public java.math.BigInteger getTotalResults()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TOTALRESULTS$4);\n if (target == null)\n {\n return null;\n }\n return target.getBigIntegerValue();\n }\n }", "public Long getElementCount();", "public long getNbTotalItems() {\n return nbTotalItems;\n }", "boolean hasTotalElements();", "public int getTotal() {\n return total;\n }", "public int getTotalResultsAvailable() {\n\t\tint total = 0;\n\t\tif (results != null) {\n\t\t\tBigInteger count = results.getTotalResultsAvailable();\n\t\t\ttotal = count.intValue();\n\t\t}\n\t\treturn total;\n\t}", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int total() {\n return this.total;\n }", "Integer getTotalStepCount();", "public int size() {\n return numOfElements;\n }", "@Override\n public int size() {\n int totalSize = 0;\n // iterating over collectionList\n for (Collection<E> coll : collectionList)\n totalSize += coll.size();\n return totalSize;\n }", "public int getNrOfElements() {\n return this.nrOfElements;\n }", "public int totalValue() {\r\n\t\tint total = 0;\r\n\t\tfor(Item item: items) {\r\n\t\t\ttotal = total + item.getValue();\r\n\t\t}\r\n\t\treturn total;\r\n\t}", "int getTotalLength() {\n synchronized (lock) {\n return cache.getTotalLength();\n }\n }", "public int getNumTotal() {\n return nucleiSelected.size();\n }", "public long getTotal() {\n return total;\n }", "public long getTotal() {\n return total;\n }", "public int totalRowsCount();", "public int getTotalSize() {\n return totalSize_;\n }", "public int size()\n { \t\n \t//initialize a counter to measure the size of the list\n int sizeVar = 0;\n //create local node variable to update in while loop\n LinkedListNode<T> localNode = getFirstNode();\n \n //update counter while there are still nodes\n while(localNode != null)\n {\n sizeVar += 1;\n localNode = localNode.getNext();\n }\n \n return sizeVar;\n }", "public int getTotalSize() {\n return totalSize_;\n }", "long getTotalProductsCount();", "@Override\n\tpublic int size() {\n\t\tint s = valCount; // saves value of current node\n\t\tfor (int i = 0; i < childCount; ++i) { // then checks all children\n\t\t\ts += children[i].size();\n\t\t}\n\t\treturn s;\n\t}", "public long getTotal() { return total; }", "public long getTotal() { return total; }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public int getTotalValue() {\n\t\tint totalValue = 0;\n\t\tfor(Items temp : this.getAnchors()) {\n\t\t\tif (temp == null)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\ttotalValue = totalValue + temp.getTotalValue();\n\t\t}\n\t\treturn totalValue;\n\t}", "public int total() {\n int summation = 0;\n for ( int value : map.values() ) {\n summation += value;\n }\n return summation;\n }", "public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}", "int totalNumberOfNodes();", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public double totalQuantity() {\r\n\t\tdouble t = 0;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) t += quantity[i][j][k];\r\n\t\treturn t;\r\n\t}", "public int getNumElements()\n {\n return numElements;\n }", "@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}", "public int size() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] != null) {\r\n temp++;\r\n }\r\n }\r\n return temp;\r\n }", "public int getTotalReturnCount(){\n return totalReturnCount;\n }", "public int countResults() \n {\n return itsResults_size;\n }", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public long getTotalSize() {\n return totalSize;\n }", "public int getTotal() {\n int value = 0;\n for (Map.Entry<Integer, Integer> entry : gramma.entrySet()) {\n value += entry.getKey() * entry.getValue();\n }\n return value;\n }", "public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }", "public int size(){\n\t\treturn howMany; \n\t}", "public int totalOrdersTaken();", "public Integer getTotalItemCount() {\n return totalItemCount;\n }", "public int getTotalINTS() {\n\t\treturn totalINTS;\n\t}", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }", "@Override\r\n\tpublic int getTotal() {\n\t\treturn mapper.count();\r\n\t}", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "public BigInteger getTotal()\n\t{\n\t\treturn total;\n\t}", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "@Override\n\tpublic int getTotalNumber() {\n\t\treturn totalNum;\n\t}", "public int sumOfElements(){\n\t\tint sum = 0;\n\t\tNode temp = this.head;\n\t\twhile(temp != null){\n\t\t\tsum += temp.data;\n\t\t\ttemp = temp.next;\n\t\t}\n\t\treturn sum;\n\t}", "public int total() {\n\t \treturn totalWords;\n\t }" ]
[ "0.83655334", "0.7929251", "0.7520345", "0.74714106", "0.74680525", "0.7435787", "0.7431947", "0.73808205", "0.7322166", "0.73026013", "0.73026013", "0.7301569", "0.7267986", "0.7251538", "0.7251538", "0.72405154", "0.7232222", "0.71898544", "0.7186415", "0.71854943", "0.7154205", "0.71480876", "0.71204233", "0.71189463", "0.7110577", "0.7095013", "0.70807487", "0.70802265", "0.70500946", "0.70500946", "0.70355505", "0.70283073", "0.7018562", "0.7012079", "0.70035386", "0.70024204", "0.6999168", "0.6987694", "0.69827175", "0.6975485", "0.69695574", "0.69649357", "0.69644165", "0.6952199", "0.69509345", "0.6921878", "0.6917348", "0.69127864", "0.6912122", "0.6910819", "0.69075894", "0.6907346", "0.69043595", "0.6900638", "0.689075", "0.688907", "0.68719155", "0.6864225", "0.68623626", "0.6857211", "0.6855171", "0.68551326", "0.6851349", "0.6851349", "0.68497264", "0.68441874", "0.68419826", "0.6833646", "0.6827623", "0.6819864", "0.6813769", "0.6813769", "0.68123496", "0.68045354", "0.6802824", "0.67923933", "0.67883456", "0.6788224", "0.67807364", "0.6774546", "0.677449", "0.6764311", "0.6762305", "0.6756694", "0.6752688", "0.674965", "0.6747366", "0.67369115", "0.6736064", "0.67354935", "0.6732334", "0.6731352", "0.67308766", "0.67208046", "0.6720763", "0.6719361", "0.6709886", "0.67057115", "0.6704713", "0.66903186", "0.66878486" ]
0.0
-1
Gets the number of elements emitted so far.
public int getNumElementsEmitted() { return numElementsEmitted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getNumberOfElement();", "public int getNumOfElements() {\n return numOfElements;\n }", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\n }", "public int getNrOfElements() {\n return this.nrOfElements;\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int getNumberOfElements();", "public int getNumElements()\n {\n return numElements;\n }", "public int getNumElements() {\n return numElements;\n }", "public int getNumElements() {\n return numElements;\n }", "public final int size() {\n int size = 0;\n final Iterator iterator = this.iterator();\n while (iterator.hasNext()) {\n size++;\n iterator.next();\n }\n return size;\n }", "public int getNumElements() {\n\t\treturn numElements;\n\t}", "public abstract Integer getNumberOfElements();", "public int size() {\n return numOfElements;\n }", "public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }", "public int getNumElementsRemoved() {\n return elementsRemoved;\n }", "public int size() {\n\t\treturn elements.size();\n\t}", "public int size() {\n\n return elements.size();\n }", "public int size() {\n\t\t// DO NOT CHANGE THIS METHOD\n\t\treturn numElements;\n\t}", "public int size() {\r\n\t\treturn elements.size();\r\n\t}", "public int size() {\n return elements.size();\n }", "public synchronized int size() {\n return count;\n }", "public int size() {\n\t\treturn this.elements.size();\n\t}", "@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}", "public int size() {\r\n int temp = 0;\r\n for (int i = 0; i < elem.length; i++) {\r\n if (elem[i] != null) {\r\n temp++;\r\n }\r\n }\r\n return temp;\r\n }", "public int size() {\r\n\t\treturn elements;\r\n\t}", "public int size() {\n\t\treturn elements;\n\t}", "public int size() {\n return elements;\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public int size()\r\n {\r\n return count;\r\n }", "public static int numElements() {\n return values().length;\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public int size() {\n\t\tint result = 0;\n\t\tfor (E val: this)\n\t\t\tresult++;\n\t\treturn result;\n\t}", "public int getCount()\r\n {\r\n return counts.peekFirst();\r\n }", "public final int size()\n {\n return m_count;\n }", "public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}", "public int size() {\n return count;\n }", "public int size() {\n\t\t//Because we're the only consumer, we know nothing will be removed while\n\t\t//we're computing the size, so we know there are at least (rear - front)\n\t\t//elements already added.\n\t\treturn (int)(rear.get() - front.get());\n\t}", "public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "public Long getElementCount();", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size() {\n\t\treturn count;\n\t}", "public int size()\n {\n return count;\n }", "public int getUnitCount() {\n return _elements.length;\n }", "public int size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int getNumElements() {\n return theMap.size();\n }", "public int count() throws TrippiException {\n try {\n int n = 0;\n while (hasNext()) {\n next();\n n++;\n }\n return n;\n } finally {\n close();\n }\n }", "public int size() { return count; }", "public int size()\n\t{\n\t\treturn m_elements.size();\n\t}", "public int sizeOfEventArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(EVENT$0);\n }\n }", "public int size() {\n\t\tint numElements = 0;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (list[i] != null) {\n\t\t\t\tnumElements++;\n\t\t\t}\n\t\t}\n\t\treturn numElements;\n\t}", "public int getSize() {\n\t\treturn numElements;\n\t}", "int getTotalElements();", "@Override\n\tpublic int size() {\n\t\treturn this.numberOfElements;\n\t}", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public int count() {\n\t\treturn count;\n\t}", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "public int size() {\n return numItems;\n }", "public int size() {\n \tint currentSize = 0;\n \t\n \tIterator<E> iterateSet = this.iterator();\n \t\n \t// calculates number of elements in this set\n \twhile(iterateSet.hasNext()) {\n \t\titerateSet.next();\n \t\tcurrentSize++;\t\t\n \t}\n \t\n \treturn currentSize;\n \t\n }", "@Override\r\n\tpublic int size() {\n\t\treturn count;\r\n\t}", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int size() {\n\t\treturn this.elts.length;\n\t}", "public int count() {\r\n return count;\r\n }", "public double getLength() {\n return count;\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int size() {\n return nItems;\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn count;\r\n\t}", "public synchronized int getCount()\n\t{\n\t\treturn count;\n\t}", "public int getCount() {\n\t\treturn events.size();\n\t}", "public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int count() {\n\t\treturn sizeC;\n\t}", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public long getCount() {\n return counter.get();\n }", "public int getLength() {\n return collection.size();\n }", "public int count() {\n return this.count;\n }", "public int size() {\r\n return N;\r\n }", "public int count() {\n return count;\n }", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int size() {\n return N;\n }", "public int length() {\n return numberOfItems;\n }", "public int size()\n\t\t{\n\t\treturn N;\n\t\t}", "public int size() {\n\t\treturn array.length();\n\t}", "public int getLength() {\r\n int length = 0;\r\n \r\n Iterator it = collection.iterator();\r\n \r\n while(it.hasNext()) {\r\n length += ((Chunk)it.next()).getSize();\r\n }\r\n \r\n return length;\r\n }", "public long getCount() {\n long count = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n count += encoder.getCount();\n }\n }\n \n return count;\n }", "public synchronized int getCount () {\n int c = count;\n count = 0;\n return c;\n }" ]
[ "0.732033", "0.7312841", "0.73069215", "0.7304938", "0.72671825", "0.7265759", "0.72410303", "0.7212647", "0.7212647", "0.71871334", "0.71870106", "0.7147151", "0.7141637", "0.71155167", "0.7099872", "0.7089782", "0.7082757", "0.7082686", "0.7065871", "0.7062867", "0.70620316", "0.69891346", "0.69552094", "0.6936437", "0.6934449", "0.69327796", "0.69205225", "0.6914626", "0.6910185", "0.6906064", "0.68910927", "0.6887997", "0.6887154", "0.6882718", "0.6882427", "0.6865932", "0.68561745", "0.6852461", "0.68472975", "0.6834559", "0.6832085", "0.6825435", "0.6825435", "0.6825435", "0.6818689", "0.67977786", "0.6793933", "0.6771451", "0.6771166", "0.6768311", "0.67633355", "0.67632705", "0.6761875", "0.6751633", "0.6733703", "0.6713834", "0.66945374", "0.6692758", "0.66894436", "0.6680027", "0.66798455", "0.6672112", "0.6668705", "0.66645193", "0.6663858", "0.66608316", "0.6650774", "0.6643044", "0.66425383", "0.6623844", "0.66213095", "0.66169333", "0.66128343", "0.6604464", "0.65927535", "0.65927535", "0.65927535", "0.65927535", "0.65927535", "0.6585925", "0.65852433", "0.6577399", "0.65764236", "0.6572882", "0.65721047", "0.65702575", "0.65486926", "0.6548259", "0.6548259", "0.6548259", "0.6548259", "0.6548259", "0.6548259", "0.6548259", "0.65420717", "0.6541442", "0.6541135", "0.6537917", "0.6531031", "0.65284956" ]
0.82992744
0
Utilities Verifies that all elements in the collection are nonnull, and are of the given class, or a subclass thereof.
public static <OUT> void checkCollection(Collection<OUT> elements, Class<OUT> viewedAs) { checkIterable(elements, viewedAs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> void checkNull(Collection<T> obj){\n if(obj == null || obj.size() == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n obj.forEach(AssertUtil::checkNull);\n }", "@Test\n\tvoid testCheckClass3() {\n\t\tassertFalse(DataChecker.checkClass(new Integer(1), null));\n\t}", "private boolean checkUnreachedClassesForContainersAndSubclasses() {\n Iterator<EClass> iterator = unreachedClasses.iterator();\n while (iterator.hasNext()) {\n EClass eClass = iterator.next();\n\n if (grabIncomingContainments && addIfContainer(eClass) || grabSubClasses && addIfContainedSubClass(eClass)) {\n iterator.remove();\n return true;\n }\n }\n return false;\n }", "@Test\r\n public void test_containNull_False() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertFalse(\"'containNull' should be correct.\", res);\r\n }", "@Test\r\n public void test_containNull_True() {\r\n Collection<?> collection = Arrays.asList(new Object[] {1, TestsHelper.EMPTY_STRING, null});\r\n\r\n boolean res = Helper.containNull(collection);\r\n\r\n assertTrue(\"'containNull' should be correct.\", res);\r\n }", "public boolean isAcceptable(Class<? extends DataElement> clazz);", "public void validate (Set classes) throws ValidationException;", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public Collection hasAuxClasss(Collection auxClasssToCheck);", "@Test\n\tvoid testCheckClass4() {\n\t\tassertFalse(DataChecker.checkClass(null, null));\n\t}", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected static boolean checkTypeReferences() {\n Map<Class<?>, LinkedList<Class<?>>> missingTypes = new HashMap<>();\n for (Map.Entry<String, ClassProperties> entry : classToClassProperties.entrySet()) {\n String className = entry.getKey();\n Class<?> c = lookupClass(className);\n Short n = entry.getValue().typeNum;\n if (marshalledTypeNum(n)) {\n Class<?> superclass = getValidSuperclass(c);\n if (superclass != null)\n checkClassPresent(c, superclass, missingTypes);\n LinkedList<Field> fields = getValidClassFields(c);\n for (Field f : fields) {\n Class<?> fieldType = getFieldType(f);\n checkClassPresent(c, fieldType, missingTypes);\n }\n }\n }\n if (missingTypes.size() > 0) {\n for (Map.Entry<Class<?>, LinkedList<Class<?>>> entry : missingTypes.entrySet()) {\n Class<?> c = entry.getKey();\n LinkedList<Class<?>> refs = entry.getValue();\n String s = \"\";\n for (Class<?> ref : refs) {\n if (s != \"\")\n s += \", \";\n s += \"'\" + getSimpleClassName(ref) + \"'\";\n }\n Log.error(\"Missing type '\" + getSimpleClassName(c) + \"' is referred to by type(s) \" + s);\n }\n Log.error(\"Aborting code generation due to missing types\");\n return false;\n }\n else\n return true;\n }", "@Test\r\n\tpublic void testContainsClass() {\r\n\t\tassertTrue(breaku1.containsClass(class1));\r\n\t\tassertTrue(externu1.containsClass(class1));\r\n\t\tassertTrue(meetingu1.containsClass(class1));\r\n\t\tassertTrue(teachu1.containsClass(class1));\r\n\t}", "protected boolean isCollection(Class clazz) {\n\n return Collection.class.isAssignableFrom(clazz);\n }", "public static <T> Collection<T> requireNullOrNonEmpty(Collection<T> col) {\n if (col != null && col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }", "public boolean isTrueCollectionType()\n/* */ {\n/* 236 */ return Collection.class.isAssignableFrom(this._class);\n/* */ }", "@Override\n protected boolean accept(Field f) {\n\t\t return !Collection.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t!List.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t\t\t!BaseEntity.class.isAssignableFrom(f.getType())\n\t\t \t\t\t\t&& acceptToStringField(f);\n\t\t }", "public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }", "@Test\n\tvoid testCheckClass1() {\n\t\tassertTrue(DataChecker.checkClass(new Integer(1), new Integer(1)));\n\t}", "@Test\n public void testIsValid_NullProducesOrNullAccepts() {\n CollectorWithNullProducesOrAndAccepts collector = new CollectorWithNullProducesOrAndAccepts();\n Set errors = validator.validate(collector);\n assertFalse(errors.isEmpty());\n }", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "private void AssertNotNull(List<Object> posts) {\n\t\t\n\t}", "@Override\r\n public boolean checkElements(SequenceConstructionExpression owner) {\r\n SequenceRange self = this.getSelf();\r\n Expression rangeLower = self.getRangeLower();\r\n Expression rangeUpper = self.getRangeUpper();\r\n ElementReference rangeLowerType = rangeLower == null? null: rangeLower.getType();\r\n ElementReference rangeUpperType = rangeUpper == null? null: rangeUpper.getType();\r\n return (rangeLowerType == null || rangeLowerType.getImpl().isInteger()) && \r\n (rangeUpperType == null || rangeUpperType.getImpl().isInteger());\r\n }", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n\tvoid testCheckNulls3() {\n\t\tObject[] o = {null,null,null,null,null};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "public static <T> Collection<T> requireNonEmpty(Collection<T> col) {\n if (col.isEmpty()) {\n throw new IllegalArgumentException();\n }\n return col;\n }", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testAllNull() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(null);\r\n\t\t\t// check if set is null \r\n \t\t\tassertNull(testingSet);\r\n\t\t}", "public boolean hasAllAuxClasss(Collection auxClasssToCheck);", "private void checkCollection(SnmpCollection collection) {\n if (collection.getSystems() == null)\n collection.setSystems(new Systems());\n if (collection.getGroups() == null)\n collection.setGroups(new Groups());\n }", "private static boolean validateClass(Class cls)\n {\n return PSGroupProviderInstance.class.isAssignableFrom(cls);\n }", "public static boolean compatibleClasses (Class<?>[] lhs, Class<?>[] rhs)\n {\n if (lhs.length != rhs.length) {\n return false;\n }\n \n for (int i = 0; i < lhs.length; ++i) {\n if (rhs[i] == null || rhs[i].equals(Void.TYPE)) {\n if (lhs[i].isPrimitive()) {\n return false;\n } else {\n continue;\n }\n }\n \n if (!lhs[i].isAssignableFrom(rhs[i])) {\n Class<?> lhsPrimEquiv = primitiveEquivalentOf(lhs[i]);\n Class<?> rhsPrimEquiv = primitiveEquivalentOf(rhs[i]);\n if (!primitiveIsAssignableFrom(lhsPrimEquiv, rhsPrimEquiv)) {\n return false;\n }\n }\n }\n \n return true;\n }", "@Override\n protected void checkSubclass() {\n }", "@SuppressWarnings(\"PMD.AvoidInstantiatingObjectsInLoops\")\n public Feedback onlyInstantiatedIfNull(ClassOrInterfaceDeclaration classToVerify) {\n List<Feedback> childFeedbacks = new ArrayList<>();\n String feedbackString =\n \"Object can be instatiated even if there is another instace created\";\n AtomicBoolean onlyIfNull = new AtomicBoolean(true);\n classToVerify.findAll(ObjectCreationExpr.class).forEach(objInstExpr -> {\n if (objInstExpr.getTypeAsString().equals(classToVerify.getNameAsString())) {\n Node node = objInstExpr.getParentNodeForChildren();\n while (true && !isInstantiated) {\n if (node instanceof IfStmt) {\n IfStmt ifStmtNode = (IfStmt) node;\n if (ifStmtNode.getCondition().isBinaryExpr()) {\n if (checkForNull(ifStmtNode) && checkForType(ifStmtNode, instanceVar)) {\n if (ifStmtNode.hasElseBlock()) {\n ifStmtNode.getElseStmt().get().findAll(ObjectCreationExpr.class)\n .forEach(objCreateExpr -> {\n if (objCreateExpr.getTypeAsString().equals(\n instanceVar.getVariable(0)\n .getTypeAsString())) {\n childFeedbacks.add(Feedback\n .getNoChildFeedback(\n feedbackString,\n new FeedbackTrace(\n objInstExpr)));\n }\n });\n }\n onlyIfNull.compareAndSet(true, true);\n } else {\n childFeedbacks.add(Feedback.getNoChildFeedback(\n \"Object can be instantiated even if there is \" +\n \"another instance created\", new FeedbackTrace(objInstExpr)));\n }\n } else {\n childFeedbacks.add(Feedback.getNoChildFeedback(\n \"Object can be instantiated even if there is \" +\n \"another instance created\", new FeedbackTrace(objInstExpr)));\n }\n break;\n } else if (node instanceof ClassOrInterfaceDeclaration) {\n childFeedbacks.add(Feedback.getNoChildFeedback(\n \"Object can be instantiated even if there is \" +\n \"another instance created\", new FeedbackTrace(objInstExpr)));\n break;\n }\n node = node.getParentNode().get();\n }\n\n }\n });\n if (onlyIfNull.get()) {\n isInstantiated = true;\n }\n if (childFeedbacks.isEmpty()) {\n return Feedback.getSuccessfulFeedback();\n }\n return Feedback.getFeedbackWithChildren(new FeedbackTrace(classToVerify), childFeedbacks);\n }", "@Override\n public Feedback verify(ClassOrInterfaceDeclaration classToVerify) {\n List<Feedback> childFeedbacks = new ArrayList<>();\n childFeedbacks.add(hasPrivateConstructor(classToVerify));\n childFeedbacks.add(findMultipleInstances(classToVerify));\n for (FieldDeclaration fieldDeclaration : VariableReader.readVariables(classToVerify)) {\n childFeedbacks.add(staticInstance(fieldDeclaration, classToVerify.getNameAsString()));\n }\n childFeedbacks.add(onlyInstantiatedIfNull(classToVerify));\n if (!isInstantiated) {\n childFeedbacks.add(Feedback.getNoChildFeedback(\n \"There is no way to instantiate the \" + \"class\", new FeedbackTrace(classToVerify)));\n }\n return Feedback.getFeedbackWithChildren(new FeedbackTrace(classToVerify), childFeedbacks);\n\n }", "@Override\n public boolean containsAll(Collection<?> c) {\n for (Object o : c) {\n if (!contains(o)) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "@Override\n\tpublic boolean containsAll(Collection<?> c) {\n\t\treturn false;\n\t}", "protected abstract <T> Collection<T> createCollection(Class<T> clazz);", "@Test\r\n\tpublic void testGetClasses() {\r\n\t\tassertTrue(breaku1.getClasses().contains(class1));\r\n\t\tassertTrue(externu1.getClasses().contains(class1));\r\n\t\tassertTrue(meetingu1.getClasses().contains(class1));\r\n\t\tassertTrue(teachu1.getClasses().contains(class1));\r\n\r\n\t\tassertEquals(classes, breaku1.getClasses());\r\n\t\tassertEquals(classes, externu1.getClasses());\r\n\t\tassertEquals(classes, meetingu1.getClasses());\r\n\t\tassertEquals(classes, teachu1.getClasses());\r\n\r\n\t\tassertFalse(classes1 == breaku1.getClasses());\r\n\t\tassertFalse(classes1 == externu1.getClasses());\r\n\t\tassertFalse(classes1 == meetingu1.getClasses());\r\n\t\tassertFalse(classes1 == teachu1.getClasses());\r\n\t}", "public boolean containsAll(Collection<? extends Type> items);", "public static <T> boolean m6262a(Collection<T> collection) {\n return collection == null || collection.isEmpty();\n }", "private void verifyExceptionThrown(Exception thrown, Class expected) {\n\n boolean exceptionFound = false;\n Throwable cause = thrown;\n while (cause != null) {\n if (expected.isInstance(cause)) {\n // good\n exceptionFound = true;\n break;\n }\n else {\n cause = cause.getCause();\n }\n }\n if (!exceptionFound) {\n Assert.fail(expected.getSimpleName() + \" was expected but not thrown\", thrown);\n }\n }", "static void checkTargetClass(Class<?> targetClass)\n {\n if (targetClass == null)\n {\n throw new IllegalArgumentException(\"Target class must not be null!\");\n }\n }", "public boolean isArray(Class cls) {\n return cls != null && (cls.isArray() || Collection.class.isAssignableFrom(cls) || Externalizable.class.isAssignableFrom(cls) || Map.class.isAssignableFrom(cls) || Map.Entry.class.isAssignableFrom(cls));\n }", "private boolean isBaseClassValid() {\n\n\t\tboolean valid = false;\n\n\t\tif (this.getBaseClass() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\tString[] types = BaseClasses.getAllAvailableTypes();\n\n\t\tfor (int i = 0; i < types.length; i++) {\n\t\t\tvalid = valid || types[i].compareToIgnoreCase(this.getBaseClass()) == 0;\n\t\t}\n\n\t\treturn valid;\n\t}", "public abstract boolean isCollection(T type);", "@Test\n public void testGetPropertyValueSetNullCollection(){\n assertEquals(emptySet(), CollectionsUtil.getPropertyValueSet(null, \"id\", Integer.class));\n }", "public static <T> T getByClass(Collection<?> collection, Class<T> clazz) {\n for (Object elem : collection) {\n if (clazz.isInstance(elem)) return (T) elem;\n }\n return null;\n }", "@Override\n\tpublic boolean containsAll(Collection<?> c) {\n\t\tthrow new NotImplementedException(\"Not yet implemented\"); \n\t}", "public static boolean ensureNoNullField(Class<?> cls, Object obj) {\n\t\tif(AppUtils.isReleaseVersion()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (cls == null || obj == null || !cls.isInstance(obj)) {\n\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \",object: \" + obj);\n\t\t}\n\t\tfor (Field field : cls.getDeclaredFields()) {\n\t\t\ttry {\n\t\t\t\ttry {\n\t\t\t\t\tObject fieldvalue = field.get(obj);\n\t\t\t\t\tif (fieldvalue == null) {\n\t\t\t\t\t\tthrow new NullFieldException();\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IllegalArgumentException(\"Class: \" + cls + \" Field: \" + field + \" Object: \" + obj + \" doesn't match.\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean canExecute(Collection<? extends EObject> selections) {\n\t\tfor (EObject eObject : selections) {\n\t\t\tif (!(eObject instanceof UnknowClass)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean supports(Class<?> valueClass);", "@Override\n\t\tpublic boolean containsAll(Collection<?> c) {\n\t\t\treturn false;\n\t\t}", "@Test\n public void Q_IsFoundAny_ArgumentNullExceptionExpected() {\n exception.expect(IllegalArgumentException.class);\n\n ArrayList<QMock> mocks = null;\n new Q<QMock>(mocks);\n }", "public void assertNotEmpty(Object[] objArr) {\n if (objArr == null || objArr.length == 0) {\n throw new IllegalArgumentException(\"Arguments is null or its length is empty\");\n }\n }", "public boolean containsAll(Collection<?> arg0) {\n\t\treturn false;\n\t}", "public void checkTypes() {\n this.root.accept(this);\n }", "public static <T> void checkNull(T[] obj){\n if(obj == null || obj.length == 0){\n throw new IllegalArgumentException(\"Object is null\");\n }\n for(T val:obj){\n checkNull(val);\n }\n }", "public static <T> Collection<T> requireNullOrNonEmpty(Collection<T> col, String message) {\n if (col != null && col.isEmpty()) {\n throw new IllegalArgumentException(message);\n }\n return col;\n }", "@Test\n\tvoid testCheckClass6() {\n\t\tassertFalse(DataChecker.checkClass(\"Test\" , new Integer(1)));\n\t}" ]
[ "0.6312417", "0.57873654", "0.5766979", "0.565231", "0.56476367", "0.562783", "0.5564508", "0.55119324", "0.5498039", "0.54946554", "0.5490847", "0.5487976", "0.5487976", "0.5487976", "0.5453962", "0.54230976", "0.5404667", "0.53928125", "0.5384617", "0.53780323", "0.53760386", "0.5335908", "0.5312973", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5301829", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.5299684", "0.52932364", "0.52878785", "0.5284642", "0.5270286", "0.5241498", "0.5241498", "0.5241498", "0.5203401", "0.5203401", "0.5203401", "0.51955396", "0.5183768", "0.51701415", "0.5165284", "0.514138", "0.5123869", "0.511491", "0.5095205", "0.5078828", "0.5076263", "0.5065751", "0.50589824", "0.5049011", "0.50477904", "0.5045973", "0.5030885", "0.5028713", "0.50255907", "0.50104874", "0.500774", "0.5001229", "0.49987018", "0.49871498", "0.49768814", "0.49755955", "0.49748778", "0.4970412", "0.4960553", "0.49529397", "0.49396762", "0.49305356", "0.49302924", "0.49217764", "0.49207118", "0.49004245", "0.4898602" ]
0.62552947
1
The method is called to notify all observers when the Subject's state has changed
void notifyObservers();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void update(Subject subject) {\n\t\tobserverState = ((ConcreteSubject)subject).getSubjectState();\n\t}", "@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}", "@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }", "@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}", "public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "public void subjectChanged(){\n return; //TODO codavaj!!\n }", "public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }", "@Override\r\n\tpublic void notifyObservers(){\r\n\t\tfor(IObserver obs : observers){\r\n\t\t\tobs.update(this, selectedEntity);\r\n\t\t}\r\n\t\tselectedEntity = null;\r\n\t}", "public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }", "@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}", "@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "public void notifyObservers() {}", "@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}", "private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}", "@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }", "public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }", "protected void notifyObservers() {\n os.notify(this, null);\n }", "public void notifyAllObservers() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update();\n\t\t}\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "public void notifyAllObservers(){\n\t\tthis.notifyAllObservers(null);\n\t}", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}", "@Override\n\tpublic void notifyAllObservers() {\n\t\tmyTurtle.notifyObservers();\n\t}", "private void notifyObservers() {\n\t\tfor (Observer observer : subscribers) {\n\t\t\tobserver.update(theInterestingValue); // we can send whole object, or just value of interest\n\t\t\t// using a pull variant, the update method will ask for the information from the observer\n\t\t\t// observer.update(this)\n\t\t}\n\t}", "public void notifyStudentsObservers() {\n \t\tfor (IStudentsObserver so : studentsObservers) {\n \t\t\tso.updateStudents();\n \t\t}\n \t}", "public void atacar() {\n notifyObservers();\n }", "@Override\n\tpublic void notifyObserver() {\n\t\tEnumeration<ObserverListener> enumd = vector.elements();\n\t\twhile (enumd.hasMoreElements()) {\n\t\t\tObserverListener observerListener = enumd\n\t\t\t\t\t.nextElement();\n\t\t\tobserverListener.observer();\n\t\t\tobserverListener.obsupdata();\n\t\t}\n\t}", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "@Override\n\tpublic void NotifyObserver() {\n\n\t}", "public void notifyObservers(){\n\t\tfor (ModelObserver c : controllers){\n\t\t\tc.update();\n\t\t}\n\t}", "@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }", "static void NotifyCorrespondingObservers() {}", "public interface Observer {\n //method to update the observer, used by subject\n public void update();\n\n}", "public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }", "private void notifyObservors() {\n this.obervors.forEach(Obervor::modelChanged);\n }", "public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}", "public void notifyObservers() {\n\t\tfor(ElevatorObserver obs: observers) {\n\t\t\tobs.elevatorDidFinishTask(this);\n\t\t}\n\t}", "public void stateChange(Energy energy) {\n Iterator it = subscriber.iterator();\n while (it.hasNext()) {\n ((EnergyObserver) it.next()).stateChange(energy);\n }\n }", "private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "@Override\n public void notifyUnitObservers() {\n for(UnitObserver unitObserver : unitObservers){\n unitObserver.update(entities.returnUnitRenderInformation());\n entities.setUnitObserver(unitObserver);\n }\n }", "void\n notifyChange() {\n this.notifyChange = true;\n synchronized (this.changeMonitor) {\n this.changeMonitor.notifyAll();\n }\n }", "void notifyAllAboutChange();", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}", "public void notifyObserver() {\n\r\n for (Observer observer : observers) {\r\n\r\n observer.update(stockName, price);\r\n\r\n }\r\n }", "public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }", "protected void fireStateChanged() {\n\t\tChangeEvent changeEvent = new ChangeEvent(this);\n\n\t\tfor (ChangeListener changeListener : changeListeners) {\n\t\t\tchangeListener.stateChanged(changeEvent);\n\t\t}\n\t}", "public void updateObserver();", "public void notifyBaseObservers() {\n notifyBaseObservers(null);\n }", "@Override\n public void changed(ObservableValue<? extends Worker.State> observable, Worker.State oldValue, Worker.State newValue) {\n\n }", "public void setObservers() {\n feedBackVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (feedBackVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n feedBackVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(feedBackVM.toastMsg.get());\n feedBackVM.toastMsg.set(null);\n }\n });\n }", "Void update(T subject);", "public void notifyObservers() {\r\n\t\tDoctorEvent evt;\r\n\t\tif (loggedIn) {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGIN, doctor);\r\n\t\t} else {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGOUT, doctor);\r\n\t\t}\r\n\t\tfor (Iterator<IObserver> it = observers.iterator(); it.hasNext();) {\r\n\t\t\tIObserver observer = (IObserver) it.next();\r\n\t\t\tobserver.onNotify(evt);\r\n\t\t}\r\n\t}", "public void notifySelectedCourseObservers() {\n \t\tfor (ISelectedCourseObserver so : selectedCourseObservers) {\n \t\t\tso.updateSelectedCourse();\n \t\t}\n \t}", "private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}", "protected void notifyObservers()\n\t{\n\t Trace.println(Trace.EXEC_PLUS);\n\n\t for (TestGroupResultObserver observer : myObserverCollection)\n\t {\n\t \tobserver.notify(this);\n\t }\n\t}", "private void notifyListeners() \n\t{\n\t\tSystem.out.println(\"Event Source: Notifying all listeners\");\n\n\t\tfor(IListener listener : listeners)\n\t\t{\n\t\t\tlistener.eventOccured(new Event(this));//passing and object of source\n\t\t}\n\n\t}", "private void setObservers() {\n evaluateDetailVM.isLoading.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n if (evaluateDetailVM.isLoading.get()) {\n showWaitingDialog(true);\n } else {\n showWaitingDialog(false);\n }\n }\n });\n\n evaluateDetailVM.toastMsg.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {\n @Override\n public void onPropertyChanged(Observable observable, int i) {\n toast(evaluateDetailVM.toastMsg.get());\n evaluateDetailVM.toastMsg.set(null);\n }\n });\n }", "protected synchronized void setChanged() {\n changed = true;\n }", "void notifyObserver();", "@Override\n public void update(Observable o, Object arg) {\n setChanged();\n notifyObservers();\n }", "public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }", "public void update(Subject_pull subject) {\n\t\tthis.state = ((ConcreteSubject_pull)subject).getState();\n\t\tSystem.out.println(\"状态是\"+state);\n\t}", "public void notifyListeners() {\n Logger logger = LogX;\n logger.d(\"notifyListeners: \" + this.mListeners.size(), false);\n List<IWalletCardBaseInfo> tmpCardInfo = getCardInfo();\n Iterator<OnDataReadyListener> it = this.mListeners.iterator();\n while (it.hasNext()) {\n it.next().refreshData(tmpCardInfo);\n }\n }", "public synchronized void fireStateChanged() {\n Object[] listeners = listenerList.getListenerList();\n for (int i = listeners.length - 2; i >= 0; i -= 2)\n if (listeners[i] == ChangeListener.class) {\n if (changeEvent == null)\n return;\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }", "public synchronized void setChanged() {\n super.setChanged();\n }", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}", "@Override\n public void notifyStructureObservers() {\n for(StructureObserver structureObserver : structureObservers){\n structureObserver.update(entities.returnStructureRenderInformation());\n }\n }", "private void notifyListeners(RestState state) {\n\t\tfor (RestStateChangeListener l : listener) {\n\t\t\tl.onStateChangedEvent(state);\n\t\t}\n\t}", "public void clearObservers() {\r\n\t\tobservers.clear();\r\n\t}", "public void notifyChange() {\n synchronized (this) {\n if (mCallbacks == null) {\n return;\n }\n }\n mCallbacks.notifyCallbacks(this, 0, null);\n }", "public void setMobHasChanged() {\r\n\t\t// method that informs the view(the observer) of the changes\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers();\r\n\t\r\n\t}", "@Override\n public void notifyStatusObservers() {\n for(StatusObserver statusObserver : statusObservers){\n //TODO maybe get status render info from current selection instead of entities. This would remove the double calls to functions in EntityOwnership\n StatusRenderInformation temp = entities.returnStatusRenderInformation();\n statusObserver.update(entities.returnStatusRenderInformation());\n }\n }", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "public void notifyObservers(Object... args)\n {\n for (IObserver observer : observers)\n {\n observer.update(this, args);\n }\n }", "@Override\n public void execute() {\n System.out.println(\"---------- OBSERVER PATTERN ----------\");\n Subject subject = new Subject();\n\n //create observers and pass in subject they want to observe (constructor code will add them as observers to the subject)\n new ObserverA(subject);\n new ObserverB(subject);\n\n //subject data changes and automatically updates all observers...triggering their souts (reporting the changed number)\n subject.changeUnstableInt();\n }", "protected void fireStateChanged() {\r\n Object[] listeners = listenerList.getListenerList();\r\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\r\n if (listeners[i] == ChangeListener.class) {\r\n if (changeEvent == null) {\r\n changeEvent = new ChangeEvent(this);\r\n }\r\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\r\n }\r\n }\r\n }", "public void clearObservers(){\r\n\t\tobservers.clear();\r\n\t}", "public void detachAllObservers();", "private void setModelToChanged() {\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "protected void fireStateChanged() {\n Object[] listeners = changeListeners.getListenerList();\n // Process teh listeners last to first, notifying those that are\n // interested in this event.\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ChangeListener.class) {\n if (changeEvent == null) {\n changeEvent = new ChangeEvent(this);\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\n }\n }\n }\n }", "public void fireStateChanged() {\r\n Object[] listeners = listenerList.getListenerList();\r\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\r\n if (listeners[i] == ChangeListener.class) {\r\n if (changeEvent == null) {\r\n return;\r\n }\r\n ((ChangeListener) listeners[i + 1]).stateChanged(changeEvent);\r\n }\r\n }\r\n }", "private void notifyidiots() {\n\t\tfor(Observ g:obslist) {\n\t\t\tg.update();\n\t\t}\n\t}", "public void clearChangeListeners() {\n observer.clear();\n }", "protected void fireStateChanged ()\n {\n Object[] listeners = listenerList.getListenerList();\n ChangeEvent event = null;\n for (int ii = listeners.length - 2; ii >= 0; ii -= 2) {\n if (listeners[ii] == ChangeListener.class) {\n if (event == null) {\n event = new ChangeEvent(this);\n }\n ((ChangeListener)listeners[ii + 1]).stateChanged(event);\n }\n }\n }", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "@Override\n public void notifyObservers(String errorMessage) {\n for (Observer observer : observers){\n // push the error message to all the observers\n observer.update(this, errorMessage);\n }\n }", "public void subjectChanged(Subject item)\n {\n event(\"SubjectChange\",\n item.getId(),\n -1,\n -1,\n false);\n }", "protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }", "@Override\n\tpublic void update(IObservable observable, Object args) {\n\t\tthis.repaint();\n\t}", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}" ]
[ "0.77969295", "0.75052094", "0.74700254", "0.7416929", "0.7413058", "0.73233366", "0.7279234", "0.72544014", "0.72387177", "0.7235828", "0.72113246", "0.72044504", "0.72035134", "0.7203425", "0.71931225", "0.7176063", "0.7148931", "0.713475", "0.7121499", "0.71070826", "0.69811434", "0.69154656", "0.69148785", "0.68733287", "0.68733287", "0.68733287", "0.68593514", "0.6801171", "0.67702705", "0.67222965", "0.67056245", "0.659639", "0.6568969", "0.6559629", "0.6491891", "0.64693034", "0.6428515", "0.64218724", "0.6393735", "0.6384245", "0.63703865", "0.63534904", "0.63388884", "0.6329516", "0.63055885", "0.6300265", "0.629222", "0.628582", "0.6277684", "0.6277402", "0.627501", "0.6274105", "0.62419313", "0.6200858", "0.618789", "0.6172713", "0.6172556", "0.61443806", "0.6141404", "0.6130644", "0.6118127", "0.608875", "0.6074649", "0.6071179", "0.60592526", "0.604255", "0.6037344", "0.60320115", "0.6018379", "0.6018137", "0.5987248", "0.5980167", "0.59769934", "0.59623325", "0.5955806", "0.595424", "0.59517825", "0.59456104", "0.59376496", "0.5923456", "0.5920452", "0.59182346", "0.5907743", "0.5901625", "0.5899215", "0.5895757", "0.5887813", "0.5884248", "0.58832407", "0.5846627", "0.582166", "0.5819741", "0.58124685", "0.57948315", "0.579351", "0.57905865", "0.5775705", "0.5775441", "0.57749945" ]
0.6832531
27
The static utility method Collections.sort accepts a list and a comparator in order to sort the elements of the given list
public void step1(){ Collections.sort(names, new Comparator<String>() { @Override public int compare(String a, String b) { return b.compareTo(a); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sort(List<T> objects, Comparator<T> comparator) {\n }", "public static void sort(java.util.List arg0, java.util.Comparator arg1)\n { return; }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public static void sort(List list, Comparator comparator) {\n if (list.size() > 1) {\n Object[] array = list.toArray();\n sort(array, comparator);\n DataManipulator.copyArrayToList(list, array);\n }\n }", "@Override\r\n\tpublic <T> void sort(Comparator<T> comparator, List<T> list) {\r\n\t\tsort(comparator, list, 0, list.size() - 1);\r\n\t}", "@Override\r\n\tpublic List<T> sort(List<T> list) {\n\t\tassert list != null : \"list cannot be null\";\r\n\t\tfor(int i = 0; i < list.size() - 1; i ++){\r\n\t\t\tint min = i;\r\n\t\t\tfor(int j = i + 1; j < list.size(); j ++){\r\n\t\t\t\tint current = j;\r\n\t\t\t\tif(this.comparator.compare(list.get(min), list.get(current)) > 0){\r\n\t\t\t\t\tmin = current;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswap(list, i, min);\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public static Book[] sortBookViaCollection(List<Book> inputList, Comparator<Book> comparator) {\n\t\tCollections.sort(inputList, comparator);\n\t\treturn inputList.toArray(new Book[inputList.size()]);\t\t\n\t}", "public void sortElements(Comparator<TLProperty> comparator);", "public SortingAlgorithmResult<E> sort(List<E> l);", "public static void sort(ArrayList<Comparable> list)\n {\n sort(list, 0, list.size() - 1);\n }", "public static void sort(java.util.List arg0)\n { return; }", "@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }", "public static <E> void sort(List<E> list) {\n Comparator<E> c = DataComparator.buildComparator();\n sort(list, c);\n }", "@Override\n public void sort(List<T> items) {\n }", "private List<Doctor> sortList(List<Doctor> l, Comparator<Doctor> c) {\n l.sort(c);\n return l;\n }", "default List<Event> sort(List<Event> events, Comparator<Event> cmp) {\n\t\tCollections.sort(events, cmp);\n\t\treturn events;\n\t}", "public List sort(List list) {\n assert list != null : \"list cannot be null\";\n\n return mergeSublists(createSublists(list));\n }", "public static void sort(ArrayList<Integer> list) {\n\t\tint temp;\n\t\tfor (int i=0; i < list.size() ; i++) {\n\t\t\tfor (int j=i+1;j<list.size()-1;j++){\n\t\t\t\tif(list.get(i)>list.get(j)){\n\t\t\t\t\ttemp = list.get(i);\n\t\t\t\t\tlist.set(i,list.get(j));\n\t\t\t\t\tlist.set(j, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void listSort() {\n\t\tCollections.sort(cd);\n\t}", "void sort(Comparator<E> comp);", "public void sort(){\n Collections.sort(list, new SortBySpecies());\n }", "public static void mySort(ArrayList<Integer> myList)\n {\n\n }", "static <T extends Comparable<T>> List<T> sort(List<T> list) {\n\t\tif (list == null || list.size() < 2) {\n\t\t\treturn list;\n\t\t}\n\t\tfor (int i = 1; i < list.size(); i++) {\n\t\t\t// the current is begin from index of 1\n\t\t\tT current = list.get(i);\n\t\t\tint j = i - 1;\n\t\t\tint origin = j;\n\t\t\twhile (j >= 0 && list.get(j).compareTo(current) > 0) {\n\t\t\t\t// insert into the head of the sorted list\n\t\t\t\t// or as the first element into an empty sorted list\n\t\t\t\t// last element of the sorted list\n\t\t\t\t// middle of the list\n\t\t\t\t// insert into middle of the sorted list or as the last element\n\t\t\t\tlist.set(j + 1, list.get(j));\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tlist.set(j + 1, current);\n\t\t\tprintInsertionSortAnimation(list, current, j, origin);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\treturn list;\n\t}", "private void sortDateList(List<Date> dateList) {\n Collections.sort(dateList);\n }", "private static void sortList(ArrayList<ArrayList<Integer>> list){\n for (int i = 0; i < list.size(); i++) {\n for (int j = list.size() - 1; j > i; j--) {\n if ( (getCustomerArrivalTime(list.get(i)) == getCustomerArrivalTime(list.get(j)) && getCustomerIndex(list.get(i)) > getCustomerIndex(list.get(j)))\n || getCustomerArrivalTime(list.get(i)) > getCustomerArrivalTime(list.get(j))) {\n\n ArrayList<Integer> tmp = list.get(i);\n list.set(i,list.get(j)) ;\n list.set(j,tmp);\n }\n }\n }\n }", "public void sortManlist(){\r\n\t\tCollections.sort(Manlist, new MySort());\r\n\t}", "private void mergeSort(ArrayList<File> listToSort, Comparator<File> fileComparator) {\r\n int size = listToSort.size();\r\n if (size < 2) {\r\n return;\r\n }\r\n int half = size / 2;\r\n ArrayList<File> firstList = new ArrayList<File>(listToSort.subList(0, half));\r\n ArrayList<File> secondList = new ArrayList<File>(listToSort.subList(half, size));\r\n\r\n mergeSort(firstList, fileComparator);\r\n mergeSort(secondList, fileComparator);\r\n\r\n merge(firstList, secondList, listToSort, fileComparator);\r\n }", "public static <E> void selectionSort(E[] list,\n\t\t\tComparator<? super E> comparator) {\n\t\tfor (int i = 0; i < list.length - 1; i++) {\n\t\t\t// Find the minimum in the list[i..list.length-1]\n\t\t\tE currentMin = list[i];\n\t\t\tint currentMinIndex = i;\n\n\t\t\tfor (int j = i + 1; j < list.length; j++) {\n\t\t\t\tif (comparator.compare(currentMin, list[j]) > 0) {\n\t\t\t\tcurrentMin = list[j];\n\t\t\t\tcurrentMinIndex = j;\n\t\t\t}\n\t\t}\n\n\t\t// Swap list[i] with list[currentMinIndex] if necessary\n\t\tif (currentMinIndex != i) {\n\t\t\t\tlist[currentMinIndex] = list[i];\n\t\t\t\tlist[i] = currentMin;\n\t\t\t}\n\t\t}\n\t}", "public static Book[] sortBookViaTreeMap(List<Book> inputList, Comparator<Book> comparator) {\n\t\tSupplier<TreeSet<Book>> collectionFactory = () -> { return new TreeSet<Book> (comparator); };\n\t\tTreeSet<Book> treeSet = inputList.stream().collect(Collectors.toCollection(collectionFactory));\n\t\treturn treeSet.toArray(new Book[treeSet.size()]);\t\n\t}", "Comparator<T> sortBy();", "public void sort(List<String> list) {\n\t\tlist.sort(new Comparator<String>(){\n\t\t\t@Override\n\t\t\tpublic int compare(String s1, String s2) {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t}\n\t\t});\n\t}", "@Test\n public void testSort() {\n initialize();\n var realList = new HighScoreList();\n realList.setList(list);\n realList.sort();\n\n assertEquals(300, realList.getList().get(0).getScore());\n assertEquals(200, realList.getList().get(1).getScore());\n assertEquals(100, realList.getList().get(2).getScore());\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic static void main(String[] args) {\n\t\t\r\n\t\tComparator integerComparator = (Object arg0, Object arg1) -> {\r\n\t\t\treturn ((Integer)arg0>(Integer)arg1)?-1:((Integer)arg0>(Integer)arg1)?1:0;\r\n\t\t};\r\n\t\t\r\n\t\tCollectionUtils utils = new CollectionUtils();\r\n\t\tList<Integer> list = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list, integerComparator);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\t\t\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list,(a,b)->(a>b)?-1:(a>b)?1:0);\r\n\t\tSystem.out.println(\"After sorting in descending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t\tlist = utils.getIntegerList();\r\n\t\tSystem.out.println(\"Before sorting\");\r\n\t\tSystem.out.println(list);\r\n\t\tCollections.sort(list);\r\n\t\tSystem.out.println(\"After sorting in ascending order:\");\r\n\t\tSystem.out.println(list);\r\n\r\n\t}", "private List<Integer> sort(List<Integer> list) {\n List<Integer> sorted = new ArrayList<Integer>();\n if (list.size() == 0) {\n return list;\n } else {\n List<Integer> l = new ArrayList<Integer>();\n Integer m = list.get(0);\n List<Integer> h = new ArrayList<Integer>();\n \n for(int i : list.subList(1, list.size())) {\n if (i > m)\n h.add(i);\n else\n l.add(i);\n }\n \n sorted.addAll(sort(l));\n sorted.add(m);\n sorted.addAll(sort(h));\n }\n return sorted;\n }", "private void sortResults(List<String> results) {\r\n\t\tif (comparator == null) {\r\n\t\t\tCollections.sort(results);\r\n\t\t} else {\r\n\t\t\tCollections.sort(results, comparator);\r\n\t\t}\r\n\t}", "public static void sortBeans(List<?> beanList, String propertyToSortWith) {\n\t\t// null check against the given bean List\n\t\tif (beanList != null)\n\t\t{\n\t\t\t// create a comparator\n\t\t\tComparator<Object> propertyToCompareComparator = new BeanComparator<Object>(propertyToSortWith);\n\t\t\t// sort the beans according to the given properties value\n\t\t\tCollections.sort(beanList, propertyToCompareComparator);\n\t\t}\n\t}", "static public void sort(List a, Comparator cf, boolean bReverse) {\n sort(a, 0, a.size() - 1, cf, bReverse ? -1 : 1);\n }", "public static <T> void quickSort(@Nonnull List<T> list, @Nonnull Comparator<? super T> comparator) {\n quickSort(list, comparator, 0, list.size());\n }", "public void sortLambda(List<String> list) {\n\t\tlist.sort((s1, s2) -> s1.compareTo(s2));\n\t}", "static ArrayList<Card> sortCardArray(ArrayList<Card> c)\n {\n \n \n Collections.sort(c, new CardComparator());\n \n return c;\n }", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public interface Sorter {\n <T extends Comparable<? super T>> List<T> sort(List<T> list);\n }", "public static void insertSorted(List list, Object obj, Comparator c)\n {\n insertSorted(list, obj, c, true);\n }", "public static ArrayList<Integer> sortArrayList (ArrayList<Integer> arrList) {\n\t Collections.sort(arrList);\n return arrList;\n}", "public static void sort(ArrayList<Number> list) {\r\n\t\t\t\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j < list.size(); j++) {\r\n\t\t\t\t\t\t\t// Ako je vrijadnost elementa na idneksu i manja od vrijednosti\r\n\t\t\t\t\t\t\t// elementa na idneksu j, zamijeni im pozicije.\r\n\t\t\t\t\t\t\tif (list.get(i).doubleValue() < list.get(j).doubleValue()) {\r\n\t\t\t\t\t\t\t\t// Cuvamo elemenat sa drugog indeksa u temp varijabli.\r\n\t\t\t\t\t\t\t\tNumber temp = list.get(j);\r\n\t\t\t\t\t\t\t\t// Kopiramo elemenat sa prvog indeksa preko drugog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(j, list.get(i));\r\n\t\t\t\t\t\t\t\t// Kopiramo temp (drugi elemenat) preko prvog elementa.\r\n\t\t\t\t\t\t\t\tlist.set(i, temp);\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\r\n\t\t}", "public static <T extends Comparable <? super T>> void defaultSort(List <T> list){\r\n\t\tlist.sort(Comparator.naturalOrder()); //will use a built-in variation of mergesort\r\n\t\t//alternative: Collections.sort(list);\r\n\t}", "public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }", "private static File[] sortFileList(File[] list, String sort_method) {\n // sort the file list based on sort_method\n // if sort based on name\n if (sort_method.equalsIgnoreCase(\"name\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return (f1.getName()).compareTo(f2.getName());\n }\n });\n } else if (sort_method.equalsIgnoreCase(\"size\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.length()).compareTo(f2.length());\n }\n });\n } else if (sort_method.equalsIgnoreCase(\"time\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());\n }\n });\n }\n return list;\n }", "private static File[] sortFileList(File[] list, String sort_method) {\n // sort the file list based on sort_method\n // if sort based on name\n if (sort_method.equalsIgnoreCase(\"name\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return (f1.getName()).compareTo(f2.getName());\n }\n });\n }\n else if (sort_method.equalsIgnoreCase(\"size\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.length()).compareTo(f2.length());\n }\n });\n }\n else if (sort_method.equalsIgnoreCase(\"time\")) {\n Arrays.sort(list, new Comparator<File>() {\n public int compare(File f1, File f2) {\n return Long.valueOf(f1.lastModified()).compareTo(f2.lastModified());\n }\n });\n }\n return list;\n }", "public static <T> List<T> SortedInsert(List<T> items, Comparator<T> c) \n {\n\n \n List<T> l = new ArrayList<T>();\n \n for (int i = 0; i < items.size(); i ++)\n {\n \n for (int j = 0; j < l.size(); j ++)\n {\n if (c.compare(l.get(i), l.get(j)) > 0)\n {\n \t l.add(j, l.get(j));\n }\n }\n \n // l.add(items.get(i));\n \n \n }\n\treturn l;\n \n}", "private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}", "public static <T,O> void parallelSort(List<T> a, List<O> a2, Comparator<T> cmp) {\n\t\tif (a.size()!=a2.size())\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, cmp, 0, a.size());\n\t}", "@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 sort(LendItemArrayList list, int order){\n\t\t\n\t\tLendItem tempItem = new LendItem();\n\t\t\n\t\tfor (int i = 0; i < list.next - 1; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < list.next - 1; j++) {\n\t\t\t\t\n\t\t\t\tif (compare(list.lendItems[j], list.lendItems[j+1], order) == 1) {\n\t\t\t\t\t\n\t\t\t\t\ttempItem = list.lendItems[j];\n\t\t\t\t\tlist.lendItems[j] = list.lendItems[j+1];\n\t\t\t\t\tlist.lendItems[j+1] = tempItem;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void sort(List<Integer> listToSort){\n\t\t\n\t\t//loop through all list value\n\t\tfor (int i = 0; i < listToSort.size() - 1; i++) {\n\t\t\tint index = i;//store value position to be swapped if required\n\t\t\t\n\t\t\t//loop through all list values looking for one that is lower than that of position index\n\t\t\tfor (int j = i + 1; j < listToSort.size(); j++) {\n\t\t\t\tif (listToSort.get(j) < listToSort.get(index)) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//swap values at position index and i if required\n\t\t\tif (index != i) {\n\t\t\t\tint temp = listToSort.get(index); \n\t\t\t\tlistToSort.set(index, listToSort.get(i));\n\t\t\t\tlistToSort.set(i, temp);\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public static void IncOrder(ArrayList<Integer> list)\n{\n // Your code here\n Collections.sort(list);\n}", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tEmployee emp1 = new Employee(1,\"Hibachi\",2000000);\n\t\tEmployee emp2 = new Employee(2,\"Budh\",50000000);\n\t\tEmployee emp3 = new Employee(3,\"Som\",1000000);\n\t\tEmployee emp4 = new Employee(4,\"Mangal\",600000);\n\t\tEmployee emp5 = new Employee(5,\"Brihaspati\",7000000);\n\t\t\n\t\tList<Employee> empList = new ArrayList<>();\n\t\tempList.add(emp1);\n\t\tempList.add(emp2);\n\t\tempList.add(emp3);\n\t\tempList.add(emp4);\n\t\tempList.add(emp5);\n\t\t\n\t\t// sorting done using comparable implementation Employee\n\t\tSystem.out.println(\"sorting using comparable. Sorts by default by name\");\n \t\tCollections.sort(empList);\n\t\t\n\t\tempList.forEach(empl -> System.out.println(empl));\n\n\t\t//using comparator in Employee sort the employees by salary\n\t\tCollections.sort(empList, Employee.compareSalary);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on salary\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//using comparator in Employee sort the employees by id\n\t\tCollections.sort(empList, Employee.compareId);\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"sorting using comparator. sorts based on Id\");\n\t\tempList.forEach(emp -> System.out.println(emp));\n\t\t\n\t\t\n\t\t//Now let's say we want to use the comparator to sort in descending order\n\t\tComparator<Employee> reverseSortSalaryDescendingOrder = Collections.reverseOrder(Employee.compareSalary);\n\t\tCollections.sort(empList,reverseSortSalaryDescendingOrder );\n\t\tSystem.out.println(\"*****************************************************\");\n\t\tSystem.out.println(\"Salary soreted in reverse order i.e. descending order using same comparator and Collections reverseOrder()\");\n\t\tempList.forEach(empl -> System.out.println(empl));\n\t\t\n\t\t// Or we can reverse using the comparator's own reversed() method. Internally it calls reverseOrder() \n\t\tCollections.sort(empList, Employee.compareSalary.reversed());\n\t\t\n\t\t\n\t}", "public static <T> void sorter(Liste<T> liste, Comparator<? super T> c) {\n if (liste.tom()){\n return;\n }\n\n int antallListe = liste.antall();\n\n if (antallListe == 1){\n return;\n }\n\n\n /*public T compareTo(char a, char b){\n\n\n\n }*/// Metode for å Sammenligne både int og String, får det ikke til\n\n\n\n char a;\n char b;\n\n\n for (int i = 0; i <antallListe; i++){\n for (int j = i +1; j <antallListe; j++ ) {\n\n\n /*if (liste.hent(i) compareTo liste.hent(j) ) {\n\n liste.leggInn(i,(liste.hent(j)));\n liste.leggInn(j,(liste.hent(i)));\n liste.fjern(i+1);\n liste.fjern(j+1);\n }*/////\n }\n }\n }", "public static <T extends Comparable<T>> List<T> createSortedList(Collection<T> collection) {\n\t\tList<T> list = createList(collection);\n\t\tCollections.sort(list);\n\t\treturn list;\n\t}", "public static <T extends Comparable<T>> List<T> sort(List<T> a) {\r\n if (a.size() < 2) {\r\n return a;\r\n }\r\n\r\n final List<T> leftHalf = a.subList(0, a.size() / 2);\r\n final List<T> rightHalf = a.subList(a.size() / 2, a.size());\r\n\r\n return Helper.merge(sort(leftHalf), sort(rightHalf));\r\n }", "public void sortByGiftCardAmounts(ArrayList sortedList) {\r\n Collections.sort(sortedList, GIFT_CARD_AMOUNT_COMPARATOR);\r\n }", "private static void sortByVerified( ArrayList<Volunteer> list)\n {\n // Find the string reference that should go in each cell of\n // the array, from cell 0 to the end\n for ( int j = 0; j < list.size();j++ )\n {\n // Find min: the index of the string reference that should go into cell j.\n // Look through the unsorted strings (those at j or higher) for the one that is first in lexicographic order\n int min = j;\n for ( int k=j+1; k < list.size(); k++ ) {\n if (list.get(k).compareTo(list.get(min)) > 0) {\n min = k;\n }\n\n }\n\n // Swap the reference at j with the reference at min\n Collections.swap(list, j, min);\n }\n }", "@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }", "void sort();", "void sort();", "public static void main(String[] args) {\n ArrayList<Integer> mainList = new ArrayList<Integer>();\n mainList.add(5);\n mainList.add(2);\n mainList.add(10);\n mainList.add(14);\n mainList.add(3);\n mainList.add(6);\n mainList.add(9);\n boolean asc = false;\n System.out.println(listSort(mainList, asc));\n }", "public void writeList() {\n\n HeapSort heapSort = new HeapSort();\n heapSort.sort(list);\n\n// QuickSort quickSort = new QuickSort();\n// quickSort.sort(list);\n\n// MergeSort mergeSort = new MergeSort();\n// mergeSort.sortNumbers(list);\n\n System.out.println(\"Result of sorting :\");\n list.stream().forEach(s -> System.out.println(s));\n }", "static /* synthetic */ List m17132a(List list) throws Exception {\n ArrayList arrayList = new ArrayList(list);\n Collections.sort(arrayList, f15631B0);\n return arrayList;\n }", "public static <T extends Comparable<? super T>> void mergeSort(List<T> list){\n if(list.size() > 1){\n mergeSort(list, 0, (list.size()/2), list.size() - 1, (T[])new Comparable[list.size()]);\n }\n }", "public static <T> List<T> removeDuplicates (List<T> initialList, Comparator<T> comparator){\r\n List<T> finalList = new ArrayList<T>();\r\n \r\n for (int i = 0; i<initialList.size(); i++){\r\n if (i == 0){\r\n finalList.add(initialList.get(i));\r\n continue;\r\n }\r\n \r\n if (comparator.compare(initialList.get(i-1), initialList.get(i)) == 0){\r\n continue;\r\n }else{\r\n finalList.add(initialList.get(i));\r\n }\r\n }\r\n \r\n return finalList;\r\n }", "@Test\n\tpublic void givenAnUnsortedList_ThenListIsSorted() {\n\t\tList<Integer> unsorted = new ArrayList<>();\n\t\tunsorted.add(2);\n\t\tunsorted.add(1);\n\t\tunsorted.add(3);\n\t\tunsorted.add(5);\n\t\tunsorted.add(4);\n\t\t\n\t\t// Execute the code\n\t\tList<Integer> sorted = QuickSort.getInstance().sort(unsorted);\n\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\tassertThat(sorted.get(2), is(3));\n\t\tassertThat(sorted.get(3), is(4));\n\t\tassertThat(sorted.get(4), is(5));\n\t}", "public static List<String> sortStringList(List<String> toSort) {\n int elements = toSort.size();\n for (int i = (elements - 1); i > 0; i--) {\n for (int j = 0; j < i; j++) {\n if (toSort.get(j).compareTo(toSort.get(j + 1)) > 0) {\n String inter = toSort.get(j);\n toSort.set(j, toSort.get(j + 1));\n toSort.set(j + 1,inter);\n }\n }\n }\n return toSort;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tList<Student> students = new ArrayList<>();\r\n\t\t\r\n\t\tstudents.add(new Student(23, \"Aryan\"));\r\n\t\tstudents.add(new Student(23, \"Jeet\"));\r\n\t\tstudents.add(new Student(83, \"Dhruv\"));\r\n\t\tstudents.add(new Student(13, \"Amit\"));\r\n\t\tstudents.add(new Student(65, \"Aditya\"));\r\n\t\tstudents.add(new Student(57, \"Jeet\"));\r\n\t\t\r\n//\t\tCollections.sort(students);\r\n\t\t\r\n//\t\tCollections.sort(students, new SortByNameThenMarks());\t// We passed our own comparator object.\r\n\t\t\r\n\t\t// We can have our own anonymous comparator without making a class. We can do that so by doing the following:\r\n\t\t\r\n//\t\tCollections.sort(students, new Comparator<Student>() {\r\n//\r\n//\t\t\t@Override\r\n//\t\t\tpublic int compare(Student obj1, Student obj2) {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t});\r\n\t\t\r\n\t\t// With the help of Lambda we could cut short the lines but we have to mention the sign \"->\".\r\n//\t\tCollections.sort(students,(Student obj1, Student obj2) -> {\r\n\t\t\r\n//\t\tCollections.sort(students,(obj1, obj2) -> {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t});\r\n\t\t\r\n//\t\tCollections.sort(students, (obj1, obj2) -> obj1.name.compareTo(obj2.name));\r\n\t\t\r\n//\tThe comparator SortByNameThenMarks can be written in one line as follows. Also \".reversed()\" is used to reverse the order of comparison.\r\n\t\tCollections.sort(students, Comparator.comparing(Student::getName).thenComparing(Student::getMarks).reversed());\r\n\t\t\r\n\t\tstudents.forEach(System.out::println);\t// This is lambda expression to print \r\n\t}", "private void sortWithoutNotify(Comparator<T> comparator, boolean asc){\n log.debug(\"sort called\");\n synchronized (listsLock) {\n isFiltered = false;\n lastUsedComparator = comparator;\n lastUsedAsc = asc;\n log.debug(\"sort synchronized start\");\n if (originalList != null) {\n Collections.sort(originalList, comparator);\n if (!asc) {\n Collections.reverse(originalList);\n }\n }\n // removed the \"else\" compared to the original ArrayAdapter implementation because the ArrayAdapter is bugged\n // https://code.google.com/p/android/issues/detail?id=9666\n // https://code.google.com/p/android/issues/detail?id=69179\n Collections.sort(filteredList, comparator);\n if (!asc) {\n Collections.reverse(filteredList);\n }\n log.debug(\"sort synchronized end\");\n }\n }", "public ArrayList<String> sort (ArrayList<String> names) {\n Collections.sort(names);\n // return Arraylist\n return names;\n }", "public void fletteSort(ArrayList<Integer> list) {\n\t\tmergesort(list, 0, list.size() - 1);\n\t}", "public void sort() {\r\n Collections.sort(this.list, this);\r\n }", "public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}", "public void sort(Comparator<? super AudioFile> comparator) {\n Collections.sort(mObjects, comparator);\n if (mNotifyOnChange) notifyDataSetChanged();\n }", "public ArrayList<ArrayList<String>> inputTestListAndSort (ArrayList<ArrayList<String>> testList){\n ArrayList<ArrayList<String>> testList1=new ArrayList<>(testList);\n Collections.sort(testList1, new SubClass_CompareItemsInTheRowsOfTheTimetable_in_TeachingOverlapAndHours());\n return testList1;\n }", "private List<Contact> getSortedList(List<Contact> contacts) {\n return new HashSet<>(contacts).stream()\n .sorted(Comparator.comparing(Contact::getId))\n .collect(Collectors.toList());\n }", "public static void sortCoins(List<Coin> coins) {\n\t\t\n\t\tCollections.sort(coins);\n\t\t\n\t}", "public static void main(String[] args) {\n List l = new ArrayList();\r\n\tl.add(Month.SEP);\r\n\tl.add(Month.MAR);\r\n\tl.add(Month.JUN);\r\n\tSystem.out.println(\"\\nList before sort : \\n\" + l);\r\n\tCollections.sort(l);\r\n\tSystem.out.println(\"\\nList after sort : \\n\" + l);\r\n }", "private static ArrayList<String> sortArrayList(ArrayList<String> strings) {\n\n Collections.sort(strings, new StringLengthComparator());\n return strings;\n\n }", "@Override\n void sort(Comparator<E> comparator) {\n for (Node<E> i = head.next; i != tail.prev; i = i.next) {\n Node<E> min = i;\n E minValue = min.value;\n\n for (Node<E> j = i.next; j != tail; j = j.next) {\n if (comparator.compare(minValue, j.value) > 0) {\n min = j;\n minValue = min.value;\n }\n }\n\n min.value = i.value;\n i.value = minValue;\n }\n }", "public static Person[] sortList(Person[] list) throws NullPointerException{\n if (list == null) {\n throw new NullPointerException(\"Error!!! array cannot be null.\");\n }else {\n // sorting by bubble sort algorithm\n for (int j = 0; j <( list.length); j++) {\n for (int i = 0; i < list.length-1; i++) {\n if (list[i].getNachname().compareTo(list[i+1].getNachname()) >= 0) {\n Person temp = list[i];\n list[i] = list[i+1];\n list[i+1] = temp;\n }\n }\n }\n }\n return list;\n }", "public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }", "private void sortItems(List<Transaction> theList) {\n\t\tloadList(theList);\r\n\t\tCollections.sort(theList, new Comparator<Transaction>() {\r\n\t\t\tpublic int compare(Transaction lhs, Transaction rhs) {\r\n\t\t\t\t// String lhsName = lhs.getName();\r\n\t\t\t\t// String rhsName = rhs.getName();\r\n\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;", "public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}", "public void step4(){\n\n Collections.sort(names,(a,b)->b.compareTo(a));\n\n\n System.out.println(\"names sorted are :\"+names);\n }", "void comparatorSort() {\n Collections.sort(vendor, Vendor.sizeVendor); // calling collection sort method and passing list and comparator variables\r\n for (HDTV item : vendor) { //looping arraylist\r\n System.out.println(\"Brand: \" + item.brandname + \" Size: \" + item.size);\r\n }\r\n }", "public void sort(@NonNull Comparator<? super T> comparator) {\n ArrayList<T> sortedList = new ArrayList<T>();\n if (mData.isFiltered()) {\n sortedList = new ArrayList<T>(mData.getFilteredValues().values());\n } else {\n sortedList = new ArrayList<T>(mData.getValues().values());\n }\n Collections.sort(sortedList, comparator);\n\n mData.createIndexMapFromList(sortedList, mData.isFiltered() ? mData.getFilteredValues() : mData.getValues());\n notifyDataSetChanged();\n }", "public static final Iterator sort(final Iterator it, final Comparator c) {\n final List l = (List) IterationTools.append(it, new ArrayList());\n Collections.sort(l, c);\n return l.iterator();\n }", "public static List<String> sortOrders(List<String> orderList) {\n // Write your code here\n List<String> primeOrders = new ArrayList<>();\n LinkedHashSet<String> nonPrimeOrders = new LinkedHashSet<>();\n for (String order : orderList) {\n String orderType = order.split(\" \")[1];\n try {\n int orderNum = Integer.parseInt(orderType);\n nonPrimeOrders.add(order);\n } catch (Exception e) {\n primeOrders.add(order);\n }\n }\n Collections.sort(primeOrders, new Comparator<String>() {\n \n @Override\n public int compare(String s1, String s2) {\n String[] s1Elements = s1.split(\" \");\n String[] s2Elements = s2.split(\" \");\n int i = 1;\n while (i < s1Elements.length && i < s2Elements.length) {\n if (!s1Elements[i].equals(s2Elements[i])) {\n return s1Elements[i].compareTo(s2Elements[i]);\n }\n i++;\n }\n if (i < s1Elements.length) {\n return 1;\n }\n if (i < s2Elements.length) {\n return -1;\n }\n return s1Elements[0].compareTo(s2Elements[0]);\n }\n \n });\n for (String nonPrimeOrder : nonPrimeOrders) {\n primeOrders.add(nonPrimeOrder);\n }\n return primeOrders;\n }", "private void sortRowList(List list)\r\n {\r\n if (isSorted())\r\n {\r\n HeaderCell sortedHeaderCell = (HeaderCell) getSortedColumnHeader();\r\n\r\n if (sortedHeaderCell != null)\r\n {\r\n // If it is an explicit value, then sort by that, otherwise sort by the property...\r\n int sortedColumn = this.getSortedColumnNumber();\r\n if (sortedHeaderCell.getBeanSortPropertyName() != null\r\n || (sortedColumn != -1 && sortedColumn < getHeaderCellList().size()))\r\n {\r\n Collections.sort(list, new RowSorter(\r\n sortedColumn,\r\n sortedHeaderCell.getBeanSortPropertyName(),\r\n getTableDecorator(),\r\n this.isSortOrderAscending()));\r\n }\r\n }\r\n\r\n }\r\n\r\n }", "public void sortToDo(){\n\t\tCollections.sort(allToDoLists);\n\t}", "public static List<Integer> sort(List<Integer> input) {\n\t\tif (input.size() < 2)\n\t\t\treturn input;\n\n\t\tint pivot = input.get((input.size() - 1) / 2);\n\t\tList<Integer> less = input.stream().filter(x -> x < pivot).collect(Collectors.toList());\n\t\tList<Integer> greater = input.stream().filter(x -> x > pivot).collect(Collectors.toList());\n\t\tList<Integer> all = new ArrayList<>(sort(less));\n\t\tall.add(pivot);\n\t\tall.addAll(sort(greater));\n\t\treturn all;\n\t}", "private static void SortHash(HashMap<String,ArrayList<input>> hashMap,Distribution list)\n\t{\n\t\tCollections.sort(list.First, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Second, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Third, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Fourth, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.sort(list.Fifth, new Comparator<input>() {\n\t\t public int compare(input one, input other) {\n\t\t \tif(one.sum>other.sum)\n\t\t \t{\n\t\t \t\treturn 1;\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t \t\treturn -1;\n\t\t \t}\n\t\t }\n\t\t}); \n\t\tCollections.reverse(list.First);\n\t\tCollections.reverse(list.Second);\n\t\tCollections.reverse(list.Third);\n\t\tCollections.reverse(list.Fourth);\n\t\tCollections.reverse(list.Fifth);\n\t\tputInHashMap(hashMap,list);\n\t}", "public final void testSortCriteria() throws Exception\n {\n Vector vect = new Vector();\n final long modifier = 100;\n long sdArr[][] = { { 0, 10 }, { 0, 12 }, { 0, 8 }, { -5, 20 }, { -5, 13 }, { -5, 15 }, { -5, -7 }, { 2, 10 },\n { 2, 8 }, { 2, 2 }, { 12, 14 }, { -5, 5 }, { 10, 2 } };\n long sorted[][] = { { -5, -7 }, { 10, 2 }, { 2, 2 }, { -5, 5 }, { 0, 8 }, { 2, 8 }, { 0, 10 }, { 2, 10 },\n { 0, 12 }, { -5, 13 }, { 12, 14 }, { -5, 15 }, { -5, 20 } };\n\n patchArray(sdArr, modifier);\n patchArray(sorted, modifier);\n\n for (int i = 0; i < sdArr.length; i++)\n {\n vect.addElement(new RecordingImplMock(new Date(sdArr[i][0]), sdArr[i][1]));\n }\n RecordingList recordingList = new RecordingListImpl(vect);\n Comparator comparator = new Comparator();\n\n RecordingList newList = recordingList.sortRecordingList(comparator);\n\n assertNotNull(\"recordingList returned null\", newList);\n\n // check results\n LocatorRecordingSpec lrs = null;\n RecordingRequest req = null;\n\n int i = newList.size();\n for (i = 0; i < newList.size(); i++)\n {\n req = (RecordingRequest) newList.getRecordingRequest(i);\n lrs = (LocatorRecordingSpec) req.getRecordingSpec();\n assertEquals(\"sort criteria is wrong\", sorted[i][1], lrs.getDuration());\n }\n }", "public void sort(){\n listOperation.sort(Comparator.comparingInt(Operation::getiStartTime));\n }" ]
[ "0.79312015", "0.7832358", "0.7645297", "0.75811416", "0.68865305", "0.6677743", "0.6632532", "0.66197115", "0.6599481", "0.6579284", "0.6510548", "0.64922637", "0.6476657", "0.64722663", "0.64621174", "0.63657886", "0.6345512", "0.6340369", "0.6279287", "0.62260437", "0.6224329", "0.6217449", "0.61736596", "0.6167061", "0.6164373", "0.61376065", "0.61204714", "0.61188847", "0.610541", "0.610465", "0.6099789", "0.6087668", "0.60842896", "0.6064286", "0.6062997", "0.60326344", "0.60283744", "0.602214", "0.60059226", "0.59792644", "0.59681594", "0.5959597", "0.59566355", "0.5952139", "0.59485936", "0.5940072", "0.5894096", "0.58898693", "0.5889649", "0.58859015", "0.5884408", "0.5857544", "0.5840318", "0.58252776", "0.57915735", "0.5775241", "0.57678217", "0.5764957", "0.5764657", "0.5743163", "0.5738564", "0.57166094", "0.5707856", "0.57072014", "0.57072014", "0.56919557", "0.5681693", "0.567067", "0.56645465", "0.56584686", "0.5651136", "0.5649901", "0.5646645", "0.5642107", "0.5635995", "0.5635924", "0.562226", "0.56144136", "0.55866563", "0.5579624", "0.55558854", "0.55516297", "0.5551418", "0.55480456", "0.5547972", "0.55455357", "0.55445856", "0.55401266", "0.55398977", "0.5528959", "0.5527266", "0.5527103", "0.5518986", "0.5518323", "0.5515056", "0.55019355", "0.55004513", "0.54992557", "0.5477946", "0.54753405", "0.54718804" ]
0.0
-1
We can write it like this
public void step2(){ Collections.sort(names,(String a,String b) -> { return a.compareTo(b); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public void smell() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "private void kk12() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private Combined() {}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void strin() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void level7() {\n }", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "@Override\n\tprotected void logic() {\n\n\t}", "OptimizeResponse() {\n\n\t}", "private final void i() {\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "public abstract String mo9239aw();", "public void method_4270() {}", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private test5() {\r\n\t\r\n\t}", "protected String toStringAsCode() {\r\n \t\treturn \"<\"+toStringAsElement()+\">\";\r\n \t}", "private SBomCombiner()\n\t{}", "@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void poetries() {\n\n\t}", "public amj p()\r\n/* 543: */ {\r\n/* 544:583 */ return this.f;\r\n/* 545: */ }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void sub() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private void level6() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "protected void h() {}", "Consumable() {\n\t}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "public abstract void mo70713b();", "private void test() {\n\n\t}", "public void mo4359a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public abstract Object mo26777y();", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "public void mo9848a() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private static Object Stringbuilder() {\n\t\treturn null;\n\t}", "ParameterizedWithThisOp(int a , double d, char c, String str )\n {\n this.a = a;\n this.d = d;\n this.c = c;\n this.str = str;\n }", "public void mo12930a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\n protected void getExras() {\n }", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "@Override\n public void apply() {\n }", "public void mo1531a() {\n }", "public void mo21793R() {\n }", "public static void generateCode()\n {\n \n }", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public void mo21877s() {\n }", "abstract String mo1748c();", "public void mo97908d() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}" ]
[ "0.5557432", "0.55329484", "0.5350096", "0.53098816", "0.5278747", "0.5229801", "0.52050096", "0.51858646", "0.51815164", "0.5177341", "0.5174875", "0.513175", "0.5109668", "0.5093674", "0.50819993", "0.50379705", "0.50346494", "0.50346494", "0.503278", "0.5018072", "0.5014948", "0.5005728", "0.50045764", "0.50045764", "0.5003311", "0.4965259", "0.49619985", "0.4954971", "0.49484998", "0.49432808", "0.49371302", "0.49263442", "0.4911631", "0.4897827", "0.48960847", "0.48946136", "0.48870975", "0.48553526", "0.48448575", "0.48299286", "0.4816123", "0.4815502", "0.48140833", "0.48023772", "0.48007667", "0.47921377", "0.4789005", "0.478642", "0.47821322", "0.47740293", "0.47628382", "0.47440076", "0.47397378", "0.4737626", "0.47372895", "0.47259372", "0.47259372", "0.47204995", "0.4720344", "0.47147626", "0.4711432", "0.4706572", "0.4699912", "0.46965665", "0.4694384", "0.4690864", "0.46888342", "0.4688265", "0.46751118", "0.46713358", "0.46701264", "0.4668674", "0.4668674", "0.4668674", "0.4668674", "0.4668674", "0.4668674", "0.4668674", "0.46683365", "0.46670476", "0.46670443", "0.46601123", "0.4651229", "0.4651027", "0.46510136", "0.4650772", "0.46480232", "0.4645937", "0.464016", "0.4639547", "0.46366778", "0.46343347", "0.46331728", "0.4632539", "0.46323812", "0.46258163", "0.4620212", "0.4618107", "0.4616124", "0.46139988", "0.46100453" ]
0.0
-1
We can write it like this more simple
public void step3(){ Collections.sort(names,(String a, String b) -> a.compareTo(b)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private void kk12() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "protected abstract Set method_1559();", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private Combined() {}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private test5() {\r\n\t\r\n\t}", "private void level7() {\n }", "void test1(IAllOne obj) {\n assertEquals(\"\", obj.getMaxKey());\n assertEquals(\"\", obj.getMinKey());\n obj.inc(\"a\");\n assertEquals(\"a\", obj.getMaxKey());\n assertEquals(\"a\", obj.getMinKey());\n obj.inc(\"a\");\n obj.inc(\"b\");\n obj.inc(\"b\");\n obj.inc(\"b\");\n obj.inc(\"c\");\n assertEquals(\"b\", obj.getMaxKey());\n assertEquals(\"c\", obj.getMinKey());\n obj.dec(\"b\");\n obj.inc(\"a\");\n assertEquals(\"a\", obj.getMaxKey());\n assertEquals(\"c\", obj.getMinKey());\n obj.inc(\"c\");\n obj.dec(\"b\");\n assertEquals(\"b\", obj.getMinKey());\n obj.dec(\"b\");\n assertEquals(\"c\", obj.getMinKey());\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public abstract String mo9239aw();", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "private void test() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private OneOfEach() {\n initFields();\n }", "@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}", "public void method_4270() {}", "private final void i() {\n }", "private void sub() {\n\n\t}", "private static class <init> extends <init>\n{\n\n public void a(Object obj, StringBuilder stringbuilder)\n {\n au au1 = (au)obj;\n y y1 = new y();\n y1.a(\"$ts\", Integer.valueOf(au1.a()));\n y1.a(\"$inc\", Integer.valueOf(au1.b()));\n a.a(y1, stringbuilder);\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public int generateRoshambo(){\n ;]\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "private SBomCombiner()\n\t{}", "OptimizeResponse() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "abstract int pregnancy();", "public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}", "public static void listing5_14() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract Object mo26777y();", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "public void mo21877s() {\n }", "public void logic(){\r\n\r\n\t}", "abstract String mo1748c();", "public void Tyre() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n Integer[] num = {3,2,5,0,1};\r\n Character[] letter = {'P','I','V','C','D'};\r\n SpecialEncoding<Integer> a= new SpecialEncoding<>(num);\r\n SpecialEncoding<Character> b= new SpecialEncoding<>(letter);\r\n \r\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void mo9848a() {\n }", "@Override\n public void memoria() {\n \n }", "private static void iterator() {\n\t\t\r\n\t}", "private void level6() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "private void m50366E() {\n }", "public abstract String mo9238av();", "public void mo12930a() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "Operations operations();", "public void test5(){\r\n\t\tZug zug1 = st.zugErstellen(1, 0, \"Zug 1\");\r\n\t\tZug zug2 = st.zugErstellen(0, 3, \"Zug 2\"); \r\n\t}" ]
[ "0.5511931", "0.54045373", "0.53616804", "0.52382207", "0.52308077", "0.5188347", "0.51814747", "0.51803", "0.51571643", "0.51493865", "0.50471264", "0.50431174", "0.50123316", "0.50116694", "0.4983528", "0.4976684", "0.4976684", "0.49671227", "0.49613622", "0.49601027", "0.49566162", "0.49522233", "0.4947032", "0.49364486", "0.49195993", "0.48851982", "0.48851982", "0.48822865", "0.4878316", "0.48755276", "0.4861136", "0.48562136", "0.48312747", "0.48296565", "0.482931", "0.48224813", "0.48195624", "0.4816793", "0.48020276", "0.4797398", "0.4790378", "0.4783113", "0.4781367", "0.4777096", "0.47688532", "0.47638592", "0.47584778", "0.4751863", "0.4748977", "0.47391534", "0.47371295", "0.47338533", "0.4717992", "0.4716546", "0.47163358", "0.4715308", "0.47143257", "0.47031817", "0.47008175", "0.46934298", "0.46891803", "0.4688879", "0.4685949", "0.46749493", "0.4669591", "0.46695718", "0.4669186", "0.46652764", "0.46642682", "0.46634972", "0.46634257", "0.46629855", "0.46574262", "0.46546537", "0.46488714", "0.46345317", "0.463255", "0.46278307", "0.46192074", "0.46183878", "0.4596308", "0.4596308", "0.4596308", "0.4596308", "0.4596308", "0.4596308", "0.4596308", "0.45960355", "0.4574964", "0.45738974", "0.45678425", "0.456729", "0.45578367", "0.45578367", "0.45552814", "0.45525497", "0.45414594", "0.45407966", "0.4540138", "0.45396096", "0.4536383" ]
0.0
-1
The best way like this , because we know the variable type
public void step4(){ Collections.sort(names,(a,b)->b.compareTo(a)); System.out.println("names sorted are :"+names); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ParameterExpression variable(Class type) { throw Extensions.todo(); }", "@Override\r\n\tpublic Node visitVarType(VarTypeContext ctx) {\n\t\treturn super.visitVarType(ctx);\r\n\t}", "public static ParameterExpression variable(Class type, String name) { throw Extensions.todo(); }", "<C, PM> Variable<C, PM> createVariable();", "protected void method_6194(class_1583 var1) {\r\n super.method_6194(var1);\r\n String[] var10001 = field_5882;\r\n var1.method_8667(\"Type\", this.field_5880);\r\n }", "static String varType(Field field)\r\n {\r\n switch(field.type)\r\n {\r\n case Field.BYTE:\r\n return \"BYTE\";\r\n case Field.SHORT:\r\n return \"SHORT\";\r\n case Field.INT:\r\n case Field.SEQUENCE:\r\n case Field.LONG:\r\n return \"LONG\";\r\n case Field.CHAR:\r\n case Field.ANSICHAR:\r\n return \"CHAR(\"+String.valueOf(field.length)+\")\";\r\n case Field.DATE:\r\n case Field.DATETIME:\r\n case Field.TIME:\r\n case Field.TIMESTAMP:\r\n return \"DATETIME\";\r\n case Field.FLOAT:\r\n case Field.DOUBLE:\r\n if (field.scale != 0)\r\n return \"DOUBLE(\"+String.valueOf(field.precision)+\", \"+String.valueOf(field.scale)+\")\";\r\n else if (field.precision != 0)\r\n return \"DOUBLE(\"+String.valueOf(field.precision)+\")\";\r\n return \"DOUBLE\";\r\n case Field.BLOB:\r\n return \"LONGBINARY\";\r\n case Field.TLOB:\r\n return \"LONGTEXT\";\r\n case Field.MONEY:\r\n return \"DOUBLE(15,2)\";\r\n case Field.USERSTAMP:\r\n return \"VARCHAR(16)\";\r\n case Field.IDENTITY:\r\n return \"<not supported>\";\r\n }\r\n return \"unknown\";\r\n }", "protected void method_6196(class_1583 var1) {\r\n super.method_6196(var1);\r\n String[] var10002 = field_5882;\r\n this.field_5880 = var1.method_8681(\"Type\");\r\n }", "public interface Variable<T> {\n /*\n Get type of the object\n */\n Class<T> getType();\n\n /*\n Returns the data based of what it got previously\n */\n T get(GlobalVariableMap globalVariableMap);\n\n default T getWithTiming(GlobalVariableMap globalVariableMap) {\n long start = System.currentTimeMillis();\n T t = get(globalVariableMap);\n System.out.println(\"Variable GET done took (\" + (System.currentTimeMillis() - start) + \"ms) value: \" + t);\n return t;\n }\n}", "public VarTypeNative getFieldVarType();", "private static void getJVMVar(\n Object obj,\n String id,\n HashSet<Variable> variables) {\n switch (obj.getClass().getName()) {\n case \"java.lang.Boolean\":\n variables.add(new Variable(id, \"boolean\", obj.toString()));\n break;\n case \"java.lang.Byte\":\n case \"java.lang.Short\":\n case \"java.lang.Integer\":\n case \"java.lang.Long\":\n variables.add(new Variable(id, \"int\", obj.toString()));\n break;\n case \"java.lang.Float\":\n case \"java.lang.Double\":\n variables.add(new Variable(id, \"float\", obj.toString()));\n break;\n case \"java.lang.Character\":\n default:\n String strVal = StrUtils.sanitizeStringValue(obj.toString());\n variables.add(new Variable(id, \"string\", strVal));\n }\n }", "public T caseVariables(Variables object)\n {\n return null;\n }", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "Variable createVariable();", "Variable createVariable();", "DynamicVariable createDynamicVariable();", "void mo83706a(C32459e<T> eVar);", "public java.lang.Short getVariableType() {\r\n return variableType;\r\n }", "Type_use getType_use();", "public String getVariableType(String key) {\n for (Map.Entry<PlainGraph, Map<String, PlainNode>> entry :graphNodeMap.entrySet()) {\n if (entry.getValue().containsKey(key)) {\n PlainNode node = entry.getValue().get(key);\n PlainEdge edge = entry.getKey().outEdgeSet(node).stream()\n .filter(e -> e.label().toString().contains(\"type:\"))\n .collect(Collectors.toList())\n .get(0);\n if (edge.label().toString().contains(SHARP_TYPE)) {\n return edge.label().toString().replace(String.format(\"%s:%s\",TYPE, SHARP_TYPE), \"\");\n } else {\n return edge.label().toString().replace(String.format(\"%s:\",TYPE), \"\");\n }\n }\n }\n // The variable key does not exist yet, it is only declared in the syntax tree\n return null;\n }", "private static TypeToken<?> typeVariable() {\n\t\tParameterizedType t = (ParameterizedType)TypeToken.of(Identity.class).getSupertype(StreamElement.class).getType();\n\t\treturn TypeToken.of(t.getActualTypeArguments()[0]);\n\t}", "@Override\r\n\tpublic void visitVariable(ExpVariable exp) {\r\n\t\tif (replaceVariables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = replaceVariables.get(exp.getVarname());\r\n\t\t\tgetAttributeClass(replaceVariables.get(exp.getVarname()).name());\r\n\r\n\t\t} else if (variables.containsKey(exp.getVarname())) {\r\n\t\t\tobject = variables.get(exp.getVarname());\r\n\t\t\tif (collectionVariables.contains(exp.getVarname())) {\r\n\t\t\t\tset = true;\r\n\t\t\t}\r\n\t\t\tgetAttributeClass(exp.getVarname());\r\n\t\t} else if (exp.type().isTypeOfClass()) {\r\n\t\t\tIClass clazz = model.getClass(exp.type().shortName());\r\n\t\t\tTypeLiterals type = clazz.objectType();\r\n\t\t\ttype.addTypeLiteral(exp.getVarname());\r\n\t\t\tobject = type.getTypeLiteral(exp.getVarname());\r\n\t\t\tattributeClass = clazz;\r\n\t\t} else {\r\n\t\t\tthrow new TransformationException(\"No variable \" + exp.getVarname() + \".\");\r\n\t\t}\r\n\t}", "private void checkTypes(Variable first, Variable second) throws OutmatchingParameterType {\n VariableVerifier.VerifiedTypes firstType = first.getType();\n VariableVerifier.VerifiedTypes secondType = second.getType();\n\n if (!firstType.equals(secondType)) {\n throw new OutmatchingParameterType();\n }\n }", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public T caseVariable(Variable object) {\n\t\treturn null;\n\t}", "public static void main(String[] args){\n\n System.out.printf(\"The max is: %d \\n\", maxy(4, 8, 2));\n\n Holder<String> stringValue = new Holder<>();\n stringValue.setMyVar(\"myStringVariable\");\n System.out.println(stringValue.getMyVar());\n\n Holder<Integer> integerValue = new Holder<>();\n integerValue.setMyVar(10);\n System.out.println(integerValue.getMyVar());\n\n\n }", "protected VariableConverter getVariableConverter(Object value, Class<?> type) {\n VariableConverter converter = null;\n Class<?> toType = ConstructorUtils.getWrapper(type);\n for (VariableConverter variableConverter : getVariableConverters()) {\n if (variableConverter.canConvert(value, toType)) {\n converter = variableConverter;\n break;\n }\n }\n return converter;\n }", "static int type_of_in(String passed){\n\t\treturn 1;\n\t}", "public VariableMeta getMeta();", "void mo83703a(C32456b<T> bVar);", "public void setVariableType(java.lang.Short variableType) {\r\n this.variableType = variableType;\r\n }", "static String type(String sin){\n String s = new String();\n for(int c = 0; 0<sin.length();c++){\n if(sin.charAt(c)>='a'&&sin.charAt(c)<='z'){\n s+=\"variable\";\n }else if(sin.charAt(c)>='0'&&sin.charAt(c)<='0'){\n s+=\"Integer\";\n }\n }\n return s;\n }", "public Object VisitInstanceVariableDef(ASTInstanceVariableDef variabledef)\n {\n //////System.out.println(\"VisitInstanceVariableDef()\");\n return CheckType(variabledef.type(), variabledef.arraydimension(), variabledef.line());\n }", "void mo30271a(C11961o<T> oVar) throws Exception;", "String getVariable();", "private void emitType (Type t) {\r\n if (t == PrimitiveType.BYTE || t == PrimitiveType.CHAR ||\r\n\tt == PrimitiveType.SHORT || t == PrimitiveType.INT) \r\n Emitter.emit (\"Integer\");\r\n else if (t == PrimitiveType.LONG) \r\n Emitter.emit (\"Long\");\r\n else if (t == PrimitiveType.FLOAT) \r\n Emitter.emit (\"Float\");\r\n else if (t == PrimitiveType.DOUBLE) \r\n Emitter.emit (\"Double\");\r\n else if (t == PrimitiveType.BOOL) \r\n Emitter.emit (\"Boolean\");\r\n }", "Aliasing getVariable();", "protected <T> T getSharedContextVariable(String name, Class<T> type) {\r\n Object o = m_sharedVariableMap.get(name);\r\n return TypeCastUtility.castValue(o, type);\r\n }", "static int type_of_inx(String passed){\n\t\treturn 1;\n\t}", "public TypeVarElements getTypeVarAccess() {\r\n\t\treturn pTypeVar;\r\n\t}", "private Type get_value_type(long xx) {\n Type vt = _values.get(xx);\n assert vt!=null;\n return vt;\n }", "type getType();", "public Object getValue() {\n Object o = null; \n if (type == \"string\") { o = svalue; }\n if (type == \"int\" ) { o = ivalue; }\n return o;\n }", "private static int getVarInsnOpcode( Type type, boolean isStore ) {\n\tif (isStore) {\n\t if (!type.isPrimitive()) {\n\t\treturn ASTORE ;\n\t } else if (type == Type._float()) {\n\t\treturn FSTORE ;\n\t } else if (type == Type._double()) {\n\t\treturn DSTORE ;\n\t } else if (type == Type._long()) {\n\t\treturn LSTORE ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ISTORE ;\n\t }\n\t} else {\n\t if (!type.isPrimitive()) {\n\t\treturn ALOAD ;\n\t } else if (type == Type._float()) {\n\t\treturn FLOAD ;\n\t } else if (type == Type._double()) {\n\t\treturn DLOAD ;\n\t } else if (type == Type._long()) {\n\t\treturn LLOAD ;\n\t } else {\n\t\t// must be boolean, byte, char, short, or int.\n\t\t// All of these are handled the same way.\n\t\treturn ILOAD ;\n\t }\n\t}\n }", "int getParamType(String type);", "@Override String opStr() { return \"var\"; }", "<C, PM> VariableExp<C, PM> createVariableExp();", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "void mo83704a(C32457c<T> cVar);", "String getVarDeclare();", "public void onParaTypeChangeByVar(int i) {\n }", "private String getType(){\r\n return type;\r\n }", "void mo83705a(C32458d<T> dVar);", "static public <T1> Set<Variable> newVariables(\n String name1, T1 value1, Class<? extends T1> type1\n ) {\n return newVariables(\n newVariable(name1, value1, type1)\n );\n }", "public T caseVar(Var object) {\r\n\t\treturn null;\r\n\t}", "public String getVariable();", "abstract public Type type();", "static int type_of_adi(String passed){\n\t\treturn 1;\n\t}", "VariableExp createVariableExp();", "public String isVar(Exp e) {\n if (e instanceof EId) {\n return ((EId) e).id_;\n } else\n throw new TypeException(\"Expected variable but found: \" + e);\n }", "abstract public Type getType();", "@Test\n\tpublic void testReturnedClass() {\n\t\tassertEquals(\"java.lang.reflect.TypeVariable<D>\", String.valueOf(sut.getActualType()));\n\t}", "InstrumentedType withTypeVariable(TypeVariableToken typeVariable);", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "java.lang.String getVarValue();", "void mo123342a(C48857t tVar);", "@SuppressWarnings(\"unchecked\")\n private static Object mapValueToVil(Object result, TypeDescriptor<?> type) {\n if (result instanceof java.util.Map<?, ?>) {\n result = new Map<Object, Object>((java.util.Map<Object, Object>) result, type.getGenericParameter());\n } else if (result instanceof java.util.Set<?>) {\n result = new ArraySet<Object>(((java.util.Set<?>) result).toArray(), type.getGenericParameter());\n } else if (result instanceof java.util.List<?>) {\n result = new ArraySequence<Object>(((java.util.List<?>) result).toArray(), type.getGenericParameter());\n }\n return result;\n }", "public abstract Type getSpecializedType(Type type);", "private static void addGlobalVariables(Map<String, Class<?>> variables, ClassOrInterfaceDeclaration type) {\n for (String key : variables.keySet()) {\n Type fieldType = JavaParserUtils.transform(variables.get(key));\n VariableDeclaratorId id = new VariableDeclaratorId(key);\n VariableDeclarator declarator = new VariableDeclarator(id);\n FieldDeclaration field = new FieldDeclaration(Modifier.PRIVATE, fieldType, declarator);\n ASTHelper.addMember(type, field);\n }\n }", "public abstract Object getTypedParams(Object params);" ]
[ "0.62426686", "0.59694827", "0.590087", "0.5771138", "0.5738341", "0.5709513", "0.57085586", "0.5700877", "0.56949514", "0.56196046", "0.5491989", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.5476704", "0.54696035", "0.54696035", "0.5460189", "0.54349524", "0.5433725", "0.54040986", "0.5374962", "0.5366346", "0.53388935", "0.53316206", "0.53225267", "0.53225267", "0.53225267", "0.5317677", "0.53117603", "0.53095233", "0.53068674", "0.52995723", "0.52963626", "0.5293067", "0.52858084", "0.5281742", "0.52792466", "0.5270818", "0.52633196", "0.5253892", "0.5234449", "0.52321386", "0.5228347", "0.5222881", "0.5220632", "0.52159315", "0.52118206", "0.52086484", "0.52018535", "0.51890385", "0.5180845", "0.5179013", "0.51647353", "0.51632625", "0.51611584", "0.5138938", "0.51179284", "0.51100975", "0.5099939", "0.5094123", "0.5080968", "0.507849", "0.5067299", "0.50665796", "0.50636077", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5063395", "0.5040356", "0.504034", "0.50397664", "0.5037667", "0.5034742", "0.5034722" ]
0.0
-1
Overridden equals method in order to identify the goods already present into the basket.
@Override public boolean equals(Object obj) { if ( this == obj ) { return true; } if ( !(obj instanceof Good) ) { return false; } Good good = (Good) obj; return this.isBaseTaxFree() == good.isBaseTaxFree() && this.isImported() == good.isImported() && this.getDescription().equalsIgnoreCase(good.getDescription()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean equals(Object other) {\n if (this == other) {\n return true;\n }\n if (other == null || getClass() != other.getClass()) {\n return false;\n }\n StockItem<?> stockItem = (StockItem<?>) other;\n return product.equals(stockItem.product);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Stock)) {\n return false;\n }\n Stock other = (Stock) object;\n if ((this.goodsID == null && other.goodsID != null) || (this.goodsID != null && !this.goodsID.equals(other.goodsID))) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof Product) {\n\t\tProduct newProduct = (Product)obj;\n\t\t return this.getSKU() == newProduct.getSKU() ;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n LitemallProduct other = (LitemallProduct) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))\n && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))\n && (this.getSeriesId() == null ? other.getSeriesId() == null : this.getSeriesId().equals(other.getSeriesId()))\n && (this.getBrandId() == null ? other.getBrandId() == null : this.getBrandId().equals(other.getBrandId()))\n && (Arrays.equals(this.getGallery(), other.getGallery()))\n && (this.getKeywords() == null ? other.getKeywords() == null : this.getKeywords().equals(other.getKeywords()))\n && (this.getBrief() == null ? other.getBrief() == null : this.getBrief().equals(other.getBrief()))\n && (this.getSortOrder() == null ? other.getSortOrder() == null : this.getSortOrder().equals(other.getSortOrder()))\n && (this.getPicUrl() == null ? other.getPicUrl() == null : this.getPicUrl().equals(other.getPicUrl()))\n && (this.getBuyLink() == null ? other.getBuyLink() == null : this.getBuyLink().equals(other.getBuyLink()))\n && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))\n && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))\n && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof OrderItem)) {\n return false;\n }\n OrderItem other = (OrderItem) object;\n if ((this.productId == null && other.productId != null) || (this.productId != null && !this.productId.equals(other.productId))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Product)) {\r\n return false;\r\n }\r\n Product other = (Product) object;\r\n if (this.id != other.id) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if ((o == null) || (getClass() != o.getClass())) {\n return false;\n }\n\n return Objects.equals(balls, ((Basket) o).balls);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Produit)) {\r\n return false;\r\n }\r\n Produit other = (Produit) object;\r\n if (this.id != other.id) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object)\n {\n if (!(object instanceof ScStoreOrderItem))\n {\n return false;\n }\n ScStoreOrderItem other = (ScStoreOrderItem) object;\n if ((this.idItem == null && other.idItem != null) || (this.idItem != null && !this.idItem.equals(other.idItem)))\n {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object that) {\n if (this == that) {\n return true;\n }\n if (that == null) {\n return false;\n }\n if (getClass() != that.getClass()) {\n return false;\n }\n BallPackProduct other = (BallPackProduct) that;\n return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))\n && (this.getValueId() == null ? other.getValueId() == null : this.getValueId().equals(other.getValueId()))\n && (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))\n && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))\n && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))\n && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))\n && (this.getBallPackId() == null ? other.getBallPackId() == null : this.getBallPackId().equals(other.getBallPackId()));\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Productoadicional)) {\r\n return false;\r\n }\r\n Productoadicional other = (Productoadicional) object;\r\n if ((this.idProductoAdicional == null && other.idProductoAdicional != null) || (this.idProductoAdicional != null && !this.idProductoAdicional.equals(other.idProductoAdicional))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n StockItem stockItem = (StockItem) o;\n if (stockItem.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), stockItem.getId());\n }", "@Override\r\n public boolean equals(Object other) {\r\n return (other instanceof Product) && (id != null)\r\n ? id.equals(((Product) other).id)\r\n : (other == this);\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TbProduct)) {\n return false;\n }\n TbProduct other = (TbProduct) object;\n if ((this.productID == null && other.productID != null) || (this.productID != null && !this.productID.equals(other.productID))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n return other == this // short circuit if same object\n || (other instanceof Product // instanceof handles nulls\n && productName.equals(((Product) other).productName)); // state check\n }", "@Override\n public boolean equals(Object obj) {\n if (this == obj)\n return true;\n if (obj == null)\n return false;\n if (getClass() != obj.getClass())\n return false;\n Product other = (Product) obj;\n if (id != other.getId()) {\n \treturn false; \t\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Product)) {\r\n return false;\r\n }\r\n Product other = (Product) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductPrice)) {\n return false;\n }\n ProductPrice other = (ProductPrice) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof PackageItemInfoPK)) {\r\n return false;\r\n }\r\n PackageItemInfoPK other = (PackageItemInfoPK) object;\r\n if (this.itemId != other.itemId) {\r\n return false;\r\n }\r\n if (this.packageId != other.packageId) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Products)) {\n return false;\n }\n Products other = (Products) object;\n if ((this.code == null && other.code != null) || (this.code != null && !this.code.equals(other.code))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof GoodsCatagory)) {\n return false;\n }\n GoodsCatagory other = (GoodsCatagory) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object)\n {\n if (!(object instanceof Product))\n {\n return false;\n }\n Product other = (Product) object;\n if ((this.productCode == null && other.productCode != null) || (this.productCode != null && !this.productCode.equals(other.productCode)))\n {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Packing)) {\n return false;\n }\n Packing other = (Packing) object;\n if ((this.packingId == null && other.packingId != null) || (this.packingId != null && !this.packingId.equals(other.packingId))) {\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\r\n\t\tboolean flag = false;\r\n\t\tif (obj != null && obj instanceof Producto) {\r\n\t\t\tif(((Producto)obj).getID() == getID()) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\r\n return false;\r\n }\r\n Producto other = (Producto) object;\r\n if ((this.idProducto == null && other.idProducto != null) || (this.idProducto != null && !this.idProducto.equals(other.idProducto))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Product product = (Product) o;\n return Objects.equals(id, product.id) &&\n Objects.equals(name, product.name) &&\n Objects.equals(price, product.price) &&\n Objects.equals(description, product.description) &&\n Objects.equals(gallery, product.gallery) &&\n Objects.equals(orders, product.orders) &&\n Objects.equals(animalCategories, product.animalCategories);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemid == null && other.itemid != null) || (this.itemid != null && !this.itemid.equals(other.itemid))) {\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean equals(Object ob){\n\t\tItem itemob=(Item)ob;\t//transfer object type to Item type\r\n\t\tif(this.UID==itemob.UID && this.TITLE==itemob.TITLE && this.NOOFCOPIES==itemob.NOOFCOPIES) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n if (!super.equals(o)) return false;\n Order order = (Order) o;\n return quantity == order.quantity &&\n userId == order.userId &&\n Objects.equals(product, order.product);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Produto)) {\r\n return false;\r\n }\r\n Produto other = (Produto) object;\r\n if ((this.idproduto == null && other.idproduto != null) || (this.idproduto != null && !this.idproduto.equals(other.idproduto))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object obj){\n boolean isEqual = false;\n if (this.getClass() == obj.getClass())\n {\n ItemID itemID = (ItemID) obj;\n if (itemID.id.equals(this.id))\n isEqual = true;\n }\n \n return isEqual;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.codpro == null && other.codpro != null) || (this.codpro != null && !this.codpro.equals(other.codpro))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produit)) {\n return false;\n }\n Produit other = (Produit) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produit)) {\n return false;\n }\n Produit other = (Produit) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (this == object) \n {\n \treturn true;\n }\n if (object == null) \n {\n \treturn false;\n }\n if (getClass() != object.getClass()) \n {\n \treturn false;\n }\n final DiscountProduct discountProduct = (DiscountProduct) object;\n\n if (!Objects.equals(this.discountRate, discountProduct.discountRate)) \n {\n \treturn false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Producto)) {\n return false;\n }\n return id != null && id.equals(((Producto) o).id);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Grocerie3)) {\r\n return false;\r\n }\r\n Grocerie3 other = (Grocerie3) object;\r\n if ((this.productid == null && other.productid != null) || (this.productid != null && !this.productid.equals(other.productid))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Item item = (Item) o;\n return ID == item.ID;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductImage)) {\n return false;\n }\n ProductImage other = (ProductImage) object;\n if ((this.idImage == null && other.idImage != null) || (this.idImage != null && !this.idImage.equals(other.idImage))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Ingredient)) {\r\n return false;\r\n }\r\n Ingredient other = (Ingredient) object;\r\n if ((this.ingredientid == null && other.ingredientid != null) || (this.ingredientid != null && !this.ingredientid.equals(other.ingredientid))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.getId() == null && other.getId() != null) || (this.getId() != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals( Object obj ) {\n if (this == obj) {\n return true;\n }\n\n if (obj == null) {\n return false;\n }\n\n if (getClass() != obj.getClass()) {\n return false;\n }\n\n Deck other = (Deck)obj;\n // Due to the possibility of duplicates, deck comparison is a notch trickier.\n // Our approach is to count the cards in each deck then ensure that the cards\n // and counts are the same.\n return tally().equals(other.tally());\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Produit)) {\n return false;\n }\n return id != null && id.equals(((Produit) o).id);\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof LigneEntreeStock)) {\n return false;\n }\n return id != null && id.equals(((LigneEntreeStock) o).id);\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (!(obj instanceof Sku)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tSku differentSku = (Sku) obj;\n\t\treturn this.getId() == differentSku.getId();\n\t}", "@Override\n public boolean equals(Object obj) {\n return obj instanceof Ingredient && ((Ingredient) obj).name.trim().equals(this.name.trim())\n && ((Ingredient) obj).cost == this.cost;\n }", "public boolean equals(Object obj){\r\n //check if o is null or if o is \r\n if (obj == null || !(obj instanceof Ingredient)) {\r\n \t//throw an exception\r\n throw new PizzaException(\"Exception in the equals method the object is null or is not an instance of Ingredient\");\r\n }\r\n //create object that\r\n Ingredient that = (Ingredient) obj;\r\n \r\n boolean retVal = this.cost.equals(that.cost) &&\r\n this.calories == that.calories &&\r\n this.description.equals(that.description);\r\n return retVal;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Sc2AvailableBets)) {\r\n return false;\r\n }\r\n Sc2AvailableBets other = (Sc2AvailableBets) object;\r\n if ((this.idsc2AvailableBets == null && other.idsc2AvailableBets != null) || (this.idsc2AvailableBets != null && !this.idsc2AvailableBets.equals(other.idsc2AvailableBets))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof FoodHasFood)) {\r\n return false;\r\n }\r\n FoodHasFood other = (FoodHasFood) object;\r\n if ((this.foodidFood == null && other.foodidFood != null) || (this.foodidFood != null && !this.foodidFood.equals(other.foodidFood))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produto)) {\n return false;\n }\n Produto other = (Produto) object;\n if ((this.proId == null && other.proId != null) || (this.proId != null && !this.proId.equals(other.proId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n ProductOrder productOrder = (ProductOrder) o;\n if (productOrder.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), productOrder.getId());\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Produto)) {\n return false;\n }\n Produto other = (Produto) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object obj) {\r\n if (this == obj)\r\n return true;\r\n if (obj == null)\r\n return false;\r\n if (getClass() != obj.getClass())\r\n return false;\r\n ItemImpl other = (ItemImpl) obj;\r\n if (id != other.id)\r\n return false;\r\n return true;\r\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\t\n\t\tif (o == this)\n\t\t\treturn true;\n\t\t\n\t\tif (o instanceof Item && \n\t\t\t\t((Item)o).getName().equals(this.getName()))\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof SysItem)) {\r\n return false;\r\n }\r\n SysItem other = (SysItem) object;\r\n if ((this.itemId == null && other.itemId != null) || (this.itemId != null && !this.itemId.equals(other.itemId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ItemCotizacion)) {\n return false;\n }\n ItemCotizacion other = (ItemCotizacion) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.productoPK == null && other.productoPK != null) || (this.productoPK != null && !this.productoPK.equals(other.productoPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Ingredient)) {\n return false;\n }\n\n Ingredient otherIngredient = (Ingredient) other;\n return otherIngredient.getName().equals(getName())\n && otherIngredient.getUnit().equals(getUnit())\n && otherIngredient.getPrice().equals(getPrice())\n && otherIngredient.getMinimum().equals(getMinimum())\n && otherIngredient.getNumUnits().equals(getNumUnits());\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductoClase)) {\n return false;\n }\n ProductoClase other = (ProductoClase) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ProductEntity)) {\n return false;\n }\n ProductEntity other = (ProductEntity) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof RepairmenOrders)) {\r\n return false;\r\n }\r\n RepairmenOrders other = (RepairmenOrders) object;\r\n if ((this.repCarID == null && other.repCarID != null) || (this.repCarID != null && !this.repCarID.equals(other.repCarID))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TransferItem)) {\r\n return false;\r\n }\r\n TransferItem other = (TransferItem) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == this) {\n return true;\n }\n if (obj == null || obj.getClass() != getClass()) {\n return false;\n }\n Receipt receipt = (Receipt) obj;\n return receipt.getReceiptId().toString() == this.receiptId.toString()\n && receipt.getTimePlaced().compareTo(this.timePlaced) == 0\n && receipt.getCard() == this.card\n && receipt.getCart() == this.cart;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Produtos)) {\r\n return false;\r\n }\r\n Produtos other = (Produtos) object;\r\n if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Producimage)) {\r\n return false;\r\n }\r\n Producimage other = (Producimage) object;\r\n if ((this.producImageId == null && other.producImageId != null) || (this.producImageId != null && !this.producImageId.equals(other.producImageId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TableFeaturedProduct)) {\n return false;\n }\n TableFeaturedProduct other = (TableFeaturedProduct) object;\n if ((this.featuredId == null && other.featuredId != null) || (this.featuredId != null && !this.featuredId.equals(other.featuredId))) {\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof EyeTrackerItem)\r\n\t\t{\r\n\t\t\tEyeTrackerItem item = (EyeTrackerItem) obj;\r\n\t\t\tif(item.getId().equalsIgnoreCase(this.getId()))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn super.equals(obj);\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Brand)) {\n return false;\n }\n Brand other = (Brand) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n\tpublic boolean equals(Object object) {\n\t\tif (!(object instanceof AccountPursePK)) {\n\t\t\treturn false;\n\t\t}\n\t\tAccountPursePK other = (AccountPursePK) object;\n\t\tif ((this.accountId == null && other.accountId != null) || (this.accountId != null && !this.accountId.equals(other.accountId))) {\n\t\t\treturn false;\n\t\t}\n\t\tif ((this.productId == null && other.productId != null) || (this.productId != null && !this.productId.equals(other.productId))) {\n\t\t\treturn false;\n\t\t}\n\t\tif ((this.purseId == null && other.purseId != null) || (this.purseId != null && !this.purseId.equals(other.purseId))) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean equals(Object arg0) {\n\t\tproduit p = (produit) arg0;\n\t\treturn this.reference.equals(p.reference);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Checkout)) {\n return false;\n }\n Checkout other = (Checkout) object;\n if ((this.idCheckout == null && other.idCheckout != null) || (this.idCheckout != null && !this.idCheckout.equals(other.idCheckout))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object o)\r\n {\r\n items oo = (items)o;\r\n if(this.loc_index==oo.loc_index && this.rule_number==oo.rule_number)\r\n return true;\r\n return false;\r\n }", "@Override\n public boolean equals(Object o)\n {\n if (this == o)\n {\n return true;\n }\n if (o == null || getClass() != o.getClass())\n {\n return false;\n }\n\n Item item = (Item) o;\n\n if (getId() != item.getId())\n {\n return false;\n }\n if (getUserId() != item.getUserId())\n {\n return false;\n }\n if (getListId() != item.getListId())\n {\n return false;\n }\n if (getPositionIndex() != item.getPositionIndex())\n {\n return false;\n }\n if (!getTitle().equals(item.getTitle()))\n {\n return false;\n }\n return getBody().equals(item.getBody());\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Equipo)) {\r\n return false;\r\n }\r\n Equipo other = (Equipo) object;\r\n if ((this.idEquipo == null && other.idEquipo != null) || (this.idEquipo != null && !this.idEquipo.equals(other.idEquipo))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof KioskItems)) {\n return false;\n }\n KioskItems other = (KioskItems) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Impuestos)) {\r\n return false;\r\n }\r\n Impuestos other = (Impuestos) object;\r\n if ((this.idimpuesto == null && other.idimpuesto != null) || (this.idimpuesto != null && !this.idimpuesto.equals(other.idimpuesto))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object obj) {\n return this == obj;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PurchaseOrder)) {\n return false;\n }\n PurchaseOrder other = (PurchaseOrder) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object o) {\n return true;\n }", "@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Purchase)) {\r\n return false;\r\n }\r\n Purchase other = (Purchase) object;\r\n if ((this.purchaseCode == null && other.purchaseCode != null) || (this.purchaseCode != null && !this.purchaseCode.equals(other.purchaseCode))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof PlikPotw)) {\r\n return false;\r\n }\r\n PlikPotw other = (PlikPotw) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof ProductrecommendationPK)) {\r\n return false;\r\n }\r\n ProductrecommendationPK other = (ProductrecommendationPK) object;\r\n if ((this.queryproduct == null && other.queryproduct != null) || (this.queryproduct != null && !this.queryproduct.equals(other.queryproduct))) {\r\n return false;\r\n }\r\n if ((this.recommendation == null && other.recommendation != null) || (this.recommendation != null && !this.recommendation.equals(other.recommendation))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Books)) {\n return false;\n }\n Books other = (Books) object;\n if ((this.bookno == null && other.bookno != null) || (this.bookno != null && !this.bookno.equals(other.bookno))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof OrderDetailPK)) {\n return false;\n }\n OrderDetailPK other = (OrderDetailPK) object;\n if (this.orderId != other.orderId) {\n return false;\n }\n return this.itemId == other.itemId;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Seller)) {\n return false;\n }\n Seller other = (Seller) object;\n if ((this.sellerId == null && other.sellerId != null) || (this.sellerId != null && !this.sellerId.equals(other.sellerId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Bike)) {\n return false;\n }\n\n Bike otherBike = (Bike) other;\n return otherBike.getName().equals(getName())\n && otherBike.getStatus().equals(getStatus());\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n Meal meal = (Meal) o;\n if (meal.getId() == null || getId() == null) {\n return false;\n }\n return Objects.equals(getId(), meal.getId());\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof ProdutoSolicitado)) {\r\n return false;\r\n }\r\n ProdutoSolicitado other = (ProdutoSolicitado) object;\r\n if ((this.produtoSolicitadoPK == null && other.produtoSolicitadoPK != null) || (this.produtoSolicitadoPK != null && !this.produtoSolicitadoPK.equals(other.produtoSolicitadoPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TblSellerPaymentSettlement)) {\n return false;\n }\n TblSellerPaymentSettlement other = (TblSellerPaymentSettlement) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n AbstractStock that = (AbstractStock) o;\n\n if (stockSymbol != null ? !stockSymbol.equals(that.stockSymbol) : that.stockSymbol != null) return false;\n if (lastDividend != null ? !lastDividend.equals(that.lastDividend) : that.lastDividend != null) return false;\n if (parValue != null ? !parValue.equals(that.parValue) : that.parValue != null) return false;\n return stockPrice != null ? stockPrice.equals(that.stockPrice) : that.stockPrice == null;\n\n }", "@Override\n\tpublic boolean equals(Object o) {\n\t\treturn super.equals(o);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Purchaseorder)) {\n return false;\n }\n Purchaseorder other = (Purchaseorder) object;\n if ((this.purchaseOrderID == null && other.purchaseOrderID != null) || (this.purchaseOrderID != null && !this.purchaseOrderID.equals(other.purchaseOrderID))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Softwareinstalls)) {\n return false;\n }\n Softwareinstalls other = (Softwareinstalls) object;\n if ((this.softwareinstallsPK == null && other.softwareinstallsPK != null) || (this.softwareinstallsPK != null && !this.softwareinstallsPK.equals(other.softwareinstallsPK))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object otherPizza){\n\t\tPizza p;\n\t\tif(otherPizza instanceof Pizza){\n\t\t\tp = (Pizza) otherPizza;\n\t\t\tif (Size==p.Size && Cheese==p.Cheese && Ham==p.Ham && Pepperoni==p.Pepperoni)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CatGeneralAeweb)) {\n return false;\n }\n CatGeneralAeweb other = (CatGeneralAeweb) object;\n if ((this.catGeneralAewebPK == null && other.catGeneralAewebPK != null) || (this.catGeneralAewebPK != null && !this.catGeneralAewebPK.equals(other.catGeneralAewebPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof UniteCosting)) {\n return false;\n }\n UniteCosting other = (UniteCosting) object;\n if ((this.iduniteCosting == null && other.iduniteCosting != null) || (this.iduniteCosting != null && !this.iduniteCosting.equals(other.iduniteCosting))) {\n return false;\n }\n return true;\n }" ]
[ "0.76025176", "0.7523117", "0.72161496", "0.6967872", "0.6913156", "0.691106", "0.6904514", "0.6863326", "0.6823848", "0.6815708", "0.6811056", "0.68071115", "0.6806494", "0.67842907", "0.6767376", "0.6765179", "0.67639613", "0.67551297", "0.6716676", "0.670897", "0.67077684", "0.67064846", "0.6704647", "0.67011803", "0.66821945", "0.66732395", "0.6646584", "0.6641978", "0.6636694", "0.6625201", "0.6613215", "0.6591292", "0.6575041", "0.6566344", "0.6566344", "0.65351266", "0.6533502", "0.6524927", "0.6521325", "0.6519574", "0.65098494", "0.64899606", "0.6459139", "0.64491975", "0.64445007", "0.6414687", "0.6414243", "0.64119214", "0.639577", "0.63896143", "0.63818187", "0.6375312", "0.6370025", "0.6369174", "0.63611335", "0.6350485", "0.6346929", "0.6342781", "0.63306475", "0.6329736", "0.63275695", "0.6320434", "0.6298207", "0.62915885", "0.62749004", "0.62746567", "0.6274255", "0.626812", "0.6259794", "0.6257041", "0.6250787", "0.62492603", "0.62412465", "0.62377834", "0.6234796", "0.62341464", "0.6232231", "0.62261343", "0.6223093", "0.6204672", "0.61991817", "0.61862993", "0.61768603", "0.61713684", "0.6161393", "0.6160335", "0.6157166", "0.6153564", "0.61509377", "0.6147193", "0.6143713", "0.614218", "0.6138561", "0.61355394", "0.6129076", "0.6121387", "0.6116642", "0.61130184", "0.6112955", "0.6112406" ]
0.63365823
58
returns in the form of a string
public String displayData() { String s = ""; s += super.toString() + "\nNumber of Rentable Units: " + numRentableUnits + "\nAverage Unit Size: " + avgUnitSize + "\nParking Available: " + ((parkingAvailable == true) ? "Y" : "N"); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String getString();", "String getString();", "String getString();", "public String asString();", "public String getString() {\n\t\treturn renderResult(this._result).trim();\n\t}", "String getEString();", "String asString();", "String getString_lit();", "public String getString() {\r\n\t\tString s = value.getString();\r\n\t\t// System.out.println(\"Getting string of: \" + s);\r\n\t\tif (s == null)\r\n\t\t\treturn (s);\r\n\t\treturn (substitution(s));\r\n\t}", "java.lang.String getOutput();", "public String getString();", "public String toString() {\n\treturn createString(data);\n }", "String getCitationString();", "public String toString()\n\t{\n\t\tchar [] ToStringChar = new char[length];\n recursiveToString(0, ToStringChar, firstC);\n String contents = new String(ToStringChar);\n return contents;\n\t\t\n\t}", "public String toString() \r\n {\r\n \treturn new String(buf, 0, count);\r\n }", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public String toString();", "public final String toString() {\n\t\tStringWriter write = new StringWriter();\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(write);\n\t\t\twrite.flush();\n\t\t\tout = write.toString();\n\t\t\twrite.close();\n\t\t} catch (UnsupportedEncodingException use) {\n\t\t\tuse.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\treturn (out);\n\t}", "public String toString() { return stringify(this, true); }", "java.lang.String getScStr();", "public String ToStr(){\n\t\tswitch(getTkn()){\n\t\tcase Kali:\n\t\t\treturn \"*\";\n\t\tcase Bagi:\n\t\t\treturn \"/\";\n\t\tcase Div:\n\t\t\treturn \"div\";\n\t\tcase Tambah:\n\t\t\treturn \"+\";\n\t\tcase Kurang:\n\t\t\treturn \"-\";\n\t\tcase Kurungbuka:\n\t\t\treturn \"(\";\n\t\tcase Kurungtutup:\n\t\t\treturn \")\";\n\t\tcase Mod:\n\t\t\treturn \"mod\";\n\t\tcase And:\n\t\t\treturn \"and\";\n\t\tcase Or:\n\t\t\treturn \"or\";\n\t\tcase Xor:\n\t\t\treturn \"xor\";\n\t\tcase Not:\n\t\t\treturn \"!\";\n\t\tcase Bilangan:\n\t\t\tString s = new String();\n\t\t\tswitch (getTipeBilangan()){\n\t\t\tcase _bool:\n\t\t\t\tif (getBilanganBool())\n\t\t\t\t\treturn \"true\";\n\t\t\t\telse\treturn \"false\";\n\t\t\tcase _int:\n\t\t\t\ts+=(getBilanganInt());\n\t\t\t\tbreak;\n\t\t\tcase _float:\n\t\t\t\ts+=(getBilanganFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}", "public String makeString()\n {\n return \"ArcanaDungeonSource\";\n }", "protected String getString () {\n int utf = 0;\n skipSpaces ();\n if (!eatChar ('\"')) { return null; }\n m_sb.setLength (0);\n char c = getChar ();\n while ( c != '\\0' && c != '\"' ) {\n if (c == '\\\\') {\n c = getNextChar ();\n switch (c) {\n case '\"': c = '\"'; break;\n case '\\\\': c = '\\\\'; break;\n case '/' : c = '/'; break;\n case 'b' : c = '\\b'; break;\n case 'f' : c = '\\f'; break;\n case 'n' : c = '\\n'; break;\n case 'r' : c = '\\r'; break;\n case 't' : c = '\\t'; break;\n case 'u' :\n utf = 0;\n utf += Character.digit(getNextChar (), 16) << 12;\n utf += Character.digit(getNextChar (), 16) << 8;\n utf += Character.digit(getNextChar (), 16) << 4;\n utf += Character.digit(getNextChar (), 16);\n c = (char)utf;\n break;\n }\n }\n m_sb.append (c);\n c = getNextChar ();\n }\n return eatChar ('\"') ? m_sb.toString () : null;\n }", "public String getString(){\n\t\treturn \t_name + String.format(\"\\nWeight: %s\", _weight) + String.format( \"\\nNumber of wheels: %s\", _numberOfWheels ) + \n\t\t\t\tString.format( \"\\nMax of speed: %s\", _maxOfSpeed ) + String.format( \"\\nMax acceleration: %s\", _maxAcceleration ) + \n\t\t\t\tString.format( \"\\nHeight: %s\", _height ) + String.format( \"\\nLength: %s\", _length ) + String.format( \"\\nWidth: %s\", _width );\n\t}", "java.lang.String getCsStr();", "private String getString(Node node) {\n\n\t\tif (stringWriter == null) {\n\t\t\tprtln(\"ERROR: trying to execute sp without a stringWriter\");\n\t\t\treturn null;\n\t\t}\n\t\tStringWriter sw = new StringWriter();\n\n\t\ttry {\n\t\t\tstringWriter.setWriter(sw);\n\t\t\tstringWriter.write(node);\n\t\t\tstringWriter.flush();\n\t\t} catch (Exception e) {\n\t\t\tprtln(\"sp: \" + e.getMessage());\n\t\t}\n\t\treturn sw.toString();\n\t}", "public String toString()\n\t{\n\t\tString result = \"\";\n\t\tresult += this.data;\n\t\treturn result;\n\t}", "public String generateString() {\n List<Trip<String, String, String>> sequence = super.generateSequence(startTrip, endTrip);\n sequence = sequence.subList(1, sequence.size()-1);\n String generated = \"\";\n for (int i = 0; i<sequence.size()-2; i++) generated += sequence.get(i).getThird() + \" \";\n return generated.substring(0, generated.length()-1);\n }", "public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}", "public final String toString(String codeset) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tBufferedOutputStream bos = new BufferedOutputStream(baos);\n\t\tString out = null;\n\t\ttry {\n\t\t\toutput(bos);\n\t\t\tbos.flush();\n\t\t\tout = baos.toString(codeset);\n\t\t\tbos.close();\n\t\t\tbaos.close();\n\t\t} catch (UnsupportedEncodingException use) {} catch (IOException ioe) {}\n\t\treturn (out);\n\t}", "public String toString() { return new String(b,0,i_end); }", "public String fullString();", "public String outputString(EntityRef entity) {\r\n StringWriter out = new StringWriter();\r\n try {\r\n output(entity, out); // output() flushes\r\n } catch (IOException e) { }\r\n return out.toString();\r\n }", "String getStringValue();", "String getStringValue();", "String getOutput();", "public String toString() {\n\t\tString s1,s2,s3,s4;\r\n\t\ts1 = \"{FIR ID: \"+id + \"\\nname= \" + name + \", phone number=\" + phone_no \r\n\t\t\t\t+\"\\nDate: \"+filing_date+\", Address: \" +address\r\n\t\t\t\t+\"\\nFIR Category: \"+category;\r\n\t\t\r\n\t\tif(statement_uploaded) {\r\n\t\t\ts2 = \", Statement Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts2 = \", Statement Not Uploaded\";\r\n\t\t}\r\n\t\tif(id_proof_uploaded) {\r\n\t\t\ts3 = \", ID Proof Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts3 = \", ID Proof Not Uploaded\";\r\n\t\t}\r\n\t\ts4 = \"\\nStatus : \"+status+\"}\";\r\n\t\treturn s1+s2+s3+s4;\r\n\t}", "public static String string() {\n\t\t\tString s = \"\";\n\t\t\ts += \"Locaux :\\n\";\n\t\t\tfor(String key : locaux.keySet()) {\n\t\t\t\tIdent i = locaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\t\t\ts += \"Globaux :\\n\";\n\t\t\tfor(String key : globaux.keySet()) {\n\t\t\t\tIdent i = globaux.get(key);\n\t\t\t\ts += key+\", \"+i.toString()+\"\\n\";\n\t\t\t}\n\n\t\t\treturn s;\n\t\t}", "public String represent();", "String getRaw();", "private static String getString(Object obj) {\n\t\tif (obj.getClass().isArray()) {\n\t\t\treturn array(obj);\n\t\t} else if (obj instanceof Map) {\n\t\t\treturn map(obj);\n\t\t} else if (obj instanceof Collection) {\n\t\t\treturn collection(obj);\n\t\t} else {\n\t\t\t// return obj.toString();\n\t\t\treturn obj(obj);\n\t\t}\n\t}", "String asString ();", "public String toString() {\nString output = new String();\n\noutput = \"shortName\" + \" : \" + \"\" + shortName +\"\\n\"; \noutput += \"type\" + \" : \" + \"\" + type + \"\\n\";\noutput += \"description\" + \" : \" + \"\" + description + \"\\n\"; \n\nreturn output; \n}", "public String toString() {\n\t\treturn str;\n\t}", "public String toString()\n {\n String output = new String();\n output = \"The student's first name is \" + fname + \", and his/her last name is \" + lname + \". His/her grade is \" + grade + \" and his/her student number is \" + studentNumber + \".\";\n return output;\n }", "public String toString()\r\n\t{\r\n\t\treturn toCharSequence().toString();\r\n\t}", "public String toString() {\n\t\tString svar = \"\" + vaerdi; // vaerdi som streng, f.eks. \"4\"\n\t\treturn svar;\n\t}", "public abstract String toString(String context);", "public String toString()\n\t{\n\t\tString output=\"\";\n\n\n\n\n\n\n\t\treturn output+\"\\n\\n\";\n\t}", "public String getString() {\n\t\treturn \"T\";\n\t}", "public String toString()\n {\n if (stringRep == null)\n {\n StringBuilder sb = new StringBuilder();\n switch (type)\n {\n case THREE_PRIME:\n sb.append(\"DNA 3'-\");\n break;\n case FIVE_PRIME:\n sb.append(\"DNA 5'-\");\n break;\n case RNA:\n sb.append(\"RNA \");\n break;\n }\n \n for (int i = 0; i < seq.length; i++)\n {\n sb.append(seq[i]); // Java magic with Enum types -- converts to string.\n }\n \n switch (type)\n {\n case THREE_PRIME:\n sb.append(\"-5'\");\n break;\n case FIVE_PRIME:\n sb.append(\"-3'\");\n break;\n }\n \n stringRep = sb.toString();\n }\n \n return stringRep;\n }", "public String string() {\n\treturn string;\n }", "public String toString() {\n\t\treturn toString(0, 0);\n\t}" ]
[ "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.75480735", "0.73693967", "0.73693967", "0.73693967", "0.73243684", "0.681684", "0.68157613", "0.6783349", "0.6783309", "0.6779656", "0.6768165", "0.67602736", "0.6716165", "0.6696786", "0.66907245", "0.6684198", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.66712666", "0.6665323", "0.6623152", "0.6621127", "0.66113776", "0.6604005", "0.6595585", "0.6580781", "0.6563942", "0.6557136", "0.6551835", "0.6506457", "0.65037906", "0.64903086", "0.6480016", "0.64685404", "0.6464334", "0.64508057", "0.64508057", "0.644815", "0.64441854", "0.64378196", "0.6414499", "0.6413861", "0.6403816", "0.63724065", "0.6369464", "0.6358499", "0.6349003", "0.6341653", "0.6337487", "0.63324", "0.6314369", "0.6313672", "0.63043207", "0.6299516", "0.6299186" ]
0.0
-1
A data structure which holds the whole set of parameters which affect specific MiXCR action.
@JsonAutoDetect( fieldVisibility = JsonAutoDetect.Visibility.ANY, isGetterVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE) @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = CommandAlign.AlignConfiguration.class, name = "align-configuration"), @JsonSubTypes.Type(value = CommandAssemble.AssembleConfiguration.class, name = "assemble-configuration"), @JsonSubTypes.Type(value = CommandAssembleContigs.AssembleContigsConfiguration.class, name = "assemble-contig-configuration"), @JsonSubTypes.Type(value = CommandAssemblePartialAlignments.AssemblePartialConfiguration.class, name = "assemble-partial-configuration"), @JsonSubTypes.Type(value = CommandExtend.ExtendConfiguration.class, name = "extend-configuration"), @JsonSubTypes.Type(value = CommandMergeAlignments.MergeConfiguration.class, name = "merge-configuration"), @JsonSubTypes.Type(value = CommandFilterAlignments.FilterConfiguration.class, name = "filter-configuration"), @JsonSubTypes.Type(value = CommandSortAlignments.SortConfiguration.class, name = "sort-configuration"), @JsonSubTypes.Type(value = CommandSlice.SliceConfiguration.class, name = "slice-configuration") }) @Serializable(asJson = true) public interface ActionConfiguration<Conf extends ActionConfiguration<Conf>> { String actionName(); /** Action version string */ default String versionId() { return ""; } /** Compatible with other configuration */ default boolean compatibleWith(Conf other) { return equals(other); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n // Adding All values to Params.\n // The firs argument should be same sa your MySQL database table columns.\n params.put(\"claim_intimationid\", cino);\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", _phoneNo);\n params.put(\"token\", token);\n params.put(\"role\", String.valueOf(pref.getResposibility()));\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Brand_Id\", Brand_Id);\n params.put(\"Brand_Name\", Brand_Name);\n params.put(\"description\", description);\n params.put(\"brand_status\",brand_status);\n params.put(\"reason\", reason);\n params.put(\"Creation_Date\", Creation_Date);\n params.put(\"Updated_Date\", Updated_Date);\n params.put(\"Admin_Id\", Admin_Id);\n\n return params;\n }", "public Object[] getParameters() {\n \t// return the parameters as used for the rule validation\n Object[] params = new Object[1];\n params[0] = charge;\n return params;\n }", "public Map getParameters();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"reg_No\", regNo);\n params.put(\"manufacturer\", manufacture);\n params.put(\"model_Variant\", modelVar);\n params.put(\"PrevPolicyNo\", prevPolicyNo);\n params.put(\"mobile\", mobile);\n params.put(\"inspection_id\", pref.getInspectioID());\n\n Log.e(TAG, \"Posting params: \" + params.toString());\n\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"user_id\", userIdInput);\n params.put(\"date\", selectedDate);\n params.put(\"type\", typeInput);\n\n return params;\n }", "@Override\r\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\r\n\r\n // Adding All values to Params.\r\n params.put(\"name\", Name);\r\n params.put(\"age\", Age);\r\n params.put(\"phone_no\", Phoneno);\r\n params.put(\"h_lic_no\", Hospitallic);\r\n params.put(\"appoinment_date\", Appointment1);\r\n params.put(\"address\", Address);\r\n params.put(\"permision\", Permission);\r\n\r\n return params;\r\n }", "private void getJobDetailAttributes(HashMap<String, JobParameter> attributes) {\n String dataType = \"String\";\n // Override Parameters with user input parameter\n for(OptionalParams params:OptionalParams.values()){\n String value = inputParams.getProperty(params.name());\n JobParameter parameter = null;\n if(inputParams.containsKey(params.name()) && value!=null && !value.isEmpty()){\n value = value.trim();\n switch (params) {\n case TARGET_SHARED_IDSTORE_SEARCHBASE:\n parameter = createJobParameter(Constants.RECON_SEARCH_BASE, value,dataType);\n attributes.put(Constants.RECON_SEARCH_BASE, parameter);\n break;\n case RECON_SEARCH_FILTER:\n parameter = createJobParameter(Constants.RECON_SEARCH_FILTER, value,dataType);\n attributes.put(Constants.RECON_SEARCH_FILTER, parameter);\n break;\n case BATCHSIZE:\n parameter = getBatchSize(value);\n attributes.put(Constants.BATCH_SIZE_ATTR, parameter);\n break;\n case RECON_PARTIAL_TRIGGER:\n if(value.isEmpty() || value.equalsIgnoreCase(\"ALL\")){\n for(String key:partialTriggerOptionMap.keySet()){\n parameter = createJobParameter(partialTriggerOptionMap.get(key), null,\"Boolean\");\n\t\t\t\t parameter.setValue(new Boolean(\"true\"));\n attributes.put(partialTriggerOptionMap.get(key),parameter);\n }\n }else{\n // Parse all configured atomic reconciliation to be executed\n StringTokenizer tokens = new StringTokenizer(value,Constants.TOKEN_SEPARATOR);\n Set<String> atomicRecons = new HashSet<String>();\n while(tokens.hasMoreTokens()){\n atomicRecons.add(tokens.nextToken());\n }\n // Set atomic reconciliation job parameters\n for(String key:partialTriggerOptionMap.keySet()){\n String paramValue = atomicRecons.contains(key) ? \"true\" : \"false\";\n parameter = createJobParameter(partialTriggerOptionMap.get(key), null,\"Boolean\");\n\t\t\t\t parameter.setValue(new Boolean(paramValue));\n attributes.put(partialTriggerOptionMap.get(key),parameter);\n }\n }\n break;\n default:\n break;\n }\n }\n }\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"huruf\", huruf);\n params.put(\"derajat_lengan_x\", drajatX);\n params.put(\"derajat lengan_y\", drajatY);\n params.put(\"gambar\", gambar);\n\n return params;\n }", "@Override\n\tpublic LinkedHashMap<String,?> getRequiredParams() {\n\t\tLinkedHashMap<String,String> requiredParams = new LinkedHashMap<>();\n\t\trequiredParams.put(\"crv\", crv.toString());\n\t\trequiredParams.put(\"kty\", getKeyType().getValue());\n\t\trequiredParams.put(\"x\", x.toString());\n\t\trequiredParams.put(\"y\", y.toString());\n\t\treturn requiredParams;\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"tag\", \"privacy\");\n params.put(\"flag\", switch_value);\n params.put(\"email\", email);\n return params;\n }", "Map<String, String> getParameters();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"fecha\", fecha);\n params.put(\"hInicio\", inicio);\n params.put(\"hFin\", fin);\n params.put(\"cantCompas\", cantidad);\n params.put(\"id\", id);\n params.put(\"correo\", correo);\n params.put(\"min\",m);\n return params;\n }", "public abstract Map<String,List<Parameter>> getWorkflowParameters();", "@JsonGetter(\"parameters\")\n public ActionParameters getActionValues() {\n return new ActionParameters()\n .setTarget(getTarget() != null ? getTarget() : getName())\n .setValue(getValue())\n .setLabel(getLabel())\n .setServerAction(getServerAction())\n .setTargetAction(getTargetAction());\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n // Adding All values to Params.\n params.put(\"ubaid\", globalVar.getUbaid());\n\n return params;\n }", "Map<String, Object> getParameters();", "Map<String, Object> getParameters();", "public interface ICommonAction {\n\n void obtainData(Object data, String methodIndex, int status,Map<String, String> parameterMap);\n\n\n}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n\n params.put(\"resortName\", resortName);\n params.put(\"latitude\", String.valueOf(lat));\n params.put(\"longitude\", String.valueOf(lon));\n\n\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"id\", idb);\n params.put(\"correo\", correob);\n return params;\n }", "public Map<String, AccessPoint> createParameters() {\r\n\t\tMap<String, AccessPoint> pm = new TreeMap<String, AccessPoint>();\r\n\t\tpm.put(\"vcNumber\", new MutableFieldAccessPoint(\"vcNumber\", this));\r\n\t\treturn pm;\r\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n params.put(\"email\", leaderboardEntry.getEmail());\n params.put(\"level_num\", String.valueOf(leaderboardEntry.getLevel_num()));\n params.put(\"score\", String.valueOf(leaderboardEntry.getScore()));\n params.put(\"moves\", String.valueOf(leaderboardEntry.getMoves()));\n params.put(\"time\", leaderboardEntry.getTime());\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"chat_id\", m.getChat_id()+\"\");\n params.put(\"sender_id\", m.getSender_id()+\"\");\n params.put(\"content\", m.getContent()+\"\");\n params.put(\"send_time\", m.getTime()+\"\");\n\n return params;\n }", "public Map<String, AccessPoint> createParameters() {\n Map<String, AccessPoint> pm = new TreeMap<>();\n pm.put(\"Minimum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMinimum\", this));\n pm.put(\"Maximum funds of the visitors in EUR\", new MutableFieldAccessPoint(\"fundsMaximum\", this));\n pm.put(\"Tourist arrival time to Venice\", new MutableFieldAccessPoint(\"visitorArrivalVenice\", this));\n pm.put(\"Tourist arrival time to Milan\", new MutableFieldAccessPoint(\"visitorArrivalMilan\", this));\n pm.put(\"Tourist arrival time to Ravenna\", new MutableFieldAccessPoint(\"visitorArrivalRavenna\", this));\n return pm;\n }", "@Override\n protected Map<String, String> getParams() {\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"gender\", gender);\n params.put(\"category\", category);\n params.put(\"subcategory\", subcategory);\n\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n params.put(\"complex_id\",complex_id);\n Log.d(TAG, \"complex_id: \"+params);\n\n return params;\n }", "public CldSapKMParm() {\n\t\tmsgType = -1;\n\t\t// module = -1;\n\t\tcreateType = -1;\n\t\treceiveObject = -1;\n\t\tmessageId = -1;\n\t\ttitle = \"\";\n\t\tcreateuserid = -1;\n\t\tcreateuser = \"\";\n\t\tusermobile = \"\";\n\t\tcreatetime = \"\";\n\t\thyperlink = \"\";\n\t\tapptype = -1;\n\t\tpoptype = -1;\n\t\timageurl = \"\";\n\t\troadname = \"\";\n\t\tdownloadTime = 0;\n\t\tstatus = 0;\n\t\tpoiMsg = new SharePoiParm();\n\t\trouteMsg = new ShareRouteParm();\n\t\toperateMsg = new ShareOperateParm();\n\t\taKeyCallMsg = new ShareAKeyCallParm();\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n params.put(\"complex_id\", complex_id);\n params.put(\"block\", block_name);\n params.put(\"type\", user_type);\n\n // Log.d(TAG, \"city_id: \"+params);\n\n return params;\n }", "private static Map<String, Object> handleParams(WMElement params) {\n Map<String, Object> res = new HashMap<>();\n int i = 0;\n for (; i < params.ConvertToIdentifier().GetNumberChildren(); i++) {\n WMElement curParam = params.ConvertToIdentifier().GetChild(i);\n String curParamName = curParam.GetAttribute();\n if (!curParam.GetValueType().equalsIgnoreCase(\"id\")) {\n res.put(curParamName, curParam.GetValueAsString());\n }\n else {\n List<Pair<String, String>> extraFeatures = new ArrayList<>();\n for (int j = 0; j < curParam.ConvertToIdentifier().GetNumberChildren(); j++) {\n WMElement curFeature = curParam.ConvertToIdentifier().GetChild(j);\n extraFeatures.add(new ImmutablePair<>(curFeature.GetAttribute(),\n curFeature.GetValueAsString()));\n }\n\n res.put(curParamName, extraFeatures);\n }\n }\n return res;\n }", "@Override\n\tpublic Parameter[] getParameters() {\n\t\treturn new Parameter[] { weight, tolerance, svmType, kernelType, kernelDegree, kernelGamma, kernelCoefficient, parameterC,\n\t\t\t\tparameterNu };\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"role\", String.valueOf(0));\n params.put(\"mobile\", input_user_mobile.getText().toString());\n params.put(\"password\", input_user_password.getText().toString());\n return params;\n }", "public ShareAKeyCallParm() {\n\t\t\tthis.action = \"\";\n\t\t\tthis.startPoint = new AKeyCallPoint();\n\t\t\tthis.endPoint = new AKeyCallPoint();\n\t\t\tthis.routePoint = new AKeyCallPoint();\n\t\t\tthis.avoidPoint = new AKeyCallPoint();\n\t\t\tthis.navigationMode = \"\";\n\t\t\tthis.proxy_Id = \"\";\n\t\t}", "private AcquisitionParameters(ControlVocabularyManager cvManager) {\n\t\tsuper(cvManager);\n\t\tString[] parentAccessionsTMP = { \"MS:1000441\", \"MS:1000480\", \"MS:1000487\", \"MS:1000481\",\n\t\t\t\t\"MS:1000027\", \"MS:1000482\", ACQUISITION_PARAMETER_ACCESSION };\n\t\tthis.parentAccessions = parentAccessionsTMP;\n\t\tString[] explicitAccessionsTMP = { \"MS:1000032\" };\n\t\tthis.explicitAccessions = explicitAccessionsTMP;\n\n\t}", "int getSetParameterActionsCount();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"action\", \"feed\");\n // Log.e(\"ttt for id>>\", UserId);\n params.put(\"id\", UserId);\n // Log.e(\"ttt for gid >>\", gid);\n params.put(\"gid\", gid);\n params.put(\"after\",lastId);\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n// params.put(\"ead_tokan\", AppConfig.EAD_TOKEN);\n// params.put(\"ead_email\", email);\n params.put(\"npl_token\", \"a\");\n params.put(\"npl_aid\", mediaId);\n params.put(\"npl_id\", userId);\n return params;\n }", "@Override\n protected TreeMap<String, String> getCommonParamMap() {\n TreeMap commonParam = new TreeMap();\n commonParam.put(\"clintInfo\", getClientInfo());\n if(!TextUtils.isEmpty(SharedPreferencesUtil.getString(KeelApplication.getApplicationConext(),\"sessionid\"))){\n commonParam.put(\"sessionid\", SharedPreferencesUtil.getString(KeelApplication.getApplicationConext(),\"sessionid\"));\n }\n// commonParam.put(\"platformType\", \"2\");\n// commonParam.put(\"ver\", version);\n return commonParam;\n }", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }", "public Map<String, String> params() {\n return Collections.unmodifiableMap(params);\n }", "public abstract ImmutableMap<String, ParamInfo> getParamInfos();", "public interface AMParams {\r\n static final String RM_WEB = \"rm.web\";\r\n static final String APP_ID = \"app.id\";\r\n static final String JOB_ID = \"job.id\";\r\n static final String TASK_ID = \"task.id\";\r\n static final String TASK_TYPE = \"task.type\";\r\n static final String ATTEMPT_STATE = \"attempt.state\";\r\n static final String COUNTER_GROUP = \"counter.group\";\r\n static final String COUNTER_NAME = \"counter.name\";\r\n}", "@Override\n\tpublic ParameterSet requiredParameters()\n\t{\n\t\t// Parameter p0 = new\n\t\t// Parameter(\"Dummy Parameter\",\"Lets user know that the function has been selected.\",FormLine.DROPDOWN,new\n\t\t// String[] {\"true\"},0);\n\t\tParameter p0 = getNumThreadsParameter(10, 4);\n\t\tParameter p1 = new Parameter(\"Old Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p2 = new Parameter(\"Old Max\", \"Image Intensity Value\", \"4095.0\");\n\t\tParameter p3 = new Parameter(\"New Min\", \"Image Intensity Value\", \"0.0\");\n\t\tParameter p4 = new Parameter(\"New Max\", \"Image Intensity Value\", \"65535.0\");\n\t\tParameter p5 = new Parameter(\"Gamma\", \"0.1-5.0, value of 1 results in no change\", \"1.0\");\n\t\tParameter p6 = new Parameter(\"Output Bit Depth\", \"Depth of the outputted image\", Parameter.DROPDOWN, new String[] { \"8\", \"16\", \"32\" }, 1);\n\t\t\n\t\t// Make an array of the parameters and return it\n\t\tParameterSet parameterArray = new ParameterSet();\n\t\tparameterArray.addParameter(p0);\n\t\tparameterArray.addParameter(p1);\n\t\tparameterArray.addParameter(p2);\n\t\tparameterArray.addParameter(p3);\n\t\tparameterArray.addParameter(p4);\n\t\tparameterArray.addParameter(p5);\n\t\tparameterArray.addParameter(p6);\n\t\treturn parameterArray;\n\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n\n params.put(\"id\", id);\n params.put(\"type\", type);\n\n Log.d(TAG, \"getParams: \"+params);\n\n\n\n return params;\n }", "private void buildOtherParams() {\n\t\tmClient.putRequestParam(\"attrType\", \"1\");\r\n\t}", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n String image = getStringImage(bmpChange);\n\n\n //Creating parameters\n Map<String,String> params = new Hashtable<String, String>();\n\n //Adding parameters\n params.put(\"image\", image);\n\n //returning parameters\n return params;\n }", "@Override\n\tpublic List<NameValuePair> getParams() {\n\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\tparams.add(new BasicNameValuePair(KEY_ID, Integer.toString(id)));\n params.add(new BasicNameValuePair(KEY_VEHICLE_IDVEHICLE, Integer.toString(idVehicle)));\n params.add(new BasicNameValuePair(KEY_ITEMS_IDITEMS, Integer.toString(idItem)));\n params.add(new BasicNameValuePair(KEY_RECEIPT_IDRECEIPT, Integer.toString(idReceipt)));\n params.add(new BasicNameValuePair(KEY_WORKMILEAGE, Integer.toString(WorkMileage)));\n params.add(new BasicNameValuePair(KEY_WORKNOTES, WorkNotes));\n\t\t\n\t\treturn params;\n\t}", "private Map<String, Object> buildResourcesParameters() {\n Map<String, Object> parameters = new HashMap<String, Object>();\n \n parameters.put(\"portalSiteSelectedNodes\", getSelectedResources(StagingService.SITES_PORTAL_PATH));\n parameters.put(\"groupSiteSelectedNodes\", getSelectedResources(StagingService.SITES_GROUP_PATH));\n parameters.put(\"userSiteSelectedNodes\", getSelectedResources(StagingService.SITES_USER_PATH));\n parameters.put(\"siteContentSelectedNodes\", getSelectedResources(StagingService.CONTENT_SITES_PATH));\n parameters.put(\"applicationCLVTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_APPLICATION_CLV_PATH));\n parameters.put(\"applicationSearchTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_APPLICATION_SEARCH_PATH));\n parameters.put(\"documentTypeTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_DOCUMENT_TYPE_PATH));\n parameters.put(\"metadataTemplatesSelectedNodes\", getSelectedResources(StagingService.ECM_TEMPLATES_METADATA_PATH));\n parameters.put(\"taxonomySelectedNodes\", getSelectedResources(StagingService.ECM_TAXONOMY_PATH));\n parameters.put(\"querySelectedNodes\", getSelectedResources(StagingService.ECM_QUERY_PATH));\n parameters.put(\"driveSelectedNodes\", getSelectedResources(StagingService.ECM_DRIVE_PATH));\n parameters.put(\"scriptSelectedNodes\", getSelectedResources(StagingService.ECM_SCRIPT_PATH));\n parameters.put(\"actionNodeTypeSelectedNodes\", getSelectedResources(StagingService.ECM_ACTION_PATH));\n parameters.put(\"nodeTypeSelectedNodes\", getSelectedResources(StagingService.ECM_NODETYPE_PATH));\n parameters.put(\"registrySelectedNodes\", getSelectedResources(StagingService.REGISTRY_PATH));\n parameters.put(\"viewTemplateSelectedNodes\", getSelectedResources(StagingService.ECM_VIEW_TEMPLATES_PATH));\n parameters.put(\"viewConfigurationSelectedNodes\", getSelectedResources(StagingService.ECM_VIEW_CONFIGURATION_PATH));\n parameters.put(\"userSelectedNodes\", getSelectedResources(StagingService.USERS_PATH));\n parameters.put(\"groupSelectedNodes\", getSelectedResources(StagingService.GROUPS_PATH));\n parameters.put(\"roleSelectedNodes\", getSelectedResources(StagingService.ROLE_PATH));\n \n parameters.put(\"selectedResources\", selectedResources);\n parameters.put(\"selectedOptions\", selectedOptions);\n \n return parameters;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Eid\", id + \"\");\n\n\n return params;\n }", "public interface ZabbixAction {\n String getName();\n\n void setName(String name);\n\n Integer getEventsource();\n\n void setEventsource(Integer eventsource);\n\n Integer getEvaltype();\n\n void setEvaltype(Integer evaltype);\n\n Integer getEscPeriod();\n\n void setEscPeriod(Integer escPeriod);\n\n String getDefLongdata();\n\n void setDefLongdata(String defLongdata);\n\n List<Condition> getConditions();\n\n void setConditions(List<Condition> conditions);\n\n List<Operation> getOperations();\n\n void setOperations(List<Operation> operations);\n}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<>();\n params.put(\"user_id\", globalClass.getId());\n params.put(\"view\", \"getMyTaskRewardsByUser\");\n\n Log.d(TAG, \"getParams: \"+params);\n return params;\n }", "public CObject get_ParamActionObjects(short qoil, CAct pAction)\r\n {\r\n rh2EnablePick = true;\r\n CObject pObject = get_CurrentObjects(qoil);\r\n if (pObject != null)\r\n {\r\n if (repeatFlag == false)\r\n {\r\n // Pas de suivant\r\n pAction.evtFlags &= ~CAct.ACTFLAGS_REPEAT;\t\t// Ne pas refaire cette action\r\n return pObject;\r\n }\r\n else\r\n {\r\n // Un suivant\r\n pAction.evtFlags |= CAct.ACTFLAGS_REPEAT;\t\t// Refaire cette action\r\n rh2ActionLoop = true;\t\t\t \t// Refaire un tour d'actions\r\n return pObject;\r\n }\r\n }\r\n pAction.evtFlags &= ~CAct.ACTFLAGS_REPEAT;\t\t\t\t// Ne pas refaire cette action\r\n pAction.evtFlags |= CEvent.EVFLAGS_NOTDONEINSTART;\r\n return pObject;\r\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"lapangan\", lapangan);\n params.put(\"jam\", jam);\n params.put(\"durasi\", durasi);\n\n return params;\n }", "public Map getParameters() {\r\n\t\treturn parameters;\r\n\t}", "public Map getParams() {\n\t\treturn _params;\n\t}", "private HashMap<List<Integer>,List<Integer>> obtainValidActions(){\n\t\tHashMap<List<Integer>,List<Integer>> mapp= new HashMap<List<Integer>,List<Integer>>();\n\t\tfor (int i = 0;i<states.size();i++) {\n\t\t\tList<Integer> act= new ArrayList<Integer>();\n\t\t\tfor (int j = 0; j < actions.size(); j++) {\n\t\t\t\tif (isActionValid(states.get(i), actions.get(j))) \n\t\t\t\t\t//System.out.println(\"Inside Validation if\\n\");\n\t\t\t\t\tact.add(j);\n\t\t\t}\n\t\t\tmapp.put(states.get(i),act);\n\t\t}\n\t\treturn mapp;\n\t}", "@Override\r\n\t\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\t\tMap<String, String> map = new HashMap<String, String>();\r\n\t\t\t\tmap.put(\"mer_session_id\", application.getLoginInfo()\r\n\t\t\t\t\t\t.getMer_session_id());\r\n\t\t\t\tmap.put(\"pagenum\", 15 + \"\");\r\n\t\t\t\tmap.put(\"type\", orderType);\r\n\t\t\t\treturn map;\r\n\t\t\t}", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"is_like\", is_like);\n params.put(\"p_name\", p_name);\n return params;\n }", "org.naru.park.ParkController.CommonActionOrBuilder getAllOrBuilder();", "org.naru.park.ParkController.CommonActionOrBuilder getAllOrBuilder();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"title\", name);\n params.put(\"ean\", ean);\n params.put(\"supplier\", supplier);\n params.put(\"offer\", offer);\n params.put(\"price\", price);\n\n return params;\n }", "public parmLottC () {\r\n \r\n course = \"\"; // name of this course\r\n\r\n idA = new long [100]; // request id array\r\n wghtA = new int [100]; // weight of this request\r\n\r\n id2A = new long [100]; // request id array\r\n wght2A = new int [100]; // weight of this request\r\n players2A = new int [100]; // # of players in the request\r\n\r\n timeA = new int [100]; // tee time\r\n fbA = new short [100]; // f/b for the tee time\r\n busyA = new boolean [100]; // tee time busy flag\r\n\r\n atimeA = new int [5]; // assigned tee time array per req (save area)\r\n }", "@Override\r\n\tpublic Properties getParameters() {\r\n\r\n\t\tProperties params = new Properties();\r\n\r\n\t\tparams.put(\"project\", \"project\");\r\n\t\tparams.put(\"rejected-methods\", \"file\");\r\n\t\tparams.put(\"rejected-types\", \"file\");\r\n\r\n\t\treturn params;\r\n\t}", "private void getParameters(BlendmontParam blendmontParam) {\n blendmontParam.setBinByFactor(getBinning());\n updateMetaData();\n }", "public DISPPARAMS() {\n\t\t\tsuper();\n\t\t}", "@Override\n protected Map<String, String> getParams() {\n return requestParams;\n }", "@Override\n protected Map<String, String> getParams() {\n return requestParams;\n }", "public LinkedList<String> getActionArgs() {\n\t\treturn actionArgs;\n\t}", "public Map<String, String> getParameters()\n {\n return prmCache;\n }", "public void setParameters(Map<String, String> param) {\n\n // check the occurrence of required parameters\n if(!(param.containsKey(\"Indri:mu\") && param.containsKey(\"Indri:lambda\"))){\n throw new IllegalArgumentException\n (\"Required parameters for IndriExpansion model were missing from the parameter file.\");\n }\n\n this.mu = Double.parseDouble(param.get(\"Indri:mu\"));\n if(this.mu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:mu\") + \", mu is a real number >= 0\");\n\n this.lambda = Double.parseDouble(param.get(\"Indri:lambda\"));\n if(this.lambda < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"Indri:lambda\") + \", lambda is a real number between 0.0 and 1.0\");\n\n if((param.containsKey(\"fb\") && param.get(\"fb\").equals(\"true\"))) {\n this.fb = \"true\";\n\n this.fbDocs = Integer.parseInt(param.get(\"fbDocs\"));\n if (this.fbDocs <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbDocs\") + \", fbDocs is an integer > 0\");\n\n this.fbTerms = Integer.parseInt(param.get(\"fbTerms\"));\n if (this.fbTerms <= 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbTerms\") + \", fbTerms is an integer > 0\");\n\n this.fbMu = Integer.parseInt(param.get(\"fbMu\"));\n if (this.fbMu < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbMu\") + \", fbMu is an integer >= 0\");\n\n this.fbOrigWeight = Double.parseDouble(param.get(\"fbOrigWeight\"));\n if (this.fbOrigWeight < 0) throw new IllegalArgumentException\n (\"Illegal argument: \" + param.get(\"fbOrigWeight\") + \", fbOrigWeight is a real number between 0.0 and 1.0\");\n\n if (param.containsKey(\"fbInitialRankingFile\") && param.get(\"fbInitialRankingFile\") != \"\") {\n this.fbInitialRankingFile = param.get(\"fbInitialRankingFile\");\n try{\n this.initialRanking = readRanking();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }\n\n if (param.containsKey(\"fbExpansionQueryFile\") && param.get(\"fbExpansionQueryFile\") != \"\")\n this.fbExpansionQueryFile = param.get(\"fbExpansionQueryFile\");\n }\n }", "com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction getSetParameterActions(int index);", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n params.put(\"material_item\", String.valueOf(id_material));\n params.put(\"material_detail\", String.valueOf(id_detail));\n params.put(\"material_quantity\", quantity_txt);\n params.put(\"material_class\", String.valueOf(id_class));\n params.put(\"material_unit\", String.valueOf(id_unit));\n params.put(\"supplier_id\", String.valueOf(id_supplier));\n params.put(\"driver_location\", location);\n return params;\n }", "@TestMethod(value=\"testGetParameters\")\n public Object[] getParameters() {\n // return the parameters as used for the descriptor calculation\n Object[] params = new Object[3];\n params[0] = maxIterations;\n params[1] = lpeChecker;\n params[2] = maxResonStruc;\n return params;\n }", "@Parameters\n\tpublic static Collection<ByteBuf> getParams(){\n\t\tByteBuf full = Unpooled.buffer(128);\n\t\tfull.writeInt(0);\n\t\tfull.writeInt(1);\n\t\t\n\t\tByteBuf ill = Unpooled.buffer(128);\n\t\till.writeInt(10);\n\t\t\n\t\treturn Arrays.asList(new ByteBuf[] {\n\t\t\tfull,\n\t\t\till,\n\t\t\tUnpooled.buffer(128),\n\t\t\tnull,\n\t\t});\n\t}", "@Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String,String> params=new HashMap<String, String>() ;\n params.put(\"name\",n);\n params.put(\"rollno\",r);\n params.put(\"admno\",a);\n params.put(\"branch\",b);\n return params;\n }", "private Map<ServerName, List<CompactAction>> getAllActions(ClusterRegionStatus crs) {\n Map<ServerName,List<CompactAction>> perServerActions = new HashMap<ServerName,List<CompactAction>>();\n for(ServerName name : crs.getServers()) {\n List<CompactAction> actions = new ArrayList<CompactAction>();\n ClusterRegionStatus.RegionSizeStatus status = crs.getNextServerRegionStatus(name);\n while(null != status) {\n CompactAction action = getAction(status);\n if(action.getType() != CompactActionType.NONE)\n actions.add(action);\n status = crs.getNextServerRegionStatus(name);\n }\n perServerActions.put(name,actions);\n }\n return perServerActions;\n }", "INDArray getParams();", "public int[] getParams()\n\t{\n\t\treturn null;\n\t}", "java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Fulfillment.SetParameterAction> \n getSetParameterActionsList();", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noOfStudents);\n String creatre = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"createsubmittedform\", creatre);\n params.put(\"uid\",uid);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=1;m<3;m++){\n String z= String.valueOf(m);\n params.put(\"pfid[\"+m+\"]\",z);\n params.put(\"hostelid[\"+m+\"]\",hostelid[m-1]);\n params.put(\"floorno[\"+m+\"]\",floorno[m-1]);\n }\n for (int k = 0; k < noofstudent; k++) {\n int m = k/2 +1;\n String z= String.valueOf(m);\n params.put(\"sid[\"+k+\"]\", sid[k]);\n params.put(\"roominwing[\"+k+\"]\",z );\n }\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"oid\", oid);\n\n return params;\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Dname\", DegreeName);\n params.put(\"iName\", InsName);\n params.put(\"UserId\", uId);\n\n return params;\n }", "@Override\n public byte[] getParams() {\n\n int netAppKeyIndex = (netKeyIndex & 0x0FFF) | ((appKeyIndex & 0x0FFF) << 12);\n// int netAppKeyIndex = ((netKeyIndex & 0x0FFF) << 12) | ((appKeyIndex & 0x0FFF));\n byte[] indexesBuf = MeshUtils.integer2Bytes(netAppKeyIndex, 3, ByteOrder.LITTLE_ENDIAN);\n\n ByteBuffer paramsBuffer = ByteBuffer.allocate(3 + 16).order(ByteOrder.LITTLE_ENDIAN)\n .put(indexesBuf)\n .put(appKey);\n return paramsBuffer.array();\n }", "String [] getParameters();", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"name\", name);\n params.put(\"mobile\",phone);\n params.put(\"email\", email);\n params.put(\"password\", password);\n params.put(\"device_id\", device_id);\n params.put(\"fcm_reg_token\", fcm_token);\n params.put(\"device_type\", device_type);\n\n Log.d(TAG, \"getParams: \"+params);\n\n return params;\n }", "private HashMap<String, Object> createBasicParameters(\n ReportContent reportContent) {\n HashMap<String, Object> parameter = new HashMap<String, Object>();\n parameter.put(\"RESULT_ALTERNATIVES\",\n reportContent.getResultAlternatives());\n parameter.put(\"GOAL_NAME\", reportContent.getGoalName());\n parameter.put(\"RESULT_ALTERNATIVE_CRITERION_MATRIX\",\n reportContent.getResultAlternativeCriterionMatrix());\n parameter.put(\"RESULT_CRITERIA\", reportContent.getResultCriteria());\n parameter.put(\"RESULT_CONSISTENCY_RATIO\",\n reportContent.getResultConsistencyRatio());\n parameter.put(\"RESULT_CRITICAL_CONSISTENCY_RATIO\",\n Double.toString(this.criticalCr));\n\n return parameter;\n }", "final void getParameters()\r\n {\r\n hostName=getParameter(\"hostname\");\r\n\tIPAddress=getParameter(\"IPAddress\");\r\n\tString num=getParameter(\"maxSearch\");\r\n\tString arg=getParameter(\"debug\");\r\n\tserver=getParameter(\"server\");\r\n\tindexName=getParameter(\"indexName\");\r\n\tString colour=getParameter(\"bgColour\");\r\n\r\n\tif(colour==null)\r\n\t{\r\n\t bgColour=Color.lightGray;\r\n }\r\n else\r\n\t{\r\n\t try\r\n\t {\r\n\t bgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t bgColour=Color.lightGray;\r\n\t }\r\n\t}\r\n\t\r\n\tcolour=getParameter(\"fgColour\");\r\n\tif(colour==null)\r\n\t{\r\n\t fgColour=Color.black;\r\n\t}\r\n\telse\r\n\t{\r\n\t try\r\n\t {\r\n\t fgColour=new Color(Integer.parseInt(colour,16));\r\n\t }\r\n\t catch(NumberFormatException nfe)\r\n\t {\r\n\t fgColour=Color.black;\r\n\t }\r\n\t}\r\n\r\n\t//Check for missing parameters.\r\n\tif(hostName==null && server==null)\r\n\t{\r\n\t statusArea.setText(\"Error-no host/server\");\r\n\t hostName=\"none\";\r\n\t}\r\n\r\n\tmaxSearch=(num == null) ? MAX_NUMBER_PAGES : Integer.parseInt(num);\r\n }", "@Override\n protected Map<String, String> getParams() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"chat_id\", id+\"\");\n\n return params;\n }", "public LinkedHashMap<String, FunctionParameter> inputParameters(){\n return new LinkedHashMap<String, FunctionParameter>();\n }", "public final GenericRJ_Parameters get_genericParams () {\n\t\tif (!( modstate >= MODSTATE_CATALOG )) {\n\t\t\tthrow new IllegalStateException (\"Access to RJGUIModel.genericParams while in state \" + cur_modstate_string());\n\t\t}\n\t\treturn aafs_fcparams.generic_params;\n\t}", "@Override\n\tprotected Map getParameters() throws Exception {\n\t\tInteger caseFileId =(Integer) getView().getValue(\"caseFileId\");\n\t\tString sql = \"SELECT cf FROM CaseFile cf WHERE caseFileId = :caseFileId\";\n\t\tQuery query = XPersistence.getManager().createQuery(sql);\n\t\tquery.setParameter(\"caseFileId\", caseFileId);\n\t\tCaseFile caseFile = (CaseFile) query.getSingleResult();\n\t \n\t\tCourtCaseFile cCF = caseFile.getCourtCaseFile();\n\t\tString cName = \"\";\n\t\tString cdate = \"\";\n\t\tString cfile = \"\";\n\t\tString dfile = \"\";\n\t\tString csubject = \"\";\n\t\tString ctot = \"\";\n\n\t\tif (cCF!=null) {\n\t\t\tTypeOfTrial tot=\tcCF.getTypeOfTrial();\n\t\t\tif (tot!=null)\n\t\t\t\tctot = tot.getName();\n\t\t\tCourt court = cCF.getCourt();\n\t\t\tif (court!=null)\n\t\t\t\tcName = court.getName(); \n\t\t\tString courtDate = cCF.getCourtdate();\n\t\t\tif (courtDate!=null) {\n\t\t\t\tcdate = courtDate;\n\t\t\t}\n\n\t\t\tcfile = cCF.getCourtFile();\n\t\t\tdfile = cCF.getDescriptionFile();\n\t\t\tSubject subject = cCF.getSubject();\n\t\t\tif (subject!=null)\n\t\t\t\tcsubject = subject.getName(); \n\t\t}\n\t\t\n\n\t\t\t\n\t\tMap parameters = new HashMap();\t\n\t\tparameters.put(\"descriptionFile\",dfile);\n\t\tparameters.put(\"file\",cfile);\n\t\tparameters.put(\"typeoftrail\", ctot);\n\t\tparameters.put(\"courtday\" ,cdate);\n\t\tparameters.put(\"subject\", csubject);\n\t\tparameters.put(\"court\",cName);\n\t\t\n\t\tAgendaRequest agendaRequest = caseFile.getAgendaRequest();\n\t\t//AgendaRequest agendaRequest = XPersistence.getManager().findByFolderName(AgendaRequest.class, id); \n\t\tGroupLawCenter glc = agendaRequest.getGroupLawCenter();\n\n\t\tConsultantPerson person = agendaRequest.getPerson();\n\t\tString personName = \"\";\n\t\tpersonName = personName.concat(person.getName());\n\t\tpersonName = personName.concat(\" \");\n\t\tpersonName = personName.concat(person.getLastName());\n\n\t\t\t\n\t\tparameters.put(\"agendaRequestId\",agendaRequest.getFolderNumber());\n\t\tparameters.put(\"personName\", personName);\n\t\tString glcName = (String)glc.getName();\n\t\tif (glcName == null)\n\t\t\tglcName = \"\";\n\t\tparameters.put(\"group\", glcName);\n\t\t\n\t\tString glcPlace = (String)glc.getPlace();\n\t\tif (glcPlace == null)\n\t\t\tglcPlace = \"\";\n\t\tparameters.put(\"place\", glcPlace);\n\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\tString date = dateFormat.format(agendaRequest.getDate());\n\t\n\t\tparameters.put(\"day\", date);\n\t\t\n\t\tString hourst = glc.getStartTime();\n\t\thourst = hourst.concat(\" a \");\n\t\thourst = hourst.concat(glc.getEndTime());\n\t\t\n\t\t\n\t\tparameters.put(\"hourst\", hourst);\n\t\tSex sex = person.getSex(); \n\t\tString s;\n\t\tif (sex == null)\n\t\t \ts = \"\";\n\t\telse {\n\t\t\ts = person.getSex().toString() ;\n\t\t\tif (s== \"MALE\")\n\t\t\ts = \"Masculino\" ;\n\t\t\telse\n\t\t\t\ts=\"Femenino\";\n\t\t}\n\t\t\n\t\tparameters.put(\"sex\", s);\n\t\tparameters.put(\"age\", person.getAge());\n\t\t\n\t\tAddress address = person.getAddress();\n\t\tString a = \"\"; \n\t\tString sa = \"\";\n\t\t\n\n\t\tif (address != null) {\n\t\t\tsa = address.getStreet();\n\t\t\tDepartment dep = address.getDepartment();\n\t\t\tNeighborhood nbh =address.getNeighborhood();\n\t\t\tif (nbh != null)\n\t\t\t\ta= a.concat(address.getNeighborhood().getName()).concat(\", \");\n\t\t\t\n\t\t\tif (dep != null)\n\t\t\t\ta= a.concat(address.getDepartment().getName());\n\t\t}\t\n\t\tparameters.put(\"address\", sa);\n\t\tparameters.put(\"addressB\", a);\n\t\tparameters.put(\"salary\", person.getSalary());\n\t\t\n\t\tparameters.put(\"address\", sa);\n\t\tparameters.put(\"addressB\", a);\n\t\tparameters.put(\"salary\", person.getSalary());\n\t\t\n\t\tDocumentType dt = person.getDocumentType();\n\t\tString d = \"\";\n\t\tif (dt != null)\n\t\t\t d= person.getDocumentType().getName();\n\t\td = d.concat(\" \");\n\t\td = d.concat(person.getDocumentId());\n\t\tparameters.put(\"document\", d);\n\t\tparameters.put(\"phone\", person.getPhone());\n\t\tparameters.put(\"mobile\", person.getMobile());\n\t\tparameters.put(\"motive\", agendaRequest.getVisitReason().getReason());\n\t\tparameters.put(\"email\", person.getEmail());\n\t\tparameters.put(\"problem\", (agendaRequest.getProblem()!=null)?agendaRequest.getProblem():\"\");\n\n\t\treturn parameters;\n\t}", "Map<String, String[]> getParameterMap();", "protected String readParams(Hashtable<String,String> params, String errors,\n EdaContext xContext) throws IcofException {\n\tif (params.containsKey(\"-c\")) {\n\t setComponent(xContext, params.get(\"-c\"));\n\t}\n\telse {\n\t errors += \"Component (-c) is a required parameter\\n\";\n\t}\n\n\t// Read the Branch name\n\tif (params.containsKey(\"-b\")) {\n\t setName((String) params.get(\"-b\"));\n\t}\n\telse {\n\t errors += \"Branch name (-n) is a required parameter\\n\";\n\t}\n\treturn errors;\n }", "@Override\n protected Map<String, String> getParams() {\n\n Map<String, String> params = new HashMap<>();\n params.put(\"GroupName\", groupName);\n params.put(\"GroupPassword\", groupPassword);\n JSONArray groceryArray = new JSONArray(groceries);\n params.put(\"GroupGroceries\", groceryArray.toString());\n JSONArray memberArray = new JSONArray(members);\n params.put(\"GroupMembers\", memberArray.toString());\n JSONArray taskArray = new JSONArray(tasks);\n params.put(\"GroupTasks\", taskArray.toString());\n JSONArray memberIdArray = new JSONArray(memberIds);\n params.put(\"MemberIds\", memberIdArray.toString());\n return params;\n }", "public Map getParameterMap() {\n return params;\n }", "public Map<String, String> getParameters() {\r\n return _parameters;\r\n }", "@Override\n protected Map<String, String> getParams() {\n int noofstudent = 2*Integer.parseInt(noOfStudents);\n String creatre = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"createsavedform\", creatre);\n params.put(\"uid\",uid);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=1;m<3;m++){\n String z= String.valueOf(m);\n params.put(\"pfid[\"+m+\"]\",z);\n params.put(\"hostelid[\"+m+\"]\",hostelid[m-1]);\n params.put(\"floorno[\"+m+\"]\",floorno[m-1]);\n }\n for (int k = 0; k < noofstudent; k++) {\n int m = k/2 +1;\n String z= String.valueOf(m);\n params.put(\"sid[\"+k+\"]\", sid[k]);\n params.put(\"sname[\"+k+\"]\", sname[k]);\n params.put(\"roominwing[\"+k+\"]\",z );\n }\n\n return params;\n }", "private Hashtable getRequestedAttributes() {\n\tif (fRequestedAttributes == null) {\n\t fRequestedAttributes = new Hashtable(7, (float)0.9);\n fRequestedAttributes.put(TextAttribute.TRANSFORM,\n\t\t\t\t IDENT_TX_ATTRIBUTE);\n fRequestedAttributes.put(TextAttribute.FAMILY, name);\n fRequestedAttributes.put(TextAttribute.SIZE, new Float(size));\n\t fRequestedAttributes.put(TextAttribute.WEIGHT,\n\t\t\t\t (style & BOLD) != 0 ? \n\t\t\t\t TextAttribute.WEIGHT_BOLD :\n\t\t\t\t TextAttribute.WEIGHT_REGULAR);\n\t fRequestedAttributes.put(TextAttribute.POSTURE,\n\t\t\t\t (style & ITALIC) != 0 ? \n\t\t\t\t TextAttribute.POSTURE_OBLIQUE :\n\t\t\t\t TextAttribute.POSTURE_REGULAR);\n fRequestedAttributes.put(TextAttribute.SUPERSCRIPT,\n new Integer(superscript));\n fRequestedAttributes.put(TextAttribute.WIDTH,\n new Float(width));\n\t}\n\treturn fRequestedAttributes;\n }" ]
[ "0.60223985", "0.5871455", "0.5832861", "0.58311033", "0.58253086", "0.57883376", "0.57718986", "0.5764522", "0.5743745", "0.57411546", "0.5726742", "0.5701177", "0.5646927", "0.5643222", "0.56378144", "0.559781", "0.55932784", "0.55614674", "0.55614674", "0.555953", "0.5545347", "0.55249196", "0.5498909", "0.547544", "0.54601157", "0.5433671", "0.5413092", "0.53971404", "0.5390238", "0.5386439", "0.53840595", "0.53470033", "0.53419423", "0.5329831", "0.5327973", "0.5320693", "0.5318254", "0.5317352", "0.53116745", "0.5308149", "0.5304392", "0.5299591", "0.5298258", "0.5294112", "0.529379", "0.52928054", "0.529274", "0.52921486", "0.5266755", "0.5263413", "0.5253186", "0.52451456", "0.524385", "0.5233252", "0.52122045", "0.5211011", "0.5200927", "0.5186859", "0.5184898", "0.5180187", "0.5171712", "0.5164838", "0.5164838", "0.5164605", "0.5163173", "0.5162573", "0.5156209", "0.51488996", "0.51485974", "0.51485974", "0.5145546", "0.5143912", "0.5130305", "0.51259375", "0.5121487", "0.5120302", "0.51160073", "0.51142466", "0.51129824", "0.5112186", "0.5109529", "0.5105286", "0.5103119", "0.5100227", "0.50971776", "0.50968504", "0.50964016", "0.5084576", "0.5081464", "0.5079229", "0.50775194", "0.50751257", "0.5073429", "0.50580794", "0.5055284", "0.5054628", "0.50490695", "0.5040692", "0.5040004", "0.5038706", "0.5038502" ]
0.0
-1
Compatible with other configuration
default boolean compatibleWith(Conf other) { return equals(other); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean hasAdditionalConfig() { return true; }", "@Override\n public void checkConfiguration() {\n }", "private void config() {\n\t}", "protected void validateConfiguration() {}", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "protected void additionalConfig(ConfigType config){}", "private OptimoveConfig() {\n }", "public abstract String getConfig();", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "public abstract Configuration configuration();", "public interface Configuration {\n\n}", "private Config() {\n }", "C getConfiguration();", "protected void checkConfiguration() {\n \tsuper.checkConfiguration();\n \t\n if (this.customizations == null) {\n this.customizations = new ArrayList<String>();\n }\n if (this.options == null) {\n this.options = new HashMap<String, String>();\n }\n if (this.sourceDirectories == null) {\n \tthis.sourceDirectories = new ArrayList<String>();\n \tthis.sourceDirectories.add(DEFAULT_SOURCE_DIRECTORY);\n }\n }", "public abstract CONFIG build();", "public interface AdminToolConfig \n{\n\tpublic static final String WEBJARS_CDN_PREFIX = \"https://cdn.jsdelivr.net/webjars/\";\n\t\n\tpublic static final String WEBJARS_CDN_PREFIX_BOWER = WEBJARS_CDN_PREFIX + \"org.webjars.bower/\";\n\t\n\tpublic static final String WEBJARS_LOCAL_PREFIX = \"/webjars/\";\n\t\n\t/**\n\t * should print the configuration to log\n\t */\n\tpublic void printConfig();\n\t\n\t/**\n\t * should return if component is active or deactivated\n\t * @return\n\t */\n\tpublic boolean isEnabled();\n}", "@Test\n public void testLoadDifferentSources() throws ConfigurationException\n {\n factory.setFile(MULTI_FILE);\n Configuration config = factory.getConfiguration();\n assertFalse(config.isEmpty());\n assertTrue(config instanceof CombinedConfiguration);\n CombinedConfiguration cc = (CombinedConfiguration) config;\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n\n assertNotNull(config\n .getProperty(\"tables.table(0).fields.field(2).name\"));\n assertNotNull(config.getProperty(\"element2.subelement.subsubelement\"));\n assertEquals(\"value\", config.getProperty(\"element3\"));\n assertEquals(\"foo\", config.getProperty(\"element3[@name]\"));\n assertNotNull(config.getProperty(\"mail.account.user\"));\n\n // test JNDIConfiguration\n assertNotNull(config.getProperty(\"test.onlyinjndi\"));\n assertTrue(config.getBoolean(\"test.onlyinjndi\"));\n\n Configuration subset = config.subset(\"test\");\n assertNotNull(subset.getProperty(\"onlyinjndi\"));\n assertTrue(subset.getBoolean(\"onlyinjndi\"));\n\n // test SystemConfiguration\n assertNotNull(config.getProperty(\"java.version\"));\n assertEquals(System.getProperty(\"java.version\"), config\n .getString(\"java.version\"));\n\n // test INIConfiguration\n assertEquals(\"Property from ini file not found\", \"yes\",\n config.getString(\"testini.loaded\"));\n\n // test environment configuration\n EnvironmentConfiguration envConf = new EnvironmentConfiguration();\n for (Iterator<String> it = envConf.getKeys(); it.hasNext();)\n {\n String key = it.next();\n String combinedKey = \"env.\" + key;\n assertEquals(\"Wrong value for env property \" + key,\n envConf.getString(key), config.getString(combinedKey));\n }\n }", "default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }", "@Override\n\tprotected void configure() {\n\n\t}", "void setConfiguration();", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "@Override\r\n\tprotected void configure() {\n\t\t\r\n\t}", "boolean hasConfiguration();", "boolean requiresConfigSchema();", "@Override\n protected void configure() {\n }", "boolean hasOldConfig();", "public interface HubConfig {\n\n String HUB_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES = \"hub-modules-deploy-timestamps.properties\";\n String USER_MODULES_DEPLOY_TIMESTAMPS_PROPERTIES = \"user-modules-deploy-timestamps.properties\";\n String USER_CONTENT_DEPLOY_TIMESTAMPS_PROPERTIES = \"user-content-deploy-timestamps.properties\";\n\n String HUB_CONFIG_DIR = \"hub-internal-config\";\n String USER_CONFIG_DIR = \"user-config\";\n String ENTITY_CONFIG_DIR = \"entity-config\";\n String STAGING_ENTITY_SEARCH_OPTIONS_FILE = \"staging-entity-options.xml\";\n String FINAL_ENTITY_SEARCH_OPTIONS_FILE = \"final-entity-options.xml\";\n\n String DEFAULT_STAGING_NAME = \"data-hub-STAGING\";\n String DEFAULT_FINAL_NAME = \"data-hub-FINAL\";\n String DEFAULT_TRACE_NAME = \"data-hub-TRACING\";\n String DEFAULT_JOB_NAME = \"data-hub-JOBS\";\n String DEFAULT_MODULES_DB_NAME = \"data-hub-MODULES\";\n String DEFAULT_TRIGGERS_DB_NAME = \"data-hub-TRIGGERS\";\n String DEFAULT_SCHEMAS_DB_NAME = \"data-hub-SCHEMAS\";\n\n String DEFAULT_ROLE_NAME = \"data-hub-role\";\n String DEFAULT_USER_NAME = \"data-hub-user\";\n\n Integer DEFAULT_STAGING_PORT = 8010;\n Integer DEFAULT_FINAL_PORT = 8011;\n Integer DEFAULT_TRACE_PORT = 8012;\n Integer DEFAULT_JOB_PORT = 8013;\n\n String DEFAULT_AUTH_METHOD = \"digest\";\n\n String DEFAULT_SCHEME = \"http\";\n\n Integer DEFAULT_FORESTS_PER_HOST = 4;\n\n String DEFAULT_CUSTOM_FOREST_PATH = \"forests\";\n\n String getHost();\n\n // staging\n String getStagingDbName();\n void setStagingDbName(String stagingDbName);\n\n String getStagingHttpName();\n void setStagingHttpName(String stagingHttpName);\n\n Integer getStagingForestsPerHost();\n void setStagingForestsPerHost(Integer stagingForestsPerHost);\n\n Integer getStagingPort();\n void setStagingPort(Integer stagingPort);\n\n String getStagingAuthMethod();\n void setStagingAuthMethod(String stagingAuthMethod);\n\n String getStagingScheme();\n void setStagingScheme(String stagingScheme);\n\n boolean getStagingSimpleSsl();\n void setStagingSimpleSsl(boolean stagingSimpleSsl);\n\n @JsonIgnore\n SSLContext getStagingSslContext();\n void setStagingSslContext(SSLContext stagingSslContext);\n\n @JsonIgnore\n DatabaseClientFactory.SSLHostnameVerifier getStagingSslHostnameVerifier();\n void setStagingSslHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier stagingSslHostnameVerifier);\n\n String getStagingCertFile();\n void setStagingCertFile(String stagingCertFile);\n\n String getStagingCertPassword();\n void setStagingCertPassword(String stagingCertPassword);\n\n String getStagingExternalName();\n void setStagingExternalName(String stagingExternalName);\n\n // final\n String getFinalDbName();\n void setFinalDbName(String finalDbName);\n\n String getFinalHttpName();\n void setFinalHttpName(String finalHttpName);\n\n Integer getFinalForestsPerHost();\n void setFinalForestsPerHost(Integer finalForestsPerHost);\n\n Integer getFinalPort();\n void setFinalPort(Integer finalPort);\n\n String getFinalAuthMethod();\n void setFinalAuthMethod(String finalAuthMethod);\n\n String getFinalScheme();\n void setFinalScheme(String finalScheme);\n\n @JsonIgnore\n boolean getFinalSimpleSsl();\n void setFinalSimpleSsl(boolean finalSimpleSsl);\n\n @JsonIgnore\n SSLContext getFinalSslContext();\n void setFinalSslContext(SSLContext finalSslContext);\n\n DatabaseClientFactory.SSLHostnameVerifier getFinalSslHostnameVerifier();\n void setFinalSslHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier finalSslHostnameVerifier);\n\n String getFinalCertFile();\n void setFinalCertFile(String finalCertFile);\n\n String getFinalCertPassword();\n void setFinalCertPassword(String finalCertPassword);\n\n String getFinalExternalName();\n void setFinalExternalName(String finalExternalName);\n\n // traces\n String getTraceDbName();\n void setTraceDbName(String traceDbName);\n\n String getTraceHttpName();\n void setTraceHttpName(String traceHttpName);\n\n Integer getTraceForestsPerHost();\n void setTraceForestsPerHost(Integer traceForestsPerHost);\n\n Integer getTracePort();\n void setTracePort(Integer tracePort);\n\n String getTraceAuthMethod();\n void setTraceAuthMethod(String traceAuthMethod);\n\n String getTraceScheme();\n void setTraceScheme(String traceScheme);\n\n @JsonIgnore\n boolean getTraceSimpleSsl();\n void setTraceSimpleSsl(boolean traceSimpleSsl);\n\n @JsonIgnore\n SSLContext getTraceSslContext();\n void setTraceSslContext(SSLContext traceSslContext);\n\n DatabaseClientFactory.SSLHostnameVerifier getTraceSslHostnameVerifier();\n void setTraceSslHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier traceSslHostnameVerifier);\n\n String getTraceCertFile();\n void setTraceCertFile(String traceCertFile);\n\n String getTraceCertPassword();\n void setTraceCertPassword(String traceCertPassword);\n\n String getTraceExternalName();\n void setTraceExternalName(String traceExternalName);\n\n // jobs\n String getJobDbName();\n void setJobDbName(String jobDbName);\n\n String getJobHttpName();\n void setJobHttpName(String jobHttpName);\n\n Integer getJobForestsPerHost();\n void setJobForestsPerHost(Integer jobForestsPerHost);\n\n Integer getJobPort();\n void setJobPort(Integer jobPort);\n\n String getJobAuthMethod();\n void setJobAuthMethod(String jobAuthMethod);\n\n String getJobScheme();\n void setJobScheme(String jobScheme);\n\n boolean getJobSimpleSsl();\n void setJobSimpleSsl(boolean jobSimpleSsl);\n\n @JsonIgnore\n SSLContext getJobSslContext();\n void setJobSslContext(SSLContext jobSslContext);\n\n @JsonIgnore\n DatabaseClientFactory.SSLHostnameVerifier getJobSslHostnameVerifier();\n void setJobSslHostnameVerifier(DatabaseClientFactory.SSLHostnameVerifier jobSslHostnameVerifier);\n\n String getJobCertFile();\n void setJobCertFile(String jobCertFile);\n\n String getJobCertPassword();\n void setJobCertPassword(String jobCertPassword);\n\n String getJobExternalName();\n void setJobExternalName(String jobExternalName);\n\n String getModulesDbName();\n void setModulesDbName(String modulesDbName);\n\n Integer getModulesForestsPerHost();\n void setModulesForestsPerHost(Integer modulesForestsPerHost);\n\n\n // triggers\n String getTriggersDbName();\n void setTriggersDbName(String triggersDbName);\n\n Integer getTriggersForestsPerHost();\n void setTriggersForestsPerHost(Integer triggersForestsPerHost);\n\n // schemas\n String getSchemasDbName();\n void setSchemasDbName(String schemasDbName);\n\n Integer getSchemasForestsPerHost();\n void setSchemasForestsPerHost(Integer schemasForestsPerHost);\n\n // roles and users\n String getHubRoleName();\n void setHubRoleName(String hubRoleName);\n\n String getHubUserName();\n void setHubUserName(String hubUserName);\n\n\n String[] getLoadBalancerHosts();\n void setLoadBalancerHosts(String[] loadBalancerHosts);\n\n String getCustomForestPath();\n void setCustomForestPath(String customForestPath);\n\n String getModulePermissions();\n void setModulePermissions(String modulePermissions);\n\n String getProjectDir();\n void setProjectDir(String projectDir);\n\n @JsonIgnore\n HubProject getHubProject();\n\n void initHubProject();\n\n @JsonIgnore\n String getHubModulesDeployTimestampFile();\n @JsonIgnore\n String getUserModulesDeployTimestampFile();\n @JsonIgnore\n File getUserContentDeployTimestampFile();\n\n @JsonIgnore\n ManageConfig getManageConfig();\n void setManageConfig(ManageConfig manageConfig);\n @JsonIgnore\n ManageClient getManageClient();\n void setManageClient(ManageClient manageClient);\n\n @JsonIgnore\n AdminConfig getAdminConfig();\n void setAdminConfig(AdminConfig adminConfig);\n @JsonIgnore\n AdminManager getAdminManager();\n void setAdminManager(AdminManager adminManager);\n\n DatabaseClient newAppServicesClient();\n\n /**\n * Creates a new DatabaseClient for accessing the Staging database\n * @return - a DatabaseClient\n */\n DatabaseClient newStagingClient();\n\n DatabaseClient newStagingClient(String databaseName);\n\n /**\n * Creates a new DatabaseClient for accessing the Final database\n * @return - a DatabaseClient\n */\n DatabaseClient newFinalClient();\n\n /**\n * Creates a new DatabaseClient for accessing the Job database\n * @return - a DatabaseClient\n */\n DatabaseClient newJobDbClient();\n\n /**\n * Creates a new DatabaseClient for accessing the Trace database\n * @return - a DatabaseClient\n */\n DatabaseClient newTraceDbClient();\n\n /**\n * Creates a new DatabaseClient for accessing the Hub Modules database\n * @return - a DatabaseClient\n */\n DatabaseClient newModulesDbClient();\n\n @JsonIgnore\n Path getHubPluginsDir();\n @JsonIgnore\n Path getHubEntitiesDir();\n\n @JsonIgnore\n Path getHubConfigDir();\n @JsonIgnore\n Path getHubDatabaseDir();\n @JsonIgnore\n Path getHubServersDir();\n @JsonIgnore\n Path getHubSecurityDir();\n @JsonIgnore\n Path getUserSecurityDir();\n @JsonIgnore\n Path getUserConfigDir();\n @JsonIgnore\n Path getUserDatabaseDir();\n @JsonIgnore\n Path getEntityDatabaseDir();\n @JsonIgnore\n Path getUserServersDir();\n @JsonIgnore\n Path getHubMimetypesDir();\n\n @JsonIgnore\n AppConfig getAppConfig();\n void setAppConfig(AppConfig config);\n\n void setAppConfig(AppConfig config, boolean skipUpdate);\n\n String getJarVersion() throws IOException;\n}", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "@Override\n\tpublic void configure() {\n\t\t\n\t}", "public interface IConfiguration extends ISessionAwareObject {\n\n\tString ENV_SOPECO_HOME = \"SOPECO_HOME\";\n\n\tString CONF_LOGGER_CONFIG_FILE_NAME = \"sopeco.config.loggerConfigFileName\";\n\n\tString CONF_SCENARIO_DESCRIPTION_FILE_NAME = \"sopeco.config.measurementSpecFileName\";\n\n\tString CONF_SCENARIO_DESCRIPTION = \"sopeco.config.measurementSpecification\";\n\n\tString CONF_MEASUREMENT_CONTROLLER_URI = \"sopeco.config.measurementControllerURI\";\n\n\tString CONF_MEASUREMENT_CONTROLLER_CLASS_NAME = \"sopeco.config.measurementControllerClassName\";\n\n\tString CONF_APP_NAME = \"sopeco.config.applicationName\";\n\n\tString CONF_MAIN_CLASS = \"sopeco.config.mainClass\";\n\n\tString CONF_MEC_ACQUISITION_TIMEOUT = \"sopeco.config.MECAcquisitionTimeout\";\n\n\n\tString CONF_MEC_SOCKET_RECONNECT_DELAY = \"sopeco.config.mec.reconnectDelay\";\n\n\tString CONF_HTTP_PROXY_HOST = \"sopeco.config.httpProxyHost\";\n\t\n\tString CONF_HTTP_PROXY_PORT = \"sopeco.config.httpProxyPort\";\n\n\t\n\tString CONF_DEFINITION_CHANGE_HANDLING_MODE = \"sopeco.config.definitionChangeHandlingMode\";\n\tString DCHM_ARCHIVE = \"archive\";\n\tString DCHM_DISCARD = \"discard\";\n\n\tString CONF_SCENARIO_DEFINITION_PACKAGE = \"sopeco.config.xml.scenarioDefinitionPackage\";\n\t/** Holds the path to the root folder of SoPeCo. */\n\tString CONF_APP_ROOT_FOLDER = \"sopeco.config.rootFolder\";\n\tString CONF_EXPERIMENT_EXECUTION_SELECTION = \"sopeco.engine.experimentExecutionSelection\";\n\t/**\n\t * Holds the path to the plugins folder, relative to the root folder of\n\t * SoPeCo.\n\t */\n\tString CONF_PLUGINS_DIRECTORIES = \"sopeco.config.pluginsDirs\";\n\n\tString CLA_EXTENSION_ID = \"org.sopeco.config.commandlinearguments\";\n\n\t/** Folder for configuration files relative to the application root folder */\n\tString DEFAULT_CONFIG_FOLDER_NAME = \"config\";\n\n\tString DEFAULT_CONFIG_FILE_NAME = \"sopeco-defaults.conf\";\n\n\tString DIR_SEPARATOR = \":\";\n\t\n\tString EXPERIMENT_RUN_ABORT = \"org.sopeco.experiment.run.abort\";\n\n\t/**\n\t * Export the configuration as a key-value map. Both, the default ones and the ones in the\n\t * system environment are included.\n\t * \n\t * @return a key-value representation of the configuration\n\t * \n\t * @deprecated Use {@code exportConfiguration()} and {@code exportDefaultConfiguration}.\n\t */\n\t@Deprecated\n\tMap<String, Object> getProperties();\n\t\n\t/**\n\t * Exports the configuration as a key-value map. The default configuration and the ones\n\t * defined in the system environment are not included. \n\t * \n\t * @return a key-value representation of the configuration\n\t */\n\tMap<String, Object> exportConfiguration();\n\t\n\t/**\n\t * Exports the default configuration as a key-value map. The actual configuration and the ones\n\t * defined in the system environment are not included. \n\t * \n\t * @return a key-value representation of the configuration\n\t */\n\tMap<String, Object> exportDefaultConfiguration();\n\t\n\t/**\n\t * Imports the configuration as a key-value map. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid importConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Imports the default configuration as a key-value map. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid importDefaultConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Overwrites the configuration with the given configuration. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid overwriteConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Overwrites the default configuration with the given configuration. \n\t * \n\t * @param config a key-value map representation of the default configuration\n\t */\n\tvoid overwriteDefaultConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Returns the configured value of the given property in SoPeCo.\n\t * \n\t * It first looks up the current SoPeCo configuration, if there is no value\n\t * defined there, looks up the system properties, if no value is defined\n\t * there, then loads it from the default values; in case of no default\n\t * value, returns null.\n\t * \n\t * @param key\n\t * property key\n\t * @return Returns the configured value of the given property in SoPeCo.\n\t */\n\tObject getProperty(String key);\n\n\t/**\n\t * Returns the configured value of the given property as a String.\n\t * \n\t * This method calls the {@link Object#toString()} of the property value and\n\t * is for convenience only. If the given property is not set, it returns\n\t * <code>null</code>.\n\t * \n\t * @param key\n\t * property key\n\t * \n\t * @see #getProperty(String)\n\t * @return Returns the configured value of the given property as a String.\n\t */\n\tString getPropertyAsStr(String key);\n\n\t/**\n\t * Returns the configured value of the given property as a Boolean value.\n\t * \n\t * This method uses the {@link #getPropertyAsStr(String)} and interprets\n\t * values 'yes' and 'true' (case insensitive) as a Boolean <code>true</code>\n\t * value and all other values as <code>false</code>. If the value of the\n\t * given property is <code>null</code> it returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a boolean\n\t * \n\t * @see #getProperty(String)\n\t */\n\tboolean getPropertyAsBoolean(String key, boolean defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as a Long value.\n\t * \n\t * This method uses the {@link Long.#parseLong(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a long\n\t * \n\t * @see #getProperty(String)\n\t */\n\tlong getPropertyAsLong(String key, long defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as a Double value.\n\t * \n\t * This method uses the {@link Double.#parseLong(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a double\n\t * \n\t * @see #getProperty(String)\n\t */\n\tdouble getPropertyAsDouble(String key, double defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as an Integer value.\n\t * \n\t * This method uses the {@link Integer.#parseInt(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as an int\n\t * \n\t * @see #getProperty(String)\n\t */\n\tint getPropertyAsInteger(String key, int defaultValue);\n\n\t/**\n\t * Sets the value of a property for the current run.\n\t * \n\t * @param key\n\t * property key\n\t * @param value\n\t * property value\n\t */\n\tvoid setProperty(String key, Object value);\n\n\t/**\n\t * Clears the value of the given property in all layers of configuration,\n\t * including the system property environment.\n\t * \n\t * @param key the property\n\t */\n\tvoid clearProperty(String key);\n\n\t/**\n\t * Returns the default value (ignoring the current runtime configuration)\n\t * for a given property.\n\t * \n\t * @param key\n\t * porperty key\n\t * \n\t * @return Returns the default value for a given property.\n\t */\n\tObject getDefaultValue(String key);\n\n\t/**\n\t * Processes the given command line arguments, the effects of which will\n\t * reflect in the global property values.\n\t * \n\t * @param args\n\t * command line arguments\n\t * @throws ConfigurationException\n\t * if there is any problem with command line arguments\n\t */\n\tvoid processCommandLineArguments(String[] args) throws ConfigurationException;\n\n\t/**\n\t * Loads default configurations from a file name. If the file name is not an\n\t * absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the system class loader. See\n\t * {@link #loadDefaultConfiguration(ClassLoader, String)} for loading\n\t * default configuration providing a class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t * \n\t */\n\tvoid loadDefaultConfiguration(String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads default configurations from a file name. If the file name is not an\n\t * absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the given class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param classLoader\n\t * an instance of a class loader\n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadDefaultConfiguration(ClassLoader classLoader, String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads user-level configurations from a file name. If the file name is not\n\t * an absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the system class loader. See\n\t * {@link #loadConfiguration(ClassLoader, String)} for loading default\n\t * configuration providing a class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadConfiguration(String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads user-level configurations from a file name. If the file name is not\n\t * an absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finally the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the given class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param classLoader\n\t * an instance of a class loader\n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadConfiguration(ClassLoader classLoader, String fileName) throws ConfigurationException;\n\n\t/**\n\t * Performs any post processing of configuration settings that may be\n\t * required.\n\t * \n\t * This method can be called after manually making changes to the\n\t * configuration values. It should be called automatically after a call to\n\t * {@link IConfiguration#loadConfiguration(String)}.\n\t */\n\tvoid applyConfiguration();\n\n\t/**\n\t * Sets the value of scenario description file name.\n\t * \n\t * @param fileName\n\t * file name\n\t * @see #CONF_SCENARIO_DESCRIPTION_FILE_NAME\n\t */\n\tvoid setScenarioDescriptionFileName(String fileName);\n\n\t/**\n\t * Sets the sceanrio description as the given object. This property in\n\t * effect overrides the value of scenario description file name (\n\t * {@link IConfiguration#CONF_SCENARIO_DESCRIPTION_FILE_NAME}).\n\t * \n\t * @param sceanrioDescription\n\t * an instance of a scenario description\n\t * @see #CONF_SCENARIO_DESCRIPTION\n\t */\n\tvoid setScenarioDescription(Object sceanrioDescription);\n\n\t/**\n\t * Sets the measurement controller URI.\n\t * \n\t * @param uriStr\n\t * a URI as an String\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tvoid setMeasurementControllerURI(String uriStr) throws ConfigurationException;\n\n\t/**\n\t * Sets the measurement controller class name. This also sets the\n\t * measurement controller URI to be '<code>class://[CLASS_NAME]</code>'.\n\t * \n\t * @param className\n\t * the full name of the class\n\t * @see #CONF_MEASUREMENT_CONTROLLER_CLASS_NAME\n\t */\n\tvoid setMeasurementControllerClassName(String className);\n\n\t/**\n\t * Sets the application name for this executable instance.\n\t * \n\t * @param appName\n\t * an application name\n\t */\n\tvoid setApplicationName(String appName);\n\n\t/**\n\t * Sets the main class that runs this thread. This will also be used in\n\t * finding the root folder\n\t * \n\t * @param mainClass\n\t * class to be set as main class\n\t */\n\tvoid setMainClass(Class<?> mainClass);\n\n\t/**\n\t * Sets the logger configuration file name and triggers logger\n\t * configuration.\n\t * \n\t * @param fileName\n\t * a file name\n\t */\n\tvoid setLoggerConfigFileName(String fileName);\n\n\t/**\n\t * @return Returns the application root directory.\n\t */\n\tString getAppRootDirectory();\n\n\t/**\n\t * Sets the application root directory to the given folder.\n\t * \n\t * @param rootDir\n\t * path to a folder\n\t */\n\tvoid setAppRootDirectory(String rootDir);\n\n\t/**\n\t * @return Returns the application's configuration directory.\n\t */\n\tString getAppConfDirectory();\n\n\t/**\n\t * @return Returns the value of scenario description file name.\n\t * \n\t * @see #CONF_SCENARIO_DESCRIPTION_FILE_NAME\n\t */\n\tString getScenarioDescriptionFileName();\n\n\t/**\n\t * @return returns the sceanrio description as the given object.\n\t * \n\t * @see #CONF_SCENARIO_DESCRIPTION\n\t */\n\tObject getScenarioDescription();\n\n\t/**\n\t * @return Returns the measurement controller URI.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tURI getMeasurementControllerURI();\n\n\t/**\n\t * @return Returns the measurement controller URI as a String.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tString getMeasurementControllerURIAsStr();\n\n\t/**\n\t * @return Returns the measurement controller class name.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_CLASS_NAME\n\t */\n\tString getMeasurementControllerClassName();\n\n\t/**\n\t * @return Returns the application name for this executable instance.\n\t */\n\tString getApplicationName();\n\n\t/**\n\t * @return Returns the main class that runs this thread. This value must\n\t * have been set by a call to\n\t * {@link IConfiguration#setMainClass(Class)}.\n\t */\n\tClass<?> getMainClass();\n\n\t/**\n\t * Writes the current configuration values into a file.\n\t * \n\t * @param fileName\n\t * the name of the file\n\t * @throws IOException\n\t * if exporting the configuration fails\n\t */\n\tvoid writeConfiguration(String fileName) throws IOException;\n\n\t/**\n\t * Overrides the values of this configuration with those of the given\n\t * configuration.\n\t * \n\t * @param configuration\n\t * with the new values\n\t */\n\t void overwrite(IConfiguration configuration);\n\n\t /**\n\t * Adds a new command-line extension to the configuration component. \n\t * \n\t * The same extension will not be added twice. \n\t * \n\t * @param extension a command-line extension\n\t */\n\t void addCommandLineExtension(ICommandLineArgumentsExtension extension);\n\t \n\t /**\n\t * Removes a new command-line extension from the configuration component. \n\t * \n\t * @param extension a command-line extension\n\t */\n\t void removeCommandLineExtension(ICommandLineArgumentsExtension extension);\n}", "@Configuration\n public Option[] configuration() {\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.core\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.sling\", \"org.apache.sling.distribution.api\");\n SlingOptions.versionResolver.setVersionFromProject(\"org.apache.jackrabbit.vault\",\"org.apache.jackrabbit.vault\");\n return new Option[]{\n baseConfiguration(),\n slingQuickstart(),\n logback(),\n // build artifact\n slingDistribution(),\n // testing\n defaultOsgiConfigs(),\n SlingOptions.webconsole(),\n CoreOptions.mavenBundle(\"org.apache.felix\", \"org.apache.felix.webconsole.plugins.ds\", \"2.0.8\"),\n junitBundles()\n };\n }", "public interface ArchivaConfiguration\n{\n\n\n String USER_CONFIG_PROPERTY = \"archiva.user.configFileName\";\n String USER_CONFIG_ENVVAR = \"ARCHIVA_USER_CONFIG_FILE\";\n\n /**\n * Get the configuration.\n *\n * @return the configuration\n */\n Configuration getConfiguration();\n\n /**\n * Save any updated configuration.\n *\n * @param configuration the configuration to save\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Save any updated configuration. This method allows to add a tag to the thrown event.\n * This allows to verify the origin if the caller is the same as the listener.\n *\n * @param configuration the configuration to save\n * @param eventTag the tag to add to the thrown event\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration, String eventTag )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Determines if the configuration in use was as a result of a defaulted configuration.\n *\n * @return true if the configuration was created from the default-archiva.xml as opposed\n * to being loaded from the usual locations of ${user.home}/.m2/archiva.xml or\n * ${appserver.base}/conf/archiva.xml\n */\n boolean isDefaulted();\n\n /**\n * Add a configuration listener to notify of changes to the configuration.\n *\n * @param listener the listener\n */\n void addListener( ConfigurationListener listener );\n\n /**\n * Remove a configuration listener to stop notifications of changes to the configuration.\n *\n * @param listener the listener\n */\n void removeListener( ConfigurationListener listener );\n\n /**\n * Add a registry listener to notify of events in spring-registry.\n *\n * @param listener the listener\n * TODO: Remove in future.\n */\n void addChangeListener( RegistryListener listener );\n\n void removeChangeListener( RegistryListener listener );\n\n /**\n * reload configuration from file included registry\n *\n * @since 1.4-M1\n */\n void reload();\n\n public Locale getDefaultLocale();\n\n public List<Locale.LanguageRange> getLanguagePriorities();\n\n public Path getAppServerBaseDir();\n\n /**\n * Returns the base directory for repositories that have a relative location path set.\n * @return\n */\n public Path getRepositoryBaseDir();\n\n /**\n * Returns the base directory for remote repositories\n * @return\n */\n public Path getRemoteRepositoryBaseDir();\n\n /**\n * Returns the base directory for repository group files.\n * @return\n */\n public Path getRepositoryGroupBaseDir();\n\n /**\n * Returns the data directory where repositories and metadata reside\n * @return\n */\n public Path getDataDirectory();\n\n /**\n * Return the used configuration registry\n * @return\n */\n Registry getRegistry( );\n}", "@Override\n\tpublic void configure() {\n\n\t}", "GeneralConfiguration getGeneralConfiguration();", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "@Override\n\tpublic boolean hasExtraConfigs()\n\t{\n\t\treturn false;\n\t}", "public abstract IOpipeConfiguration config();", "@Override\n public void configure() {\n }", "public interface Configuration {\n// /**\n// * 获取主分词器词库\n// * @return\n// */\n// public String getMainDic();\n// /**\n// * 获取城市词路径\n// * @return String 城市词路径\n// */\n// public String getCityDicionary();\n\n /**\n * 获取城区词路径\n *\n * @return String 获取城区词路径\n */\n public String getRegionDicionary();\n\n /**\n * 获取\"工程师\"类词库路径\n *\n * @return String \"工程师\"类词库路径\n */\n public String getTheoremDicionary();\n\n /**\n * 获取\"总工程师\"类词库路径\n *\n * @return String \"总工程师\"类词库路径\n */\n public String getEngineerDicionary();\n\n /**\n * 获取垃圾类词库路径\n *\n * @return String 垃圾类词库路径\n */\n public String getConjunctionDicionary();\n\n /**\n * 获取多义类词库路径\n *\n * @return String 多义词库路径\n */\n public String getPolysemyDicionary();\n\n /**\n * 获取多职位前词库路径\n *\n * @return String 多职位前词库路径\n */\n public String getManagerDicionary();\n\n /**\n * 获取多职位后词库路径\n *\n * @return String 多职位后词库路径\n */\n public String getAssistantDicionary();\n\n /**\n * 获取数字词库路径\n *\n * @return String 数字词库路径\n */\n public String getNumberDicionary();\n\n /**\n * 获取无用词词库路径\n *\n * @return String 无用词词库路径\n */\n public String getWorthlessDicionary();\n\n /**\n * 获取标签词词库路径\n *\n * @return String 标签词词库路径\n */\n public String getTagDicionary();\n\n /**\n * 获取公司性质词词库路径\n *\n * @return String 公司性质词词库路径\n */\n public String getCorporationDicionary();\n// /**\n// * 获取ik分词器的主路径\n// * @return\n// */\n// public String getIkMainFilePath();\n\n}", "public abstract boolean updateConfig();", "@Override\n public void configureForXmlConformance() {\n mConfig.configureForXmlConformance();\n }", "@Override\r\n protected boolean validateSystemSettings() {\n return true;\r\n }", "public Object\tgetConfiguration();", "public interface Config {\n\t\t/**\n\t\t * the IdentityX policy which should be used for authentication\n\t\t *\n\t\t * @return the policy name\n\t\t */\n\t\t@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();\n\n\t\t/**\n\t\t * the IdentityX application to be used\n\t\t *\n\t\t * @return the application Id\n\t\t */\n\t\t@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();\n\t\t\n\t\t\n\t\t/**\n\t\t * the IdentityX Description to be used\n\t\t *\n\t\t * @return the transactionDescription\n\t\t */\n\t\t@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}\n\t}", "public ValidateConfiguration() {\n super();\n }", "protected void checkIfConfigurationModificationIsAllowed() {\r\n\t\tif (isCompiled()) {\r\n\t\t\tthrow new InvalidDataAccessApiUsageException(\"Configuration can't be altered once the class has been compiled or used.\");\r\n\t\t}\r\n\t}", "private void readComponentConfiguration(ComponentContext context) {\n Dictionary<?, ?> properties = context.getProperties();\n boolean packetOutOnlyEnabled =\n isPropertyEnabled(properties, \"packetOutOnly\");\n if (packetOutOnly != packetOutOnlyEnabled) {\n packetOutOnly = packetOutOnlyEnabled;\n log.info(\"Configured. Packet-out only forwarding is {}\",\n\n packetOutOnly ? \"enabled\" : \"disabled\");\n }\n boolean packetOutOfppTableEnabled =\n isPropertyEnabled(properties, \"packetOutOfppTable\");\n if (packetOutOfppTable != packetOutOfppTableEnabled) {\n packetOutOfppTable = packetOutOfppTableEnabled;\n log.info(\"Configured. Forwarding using OFPP_TABLE port is {}\",\n packetOutOfppTable ? \"enabled\" : \"disabled\");\n }\n boolean ipv6ForwardingEnabled =\n isPropertyEnabled(properties, \"ipv6Forwarding\");\n if (ipv6Forwarding != ipv6ForwardingEnabled) {\n ipv6Forwarding = ipv6ForwardingEnabled;\n log.info(\"Configured. IPv6 forwarding is {}\",\n ipv6Forwarding ? \"enabled\" : \"disabled\");\n }\n boolean matchDstMacOnlyEnabled =\n isPropertyEnabled(properties, \"matchDstMacOnly\");\n if (matchDstMacOnly != matchDstMacOnlyEnabled) {\n matchDstMacOnly = matchDstMacOnlyEnabled;\n log.info(\"Configured. Match Dst MAC Only is {}\",\n matchDstMacOnly ? \"enabled\" : \"disabled\");\n }\n boolean matchVlanIdEnabled =\n isPropertyEnabled(properties, \"matchVlanId\");\n if (matchVlanId != matchVlanIdEnabled) {\n matchVlanId = matchVlanIdEnabled;\n log.info(\"Configured. Matching Vlan ID is {}\",\n matchVlanId ? \"enabled\" : \"disabled\");\n }\n boolean matchIpv4AddressEnabled =\n isPropertyEnabled(properties, \"matchIpv4Address\");\n if (matchIpv4Address != matchIpv4AddressEnabled) {\n matchIpv4Address = matchIpv4AddressEnabled;\n log.info(\"Configured. Matching IPv4 Addresses is {}\",\n matchIpv4Address ? \"enabled\" : \"disabled\");\n }\n boolean matchIpv4DscpEnabled =\n isPropertyEnabled(properties, \"matchIpv4Dscp\");\n if (matchIpv4Dscp != matchIpv4DscpEnabled) {\n matchIpv4Dscp = matchIpv4DscpEnabled;\n log.info(\"Configured. Matching IPv4 DSCP and ECN is {}\",\n matchIpv4Dscp ? \"enabled\" : \"disabled\");\n }\n boolean matchIpv6AddressEnabled =\n isPropertyEnabled(properties, \"matchIpv6Address\");\n if (matchIpv6Address != matchIpv6AddressEnabled) {\n matchIpv6Address = matchIpv6AddressEnabled;\n log.info(\"Configured. Matching IPv6 Addresses is {}\",\n matchIpv6Address ? \"enabled\" : \"disabled\");\n }\n boolean matchIpv6FlowLabelEnabled =\n isPropertyEnabled(properties, \"matchIpv6FlowLabel\");\n if (matchIpv6FlowLabel != matchIpv6FlowLabelEnabled) {\n matchIpv6FlowLabel = matchIpv6FlowLabelEnabled;\n log.info(\"Configured. Matching IPv6 FlowLabel is {}\",\n matchIpv6FlowLabel ? \"enabled\" : \"di packetService.addProcessor(processor, PacketProcessor.director(2));sabled\");\n }\n boolean matchTcpUdpPortsEnabled =\n isPropertyEnabled(properties, \"matchTcpUdpPorts\");\n if (matchTcpUdpPorts != matchTcpUdpPortsEnabled) {\n matchTcpUdpPorts = matchTcpUdpPortsEnabled;\n log.info(\"Configured. Matching TCP/UDP fields is {}\",\n matchTcpUdpPorts ? \"enabled\" : \"disabled\");\n }\n boolean matchIcmpFieldsEnabled =\n isPropertyEnabled(properties, \"matchIcmpFields\");\n if (matchIcmpFields != matchIcmpFieldsEnabled) {\n matchIcmpFields = matchIcmpFieldsEnabled;\n log.info(\"Configured. Matching ICMP (v4 and v6) fields is {}\",\n matchIcmpFields ? \"enabled\" : \"disabled\");\n }\n Integer flowTimeoutConfigured =\n getIntegerProperty(properties, \"flowTimeout\");\n if (flowTimeoutConfigured == null) {\n flowTimeout = DEFAULT_TIMEOUT;\n log.info(\"Flow Timeout is not configured, default value is {}\",\n flowTimeout);\n } else {\n flowTimeout = flowTimeoutConfigured;\n log.info(\"Configured. Flow Timeout is configured to {}\",\n flowTimeout, \" seconds\");\n }\n Integer flowPriorityConfigured =\n getIntegerProperty(properties, \"flowPriority\");\n if (flowPriorityConfigured == null) {\n flowPriority = DEFAULT_PRIORITY;\n log.info(\"Flow Priority is not configured, default value is {}\",\n flowPriority);\n } else {\n flowPriority = flowPriorityConfigured;\n log.info(\"Configured. Flow Priority is configured to {}\",\n flowPriority);\n }\n\n boolean ignoreIpv4McastPacketsEnabled =\n isPropertyEnabled(properties, \"ignoreIpv4McastPackets\");\n if (ignoreIpv4McastPackets != ignoreIpv4McastPacketsEnabled) {\n ignoreIpv4McastPackets = ignoreIpv4McastPacketsEnabled;\n log.info(\"Configured. Ignore IPv4 multicast packets is {}\",\n ignoreIpv4McastPackets ? \"enabled\" : \"disabled\");\n }\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "boolean isNewConfig();", "public void verifyConfig() {\r\n if (getSpecialHandlingManager() == null)\r\n throw new ConfigurationException(\"The required property 'specialHandlingManager' is missing.\");\r\n }", "protected AmqpTransportConfig() {\n\t\tsuper();\n\t}", "void configure();", "@Config.LoadPolicy(Config.LoadType.MERGE)\[email protected]({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "private PSConfigDeNormalizer()\n {\n\n }", "protected void validate() throws ConfigurationException\n {\n\n }", "public interface GeolocationConfiguration extends Configuration {\n\n /**\n * Default geolocation level to use when none is specified.\n *\n * @return geolocation level to use when none is specified.\n */\n IPGeolocationLevel getIPGeolocationLevel();\n\n /**\n * Indicates whether database must be cached in memory or not.\n * When caching is enabled, performance increases significantly at the\n * expense of an overhead in memory of approximately 2MB.\n *\n * @return true if database must be cached in memory, false otherwise.\n */\n boolean isCachingEnabled();\n\n\n /**\n * Indicates if IP geolocation country database is embedded within\n * application code. If true, then the configured embedded resource will be\n * copied into provided database file (erasing any previous data), otherwise\n * provided external database file will simply be used for geolocation.\n * By default the Maxmind geolite database will be used as an embedded\n * resource.\n *\n * @return true if IP geolocation country database is embedded and copied\n * into provided database file, false if database is simply read from\n * provided file.\n */\n boolean isIPGeolocationCountryDatabaseEmbedded();\n\n /**\n * If provided, the embedded resource will be used to obtain the database\n * and copy it into the file system on provided location (and erasing any\n * previous data).\n * If not provided, but an embedded database is required, then the default\n * embedded resource will be used instead.\n * By default no embedded resource will be specified, and since an embedded\n * database will be used, it will be use the maxmind geolite database\n * embedded in the code.\n *\n * @return embedded resource containing IP geolocation country database.\n */\n String getIPGeolocationCountryEmbeddedResource();\n\n /**\n * File where country IP geolocation database is stored locally.\n * If no embedded database is used, then this file will be used to read the\n * database, if an embedded database is used, then the embedded resource\n * will be copied into this location and the database will be read from\n * there.\n * Notice that Country IP geolocation will only be enabled if a location is\n * available.\n *\n * @return location where country IP geolocation database will be stored\n * locally.\n */\n String getIPGeolocationCountryDatabaseFile();\n\n /**\n * Indicates if IP geolocation city database is embedded within\n * application code. If true, then the configured embedded resource will be\n * copied into provided database file (erasing any previous data), otherwise\n * provided external database file will simply be used for geolocation.\n * By default the Maxmind geolite database will be used as an embedded\n * resource.\n *\n * @return true if IP geolocation city database is embedded and copied\n * into provided database file, false if database is simply read from\n * provided file.\n */\n boolean isIPGeolocationCityDatabaseEmbedded();\n\n /**\n * If provided, the embedded resource will be used to obtain the database\n * and copy it into the file system on provided location (and erasing any\n * previous data).\n * If not provided, but an embedded database is required, then the default\n * embedded resource will be used instead.\n * By default no embedded resource will be specified, and since an embedded\n * database will be used, it will be use the maxmind geolite database\n * embedded in the code.\n *\n * @return embedded resource containing IP geolocation city database.\n */\n String getIPGeolocationCityEmbeddedResource();\n\n /**\n * File where city IP geolocation database is stored locally.\n * If no embedded database is used, then this file will be used to read the\n * database, if an embedded database is used, then the embedded resource\n * will be copied into this location and the database will be read from\n * there.\n * Notice that City IP geolocation will only be enabled if a location is\n * available.\n *\n * @return location where city IP geolocation database will be stored\n * locally.\n */\n String getIPGeolocationCityDatabaseFile();\n}", "boolean hasConfigConnectorConfig();", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "private void checkConfig() {\n\t\t\n\t\tif (config.getDouble(\"configversion\", 0.0) - configVersion > .001) {\n\t\t\tString name = config.getString(QuestConfigurationField.NAME.getKey(), \"NO NAME\");\n\t\t\tQuestManagerPlugin.questManagerPlugin.getLogger().warning(\"The quest [\" + name + \"] has an invalid version!\\n\"\n\t\t\t\t\t+ \"QuestManager Configuration Version: \" + configVersion + \" doesn't match quest's: \" \n\t\t\t\t\t+ config.getDouble(\"configversion\", 0.0));\n\t\t\t\n\t\t}\n\t\t\n\t\t//Check each field and put in defaults if they aren't there (niave approach)\n\t\tfor (QuestConfigurationField field : QuestConfigurationField.values()) {\n\t\t\tif (!config.contains(field.getKey())) {\n\t\t\t\tQuestManagerPlugin.questManagerPlugin.getLogger().warning(\"[\" + getName() + \"] \"\n\t\t\t\t\t\t+ \"Failed to find field information: \" + field.name());\n\t\t\t\tQuestManagerPlugin.questManagerPlugin.getLogger().info(\"Adding default value...\");\n\t\t\t\tconfig.set(field.getKey(), field.getDefault());\n\t\t\t}\n\t\t}\n\t}", "protected DiscoveryVOSConfig() {\n\t\tsuper(BRANCH_ROOT + \".DiscoveryVOS.com.discoveryVOS.\".replace('.', File.separatorChar));\n\t}", "protected void enhanceConfig(ConfigurationBuilder c) {\n }", "boolean hasNewConfig();", "private void getExternalConfig()\n {\n String PREFIX = \"getExternalConfig override name [{}] value [{}]\";\n // Check to see if the ldap host has been overridden by a system property:\n String szValue = System.getProperty( EXT_LDAP_HOST );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_HOST, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_HOST, szValue );\n }\n // Check to see if the ldap port has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_PORT );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_PORT, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_PORT, szValue );\n }\n\n // Check to see if the admin pool uid has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_UID );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_UID, szValue );\n // never display ldap admin userid name to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_ADMIN_POOL_UID );\n }\n\n // Check to see if the admin pool pw has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_PW, szValue );\n // never display password of any type to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_ADMIN_POOL_PW );\n }\n\n // Check to see if the admin pool min connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MIN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MIN, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MIN, szValue );\n }\n\n // Check to see if the admin pool max connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_ADMIN_POOL_MAX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_ADMIN_POOL_MAX, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_ADMIN_POOL_MAX, szValue );\n }\n\n // Check to see if the log pool uid has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_UID );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_UID, szValue );\n // never display ldap admin userid name to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_LOG_POOL_UID );\n }\n\n // Check to see if the log pool pw has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_PW, szValue );\n // never display password of any type to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.LDAP_LOG_POOL_PW );\n }\n\n // Check to see if the log pool min connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_MIN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_MIN, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_LOG_POOL_MIN, szValue );\n }\n\n // Check to see if the log pool max connections has been overridden by a system property:\n szValue = System.getProperty( EXT_LDAP_LOG_POOL_MAX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.LDAP_LOG_POOL_MAX, szValue );\n LOG.info( PREFIX, GlobalIds.LDAP_LOG_POOL_MAX, szValue );\n }\n\n // Check to see if ssl enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_SSL );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_SSL, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL, szValue );\n }\n \n // Check to see if start tls enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_STARTTLS );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_STARTTLS, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_STARTTLS, szValue );\n }\n\n // Check to see if the ssl debug enabled parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_ENABLE_LDAP_SSL_DEBUG );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue );\n LOG.info( PREFIX, GlobalIds.ENABLE_LDAP_SSL_DEBUG, szValue );\n }\n\n // Check to see if the trust store location has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE, szValue );\n LOG.info( PREFIX, GlobalIds.TRUST_STORE, szValue );\n }\n\n // Check to see if the trust store password has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE_PW );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE_PW, szValue );\n // never display password value to log:\n LOG.info( \"getExternalConfig override name [{}]\", GlobalIds.TRUST_STORE_PW );\n }\n\n // Check to see if the trust store onclasspath parameter has been overridden by a system property:\n szValue = System.getProperty( EXT_TRUST_STORE_ONCLASSPATH );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.TRUST_STORE_ON_CLASSPATH, szValue );\n LOG.info( PREFIX, GlobalIds.TRUST_STORE_ON_CLASSPATH, szValue );\n }\n\n // Check to see if the suffix has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_SUFFIX );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.SUFFIX, szValue );\n LOG.info( PREFIX, GlobalIds.SUFFIX, szValue );\n\n }\n\n // Check to see if the config realm name has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_REALM );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.CONFIG_REALM, szValue );\n LOG.info( PREFIX, GlobalIds.CONFIG_REALM, szValue );\n }\n\n // Check to see if the config node dn has been overridden by a system property:\n szValue = System.getProperty( EXT_CONFIG_ROOT_DN );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.CONFIG_ROOT_PARAM, szValue );\n LOG.info( PREFIX, GlobalIds.CONFIG_ROOT_PARAM, szValue );\n }\n\n // Check to see if the ldap server type has been overridden by a system property:\n szValue = System.getProperty( EXT_SERVER_TYPE );\n if( StringUtils.isNotEmpty( szValue ))\n {\n config.setProperty( GlobalIds.SERVER_TYPE, szValue );\n LOG.info( PREFIX, GlobalIds.SERVER_TYPE, szValue );\n }\n\n // Check to see if ARBAC02 checking enforced in service layer:\n szValue = System.getProperty( EXT_IS_ARBAC02 );\n if( StringUtils.isNotEmpty( szValue ))\n {\n Boolean isArbac02 = Boolean. valueOf( szValue );\n config.setProperty( GlobalIds.IS_ARBAC02, isArbac02.booleanValue() );\n LOG.info( PREFIX, GlobalIds.IS_ARBAC02, isArbac02.booleanValue() );\n }\n }", "public interface ConfigurationManager {\n\n String loadRunAsUser();\n\n void storeRunAsUser(String username);\n\n List<String> loadEnabledProjects();\n\n void storeEnabledProjects(List<String> projectKeys);\n\n Map<String, String> loadBranchFilters();\n \n void storeBranchFilters(Map<String, String> branchFilters);\n \n /**\n * @since v1.2\n */\n Collection<String> loadCrucibleUserNames();\n\n /**\n * @since v1.2\n */\n void storeCrucibleUserNames(Collection<String> usernames);\n\n /**\n * @since v1.3\n */\n Collection<String> loadCrucibleGroups();\n\n /**\n * @since v1.3\n */\n void storeCrucibleGroups(Collection<String> groupnames);\n\n CreateMode loadCreateMode();\n\n void storeCreateMode(CreateMode mode);\n\n /**\n * @since v1.4.1\n */\n boolean loadIterative();\n\n /**\n * @since v1.4.1\n */\n void storeIterative(boolean iterative);\n}", "@Test\n public void testConfigurationBuilderProvider()\n throws ConfigurationException\n {\n factory.addProperty(\"override.configuration[@fileName]\", TEST_FILE\n .getAbsolutePath());\n CombinedConfiguration cc = factory.getConfiguration(false);\n assertEquals(\"Wrong number of configurations\", 1, cc\n .getNumberOfConfigurations());\n checkProperties(cc);\n }", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "@Test\n void check_combineMappingConfigWithExternal() {\n MappingConfig mappingConfig = new MappingConfig();\n mappingConfig.setPackageName(\"com.kobylynskyi.graphql.test1\");\n\n MappingConfig externalMappingConfig = new MappingConfig();\n externalMappingConfig.setPackageName(\"com.kobylynskyi.graphql.testconfig\");\n mappingConfig.combine(externalMappingConfig);\n assertEquals(mappingConfig.getPackageName(), externalMappingConfig.getPackageName());\n }", "default boolean inUse(VlanId vlanId) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }", "@Test\n public void testInterpolationOverMultipleSources()\n throws ConfigurationException\n {\n File testFile =\n ConfigurationAssert.getTestFile(\"testInterpolationBuilder.xml\");\n factory.setFile(testFile);\n CombinedConfiguration combConfig = factory.getConfiguration(true);\n assertEquals(\"Wrong value\", \"abc-product\",\n combConfig.getString(\"products.product.desc\"));\n XMLConfiguration xmlConfig =\n (XMLConfiguration) combConfig.getConfiguration(\"test\");\n assertEquals(\"Wrong value from XML config\", \"abc-product\",\n xmlConfig.getString(\"products/product/desc\"));\n SubnodeConfiguration subConfig =\n xmlConfig\n .configurationAt(\"products/product[@name='abc']\", true);\n assertEquals(\"Wrong value from sub config\", \"abc-product\",\n subConfig.getString(\"desc\"));\n }", "public interface ConfigLogic extends Config\n{\n}", "ConfigurationPackage getConfigurationPackage();", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "@SuppressWarnings({ \"rawtypes\" })\r\n protected static void transferConfigurationFrom(Map conf, Properties prop) {\r\n // transfer zookeeper information so that SignalMechanism can create Zookeeper frameworks\r\n if (null != conf.get(CONFIG_KEY_STORM_ZOOKEEPER_PORT)) {\r\n prop.put(PORT_ZOOKEEPER, conf.get(CONFIG_KEY_STORM_ZOOKEEPER_PORT).toString());\r\n }\r\n if (null != conf.get(CONFIG_KEY_STORM_NIMBUS_PORT)) {\r\n prop.put(PORT_THRIFT, conf.get(CONFIG_KEY_STORM_NIMBUS_PORT).toString());\r\n }\r\n if (null != conf.get(CONFIG_KEY_STORM_NIMBUS_HOST)) {\r\n prop.put(HOST_NIMBUS, conf.get(CONFIG_KEY_STORM_NIMBUS_HOST).toString());\r\n }\r\n if (null != conf.get(CONFIG_KEY_STORM_ZOOKEEPER_SERVERS)) {\r\n Object zks = conf.get(CONFIG_KEY_STORM_ZOOKEEPER_SERVERS);\r\n String tmp = zks.toString();\r\n if (zks instanceof Collection) {\r\n tmp = \"\";\r\n for (Object o : (Collection) zks) {\r\n if (tmp.length() > 0) {\r\n tmp += \",\";\r\n }\r\n tmp += o.toString();\r\n }\r\n }\r\n prop.put(HOST_ZOOKEEPER, tmp);\r\n }\r\n if (null != conf.get(RETRY_TIMES_ZOOKEEPER)) {\r\n prop.put(RETRY_TIMES_ZOOKEEPER, conf.get(RETRY_TIMES_ZOOKEEPER).toString());\r\n }\r\n if (null != conf.get(RETRY_INTERVAL_ZOOKEEPER)) {\r\n prop.put(RETRY_INTERVAL_ZOOKEEPER, conf.get(RETRY_INTERVAL_ZOOKEEPER).toString());\r\n }\r\n\r\n // if storm has a configuration value and the actual configuration is not already\r\n // changed, than change the event bus configuration\r\n if (null != conf.get(HOST_EVENT)) {\r\n prop.put(HOST_EVENT, conf.get(HOST_EVENT));\r\n }\r\n if (null != conf.get(Configuration.PORT_EVENT)) {\r\n prop.put(PORT_EVENT, conf.get(PORT_EVENT));\r\n }\r\n if (null != conf.get(EVENT_DISABLE_LOGGING)) {\r\n prop.put(EVENT_DISABLE_LOGGING, conf.get(EVENT_DISABLE_LOGGING));\r\n }\r\n if (null != conf.get(PIPELINE_INTERCONN_PORTS)) {\r\n prop.put(PIPELINE_INTERCONN_PORTS, conf.get(PIPELINE_INTERCONN_PORTS));\r\n }\r\n // TODO use transfer above\r\n transfer(conf, prop, MONITORING_VOLUME_ENABLED, false);\r\n transfer(conf, prop, WATCHER_WAITING_TIME, false);\r\n if (prop.size() > 0) {\r\n System.out.println(\"Reconfiguring infrastructure settings: \" + prop + \" from \" + conf);\r\n configure(prop, false);\r\n }\r\n }", "public void loadConfig() {\n\t}", "public interface RuntimeConfigurationBackend {\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Boolean getBoolean(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setBoolean(String name, boolean value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Integer getInteger(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setInt(String name, int value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Long getLong(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setLong(String name, long value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Float getFloat(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setFloat(String name, float value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n Double getDouble(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setDouble(String name, double value);\n\n /**\n * @param name the name of the configuration directive.\n * @return the configured value or null.\n */\n String getString(String name);\n\n /**\n * @param name the name of the configuration directive.\n * @param value the configured value.\n */\n void setString(String name, String value);\n}", "@Override\n public void setConf(Configuration conf) {\n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void onConfigurationUpdate() {\n\t}", "boolean hasGlossaryConfig();", "private RelayConfig () {}", "@Test\n void check_mappingConfigFromJsonFile_key_priority_json_conf() {\n MappingConfig externalMappingConfig =\n new MergeableMappingConfigSupplier(new ArrayList<String>() {\n {\n add(\"src/test/resources/json/mappingconfig3.json\");\n add(\"src/test/resources/json/mappingconfig4.conf\");\n }\n }).get();\n\n assertEquals(externalMappingConfig.getGenerateToString(), false);\n assertEquals(externalMappingConfig.getGenerateApis(), true);\n }", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n\tprotected boolean configure(ConsoleManager cm, Host host, PhpBuild build, ScenarioSet scenario_set, String app_dir) {\n\t\treturn false;\n\t}", "@Override\n public boolean isConfigured()\n {\n return (config != null) && config.isValid() &&!config.isDisabled();\n }", "public boolean isConfigServerLike() {\n return this == config || this == controller;\n }", "public OlcDistProcConfig()\n {\n super();\n }", "@Test\n public void testCombinedConfigurationAttributes() throws ConfigurationException\n {\n factory.setFile(INIT_FILE);\n CombinedConfiguration cc = (CombinedConfiguration) factory\n .getConfiguration();\n checkCombinedConfigAttrs(cc);\n CombinedConfiguration cc2 = (CombinedConfiguration) cc\n .getConfiguration(DefaultConfigurationBuilder.ADDITIONAL_NAME);\n checkCombinedConfigAttrs(cc2);\n }", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "Map<String, Object> exportDefaultConfiguration();", "public interface Config {\n String SUCCESS = \"success\";\n String SUCCESS_CODE = \"10000\";\n String ERROR = \"error\";\n String ERROR_CODE = \"20000\";\n\n String ROLE_ADMIN = \"SYS_ADMIN\";\n String ROLE_GUEST = \"SYS_GUEST\";\n String IMG_FILE_PATH = \"upload/image\";\n String IMG_BANNER_TYPE = \"BANNER\";\n String IMG_ALBUM_TYPE = \"ALBUM\";\n String IMG_GLOBAL_TYPE = \"GLOBAL\";\n String GLOBAL_ABOUT_CODE=\"ABOUT\";\n String GLOBAL_REASON_CODE=\"REASON\";\n String AES_KEY = \"harlanking021109\";\n String HMAC_KEY = \"harlanking021109\";\n\n String CURRENT_USER_KEY = \"user\";\n}", "public interface Config {\n public final String contentOfDocument=\"contentOfDoc\";\n public final String docId=\"docId\";\n public final String baseIp=\"http://irlab.daiict.ac.in/Annotation_Interface\";\n public final String sentenceFolder=\"sentences\";\n public final String savedSentenceEnd=\"savedSentenceEnd\";\n public final String savedSentenceStart=\"savedSentenceStart\";\n public final String docName=\"doc_name\";\n public final String relationFolder=\"relationsFolder\";\n public final String savedRelation=\"savedRelation\";\n public final String loginPrefs=\"loginFolder\";\n public final String isLoggedIn=\"isLoggedIn\";\n public final String userName=\"userName\";\n public final String password=\"password\";\n public final String relation=\"relation\";\n public final String checkedRelation=\"checkedRelation\";\n}", "String getApplicationCompatibility()\n {\n return configfile.application_compatibility;\n }" ]
[ "0.69540507", "0.689839", "0.6575768", "0.6450849", "0.6326342", "0.6326342", "0.6326342", "0.6326342", "0.6323441", "0.62658155", "0.62415653", "0.6202698", "0.6198025", "0.6181437", "0.6145275", "0.61248213", "0.61132944", "0.6083049", "0.6043479", "0.60277575", "0.6016601", "0.6015545", "0.60137767", "0.59966296", "0.5977113", "0.5969838", "0.59478295", "0.59367967", "0.5923553", "0.58981043", "0.58857226", "0.5885596", "0.58843017", "0.5841791", "0.58340836", "0.5833002", "0.5828553", "0.58243066", "0.5822393", "0.58177644", "0.5815884", "0.5814247", "0.5804497", "0.58013403", "0.5800514", "0.57957804", "0.5791769", "0.57776976", "0.57666737", "0.57393557", "0.57379574", "0.573778", "0.5737295", "0.57350653", "0.57318974", "0.57302284", "0.57234263", "0.57087135", "0.5708394", "0.57069296", "0.5702239", "0.5699242", "0.5698769", "0.56974745", "0.56883174", "0.56737673", "0.5670838", "0.5670418", "0.56527925", "0.564857", "0.56388974", "0.56348073", "0.5634085", "0.562934", "0.56244385", "0.5617055", "0.56129336", "0.56087", "0.5601389", "0.5598658", "0.55952495", "0.55925655", "0.5588687", "0.55883104", "0.5585188", "0.55844873", "0.5584393", "0.5576243", "0.5576243", "0.5576243", "0.55738384", "0.55645573", "0.5558144", "0.555029", "0.55474854", "0.55399466", "0.5539517", "0.55300146", "0.5528172", "0.5522621" ]
0.66818786
2
Get the json object from the parsed JSON
@Override public BitfinexModel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { JsonElement bitfinexModel = json.getAsJsonObject(); /** * Deserialize the JsonElement as GSON */ return new Gson().fromJson(bitfinexModel, BitfinexModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public native Object parse( Object json );", "private <T> T getObjectFromJsonObject(JSONObject j, Class<T> clazz) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n T t = null;\n t = mapper.readValue(j.toString(), clazz);\n\n return t;\n }", "private Object readJSON() throws JSONException\n {\n switch(read(3))\n {\n case zipObject:\n return readObject();\n case zipArrayString:\n return readArray(true);\n case zipArrayValue:\n return readArray(false);\n case zipEmptyObject:\n return new JSONObject();\n case zipEmptyArray:\n return new JSONArray();\n case zipTrue:\n return Boolean.TRUE;\n case zipFalse:\n return Boolean.FALSE;\n default:\n return JSONObject.NULL;\n }\n }", "TorrentJsonParser getJsonParser();", "public JsonObject getObject(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.OBJECT)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), JsonObject.class);\n\t\treturn (JsonObject)value.value;\n\t}", "public JSON getJsonObject() {\n return jsonObject;\n }", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "<T> T parseToObject(Object json, Class<T> classObject);", "private JSONObject getJsonObject(Resource resource) {\n JSONParser parser = new JSONParser();\n JSONObject obj = null;\n try {\n obj = (JSONObject) parser.parse(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return obj;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract void fromJson(JSONObject jsonObject);", "public FilterItems jsonToObject(String json){\n json = json.replace(\"body=\",\"{ \\\"body\\\" : \");\n json = json.replace(\"&oil=\",\", \\\"oil\\\" : \");\n json = json.replace(\"&transmission=\",\", \\\"transmission\\\" :\");\n json = json + \"}\";\n json = json.replace(\"[]\",\"null\");\n ObjectMapper mapper = new ObjectMapper();\n FilterItems itemSearch = null;\n try {\n itemSearch = mapper.readValue(json, FilterItems.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return itemSearch;\n }", "public JsonObject getObject() {\n return obj;\n }", "T fromJson(Object source);", "String getJson();", "String getJson();", "String getJson();", "private Place extractFromJSON(JSONObject jo) {\n Place place = new Place();\n place.id = jo.optString(\"id\");\n place.name = jo.optString(\"name\");\n\n JSONObject locationObject = jo.optJSONObject(\"location\");\n if (locationObject != null) {\n place.lat = locationObject.optDouble(\"lat\");\n place.lng = locationObject.optDouble(\"lng\");\n place.distance = locationObject.optDouble(\"distance\");\n\n JSONArray addressArray = locationObject.optJSONArray(\"formattedAddress\");\n if (addressArray != null) {\n StringBuilder address = new StringBuilder();\n int arrLen = addressArray.length();\n for (int i = 0; i < arrLen; i++) {\n String value = addressArray.optString(i);\n if (i != 0) {\n address.append(\", \");\n } else {\n place.shortAddress = value;\n }\n address.append(value);\n\n }\n\n place.fullAddress = address.toString();\n }\n }\n\n JSONArray categoryArray = jo.optJSONArray(\"categories\");\n if (categoryArray != null) {\n if (categoryArray.length() > 0) {\n try {\n place.categoryName = categoryArray.optJSONObject(0).optString(\"name\");\n } catch (Exception ignore) {\n\n }\n }\n }\n\n return place;\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "Map<String, Object> parseToMap(String json);", "JsonObject raw();", "String getJSON();", "public @NotNull T read(@NotNull final JsonObject object) throws JsonException;", "private static <T> T getObjectFromJson(JsonNode dataJson) {\n Object object=null;\n if(!dataJson.has(CLASS_FIELD)) {\n return null;\n }\n /** Determine class of object and return with cast*/\n String classField=dataJson.get(CLASS_FIELD).asText();\n\n /** Lists -> All lists are converted into ArrayLists*/\n if(classField.startsWith(LIST_CLASS)) {\n try {\n String[] listType=classField.split(SEPERATOR);\n if(listType.length<2) {\n return (T) new ArrayList<>();\n }\n Class type=Class.forName(listType[1]);\n String json=dataJson.get(DATA_FIELD).toString();\n List<Object> list=new ArrayList<>();\n ArrayNode array=(ArrayNode) mapper.readTree(json);\n for(JsonNode item : array) {\n Object o=mapper.readValue(item.toString(), type);\n list.add(o);\n }\n return (T) list;\n }\n catch(JsonProcessingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n /** Single objects*/\n else {\n Class type=null;\n try {\n type=Class.forName(classField);\n /** Read primitive types (String,Integer,...)*/\n if(dataJson.has(PRIMITIVE_FIELD)) {\n object=mapper.readValue(dataJson.get(PRIMITIVE_FIELD).toString(), type);\n }\n else {\n object=mapper.readValue(dataJson.toString(), type);\n }\n return (T) object;\n }\n catch(ClassNotFoundException | JsonProcessingException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public static JsonNode get(String url) {\n try {\n URL u = new URL(url);\n HttpURLConnection c = (HttpURLConnection) u.openConnection();\n c.setRequestMethod(\"GET\");\n c.setRequestProperty(\"Content-length\", \"0\");\n c.setUseCaches(false);\n c.setAllowUserInteraction(false);\n c.connect();\n int status = c.getResponseCode();\n switch (status) {\n case 200:\n case 201:\n BufferedReader br = new BufferedReader(new InputStreamReader(c.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return Json.parse(sb.toString());\n }\n\n } catch (MalformedURLException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n } catch (IOException e) {\n Logger.error(e.getMessage());\n e.printStackTrace();\n }\n return null;\n }", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "public void deserialize(JsonObject src);", "static TodoItem fromJsonObject(JsonObject json) {\n TodoItem item = new TodoItem();\n item.setId(json.get(\"id\") == null ? -1 : json.getInt(\"id\"));\n item.setDescription(json.get(\"description\") == null ? null : json.getString(\"description\"));\n item.setCreatedAt(json.get(\"createdAt\") == null ? null : OffsetDateTime.parse(json.getString(\"createdAt\")));\n item.setDone(json.get(\"done\") == null ? false : json.getBoolean(\"done\"));\n LOGGER.fine(()->\"fromJsonObject returns:\"+item);\n return item;\n }", "public Object parseJsonToObject(String response, Class<?> modelClass) {\n\n try {\n return gson.fromJson(response, modelClass);\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public JSONObject readJsonFromUrl() throws IOException, JSONException {\n\t\tInputStream inputStream = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader bufferedReader = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(inputStream, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAllBytes(bufferedReader);\n\t\t\tJSONObject jsonObject = new JSONObject(jsonText);\n\t\t\treturn jsonObject;\n\t\t} finally {\n\t\t\tinputStream.close();\n\t\t}\n\n\t}", "public static JsonElement stringToJSON2(String json) {\n try {\n JsonElement parser = new JsonPrimitive(json);\n System.out.println(parser.getAsString());\n //JsonObject Jso = new JsonObject();\n //Jso = (JsonObject) parser.p(json);\n return parser;\n } catch (Exception e) {\n return new JsonObject();\n }\n }", "@Nullable\n protected JSONObject fetchObjectForURL(URL url) throws IOException, JSONException {\n HttpURLConnection conn = getConnection(url);\n BufferedReader in = null;\n if (conn == null) return null;\n try {\n in = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n StringBuilder buffer = new StringBuilder();\n String line;\n while ((line = in.readLine()) != null) {\n buffer.append(line);\n }\n return new JSONObject(buffer.toString());\n } finally {\n if (in != null) try { in.close(); } catch (IOException ex) {\n Log.e(\"aqx1010\", \"can not close input stream\", ex);\n }\n }\n\n }", "public native Object parse( Object json, String texturePath );", "private static JsonObject getJsonObjectFromJson(\n final JsonObject jsonObject, final String key)\n {\n if (jsonObject != null && jsonObject.get(key) != null\n && jsonObject.get(key).isJsonObject())\n {\n return jsonObject.get(key).getAsJsonObject();\n }\n return null;\n }", "public static final <T extends JsonResult> T getJson(final String url, final T json)\r\n {\r\n HttpSimpleResponse response = getHttpFetcher().fetch(url);\r\n String httpResponse = response.getResponse();\r\n\r\n json.setHttpResponse(response);\r\n\r\n if (httpResponse.length() > 0)\r\n {\r\n if (httpResponse.startsWith(\"[\"))\r\n {\r\n try\r\n {\r\n json.setJsonArray(new JSONArray(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON array.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"{\"))\r\n {\r\n try\r\n {\r\n json.setJsonObject(new JSONObject(httpResponse));\r\n }\r\n catch (final JSONException e)\r\n {\r\n Log.e(TAG, \"Could not convert to JSON object.\", e);\r\n }\r\n }\r\n else if (httpResponse.startsWith(\"\\\"\"))\r\n {\r\n if (httpResponse.endsWith(\"\\\"\"))\r\n {\r\n json.setJsonString(httpResponse.subSequence(1, httpResponse.length() - 1).toString());\r\n }\r\n }\r\n }\r\n\r\n return json;\r\n }", "public Map<String,Object> parseSingleJSON(Object jObj) {\n\t\tMap<String,Object> map = new HashMap<>();\n\t\t\n\t\tif(jObj instanceof JSONObject)\n\t\t\tparseJSON(map, \"\", (JSONObject) jObj);\n\t\telse if(jObj instanceof JSONArray)\n\t\t\tparseJSON(map, \"\", (JSONArray) jObj);\n\t\telse\n\t\t\tmap.put(jObj.toString(), parseJSONVal(jObj));\n\t\t\n\t\treturn map;\n\t}", "Gist deserializeGistFromJson(String json);", "JSONObject toJson();", "JSONObject toJson();", "public final JSONObject getJSONObject() {\n return jo;\n }", "private JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\r\n\t\tInputStream is = new URL(url).openStream();\r\n\t\ttry {\r\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\r\n\t\t\tString jsonText = readAll(rd);\r\n\t\t\tJSONObject json = new JSONObject(jsonText);\r\n\t\t\treturn json;\r\n\t\t} finally { //finally will always execute, if an try block exists. Doesnt matter if there is an Exception or not.\r\n\t\t\tis.close();\r\n\t\t}\r\n\t}", "private static FluidIngredient deserializeObject(JsonObject json) {\n if (json.entrySet().isEmpty()) {\n return EMPTY;\n }\n\n // fluid match\n if (json.has(\"name\")) {\n // don't set both, obviously an error\n if (json.has(\"tag\")) {\n throw new JsonSyntaxException(\"An ingredient entry is either a tag or an fluid, not both\");\n }\n\n // parse a fluid\n return FluidMatch.deserialize(json);\n }\n\n // tag match\n if (json.has(\"tag\")) {\n return TagMatch.deserialize(json);\n }\n\n throw new JsonSyntaxException(\"An ingredient entry needs either a tag or an fluid\");\n }", "public abstract T zzb(JSONObject jSONObject);", "public String getJson();", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "private static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n\t\tInputStream is = new URL(url).openStream();\n\t\ttry {\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n\t\t\tString jsonText = readAll(rd);\n\t\t\tJSONObject json = new JSONObject(jsonText);\n\t\t\treturn json;\n\t\t} finally {\n\t\t\tis.close();\n\t\t}\n\t}", "GistUser deserializeUserFromJson(String json);", "public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"error mapJsonToObject: \" + e.getMessage());\n\t\t}\n\t\treturn obj;\n\t}", "private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }", "public void parseJSONData(Object JSONdata){\n\n\t}", "private static TemporaryLocationObject temporaryLocationObjectFromJson(JsonObject json) {\n TemporaryLocationObject locationObject = new TemporaryLocationObject();\n try {\n populatePojoFromJson(locationObject, json, LOCATION_MAP_LIST);\n } catch (Exception e) {\n logger.error(\"Unable to create temporary location object from json: {}\", e.getMessage());\n return null;\n }\n return locationObject;\n }", "protected JsonParser getJsonParser( ) {\r\n\t\treturn jsonParser;\r\n\t}", "public static JSONObject loadJSONObjectFromAsset(Context context) {\n String jsonStr = null;\n JSONObject jsonObject = null;\n try {\n //here we need context to access ASSETS --> ANDROID TUTORIAL / codeBlock - Patterns / Application.java\n InputStream is = context.getAssets().open(\"listHomeItem.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n jsonStr = new String(buffer, \"UTF-8\");\n\n jsonObject = new JSONObject(jsonStr);\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n return jsonObject;\n }", "public final native JSONLoaderObject parse(JavaScriptObject json,String texturePath)/*-{\r\n\treturn this.parse(json,texturePath);\r\n\t}-*/;", "@Override\n\tpublic JSONObject getJSONObject() {\n\t\treturn mainObj;\n\t}", "protected final JSONObject getJSONObject(final String key) {\n try {\n if (!jo.isNull(key)) {\n return jo.getJSONObject(key);\n }\n } catch (JSONException e) {\n }\n return null;\n }", "public static JsonObject parseFromFile(String file) {\n\t\tJsonObject res = null;\n\t\ttry {\n\t\t\tJsonStreamParser parser = new JsonStreamParser(new FileReader(file));\n\t\t\tif (parser.hasNext())\n\t\t\t\tres = parser.next().getAsJsonObject();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "void mo28373a(JSONObject jSONObject);", "public JSONObject parse(String jsonFileName) {\n JSONObject jsonObject = null;\n JSONParser jsonParser = new JSONParser();\n Reader jsonFileReader = this.resourceFileLoader.loadJsonReader(jsonFileName);\n\n try {\n jsonObject = (JSONObject) jsonParser.parse(jsonFileReader);\n } catch(Exception e) {\n this.exceptionLogger.log(e);\n }\n\n return jsonObject;\n }", "private JSONObject getJSONFromUrl(String url) {\n\t\tInputStream inputStream = null;\n\t\tString jsonString = \"\";\n\t\tJSONObject jsonObject = null;\n\t\tboolean sendMessageError = false;\n\t\t\n\t\ttry {\n DefaultHttpClient httpClient = new DefaultHttpClient();\n HttpPost httpPost = new HttpPost(url);\n\n HttpResponse httpResponse = httpClient.execute(httpPost);\n HttpEntity httpEntity = httpResponse.getEntity();\n inputStream = httpEntity.getContent();\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n sendMessageError = true;\n } catch (IOException e) {\n e.printStackTrace();\n sendMessageError = true;\n }\n\t\t\n\t\ttry {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n \t\tinputStream, \"iso-8859-1\"), 8);\n StringBuilder stringbuilder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n \tstringbuilder.append(line + \"\\n\");\n }\n jsonString = stringbuilder.toString();\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\ttry {\n\t\t\tinputStream.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tsendMessageError = true;\n\t\t}\n\n\t\ttry {\n\t\t\tjsonObject = new JSONObject(jsonString);\n } catch (Exception e) {\n \te.printStackTrace();\n \tsendMessageError = true;\n }\n\t\t\n\t\tif (sendMessageError)\n\t\t\tsendMessageToObservers(new MessageErrorOccurred());\n\t\t\n\t\treturn jsonObject;\n\t}", "<T> T fromJson(String json, Class<T> type);", "public static JsonObject JsonToSubJSON(JsonObject jso, String param) {\n try {\n JsonElement res = securGetJSON(jso, param);\n if (res != null) {\n return res.getAsJsonObject();\n } else {\n return new JsonObject();\n }\n } catch (Exception e) {\n return new JsonObject();\n }\n }", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "public static <T extends IJsonObject> JsonResultObject<T> getJsonAsObjectOf(\r\n final String url,\r\n final Class<T> newClass)\r\n {\r\n JsonResultObject<T> json = new JsonResultObject<T>();\r\n json = getJson(url, json);\r\n\r\n T newObject = null;\r\n\r\n if (json.getJsonObject() != null && json.getJsonObject().length() > 0)\r\n {\r\n try\r\n {\r\n newObject = newClass.newInstance();\r\n }\r\n catch (final Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n if (newObject != null)\r\n {\r\n newObject.initialize(json.getJsonObject());\r\n }\r\n }\r\n\r\n json.setObject(newObject);\r\n\r\n return json;\r\n }", "@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}", "public JsonObject toJson();", "T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;", "protected abstract Object buildJsonObject(R response);", "public static JSONObject getInfo( final String token ) throws IOException {\r\n\r\n\r\n GenericUrl url = new GenericUrl( ENDPOINT_ID );\r\n\r\n HttpRequestFactory requestFactory = HTTP_TRANSPORT\r\n .createRequestFactory(new HttpRequestInitializer() {\r\n @Override\r\n public void initialize(HttpRequest request) {\r\n request.getHeaders().setAuthorization( \"bearer \" + token ); \r\n }\r\n });\r\n\r\n HttpRequest request = requestFactory.buildGetRequest( url );\r\n HttpResponse response = request.execute();\r\n\r\n JSONObject jo = null;\r\n\r\n try {\r\n if (response.isSuccessStatusCode()) {\r\n\r\n String json = response.parseAsString();\r\n\r\n // Sample response:\r\n // {\"name\": \"myName\", \"created\": 1346020929.0, \"created_utc\": 1346017329.0, \"link_karma\": 1308, \r\n // \"comment_karma\": 32602, \"over_18\": true, \"is_gold\": true, \"is_mod\": false, \"has_verified_email\": true, \"id\": \"76gyp\"}\r\n\r\n // Parse with org.json\r\n JSONTokener tokener = null;\r\n tokener = new JSONTokener( json );\r\n jo = new JSONObject(tokener);\r\n\r\n } else\r\n \tSystem.err.println(\"Request failed with\" + response.getStatusCode());\r\n } catch (JSONException e) {\r\n \r\n\t\t\tSystem.err.println(jsonErrMsg + e.toString());\r\n e.printStackTrace();\r\n } finally {\r\n response.disconnect();\r\n }\r\n\r\n return jo;\r\n }", "String parseObjectToJson(Object obj);", "private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }", "public static JsonElement getResponseFromJson(final JsonElement json)\n {\n if (json != null && json.isJsonObject())\n {\n final JsonObject jsonObject = json.getAsJsonObject();\n return jsonObject.get(\"response\");\n }\n return null;\n }", "public static <T> T getJSONObject(final String json, final Class<T> typeReference)\n\t{\n\t\tT obj = null;\n\t\ttry\n\t\t{\n\t\t\tobj = new ObjectMapper().readValue(json, typeReference);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting string into object. Exception message: \", exception);\n\t\t}\n\t\treturn obj;\n\t}", "private FieldDocument _fromJson (String json) {\n try {\n FieldDocument fd = this.mapper.readValue(json, FieldDocument.class);\n return fd;\n }\n catch (IOException e) {\n log.error(\"File json not found or unmappable: {}\",\n e.getLocalizedMessage());\n };\n return (FieldDocument) null;\n }", "private static User getUserFromJson(String userJson) throws Exception {\n verifyJsonFormatting(userJson);\n ObjectMapper objectMapper = new ObjectMapper();\n return objectMapper.readValue(userJson, User.class);\n }", "public static <T> T pasarAObjeto(String json, Class<T> tipo) {\r\n try {\r\n ObjectMapper mapper = getBuilder().build();\r\n return mapper.readValue(json, tipo);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "public static JSONObject parseJSON(JSONParser jsonParser, String line) {\n try {\n return (JSONObject) jsonParser.parse(line);\n } catch (ParseException e) {\n return null;\n }\n }", "GistComment deserializeCommentFromJson(String json);", "public static Object decode(JsonObject content) {\n return new exercise(content);\n }", "public static Places GetJsonObject(Context context) throws IOException, JSONException\n\t{\n\t String jsonstring = AssetJSONFile(\"Places.json\", context.getApplicationContext());\n\t Gson gson = new Gson();\n\t Places places = null;\n\t try\n\t {\n\t places = gson.fromJson(jsonstring, Places.class);\n\t }\n\t catch(Exception r)\n\t {\n\t \tLog.d(\"Error he bhaya\",r.getMessage());\n\t }\n\t \n\t return places;\n\t\t\n\t}", "public static <T> T parseJSON(final String jsonString, Class<T> type) {\r\n\t\tT retObject = null;\r\n\t\ttry {\r\n\t\t\tretObject = PARSER.parse(jsonString, type);\r\n\t\t} catch (ParseException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in de-serializing to object\", ex);\r\n\t\t\tretObject = null;\r\n\t\t}\r\n\t\treturn retObject;\r\n\t}", "public JSONObject getJSONFromUrl(String url) {\n\n\t\t// Making HTTP request\n\t\ttry {\n\t\t\t// defaultHttpClient\n\t\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\tHttpPost httpPost = new HttpPost(url);\n\n\t\t\tHttpResponse httpResponse = httpClient.execute(httpPost);\n\t\t\tHttpEntity httpEntity = httpResponse.getEntity();\n\t\t\tis = httpEntity.getContent();\t\t\t\n\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tis, \"iso-8859-1\"), 8);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tString line = null;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t}\n\t\t\tis.close();\n\t\t\tjson = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tLog.e(\"Buffer Error\", \"Error converting result \" + e.toString());\n\t\t}\n\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(json);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\n\t\t// return JSON String\n\t\treturn jObj;\n\n\t}", "private Node loadNode(JsonObject jsonNode) {\n Node returnedNode = null;\r\n\r\n returnedNode = loadStation(jsonNode);\r\n// case JSON_IS_LINE:\r\n// returnedNode = loadLine(jsonNode);\r\n// break;\r\n\r\n\r\n return returnedNode;\r\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public static JSONObject getJObjWebdata(String jsonData) {\n JSONObject dataJObject = null;\n try {\n dataJObject = (new JSONObject(jsonData))\n .getJSONObject(IWebService.KEY_RES_DATA);\n // dataJObject = (new JSONObject(jsonData)).getJSONObject(\"root\")\n // .getJSONObject(\"Data\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return dataJObject;\n }", "public static JsonElement securGetJSON(JsonObject jso, String param) {\n try {\n JsonElement res = jso.get(param);//request.getParameter(param);\n return res;\n } catch (Exception e) {\n return null;\n }\n }", "private JsonObject getActualJsonObject(JsonObject jsonObject, RootJsonObjectMapping jsonObjectMapping, MarshallingContext context, Resource resource) {\n if (jsonObject instanceof RawJsonObject) {\n String json = ((RawJsonObject) jsonObject).getJson();\n JsonContentMapping jsonContentMapping = jsonObjectMapping.getContentMapping();\n JsonContentMappingConverter jsonContentMappingConverter;\n if (jsonContentMapping != null) {\n jsonContentMappingConverter = (JsonContentMappingConverter) jsonContentMapping.getConverter();\n } else {\n jsonContentMappingConverter = (JsonContentMappingConverter) context.getConverterLookup().\n lookupConverter(CompassEnvironment.Converter.DefaultTypeNames.Mapping.JSON_CONTENT_MAPPING);\n }\n jsonObject = jsonContentMappingConverter.getContentConverter().fromJSON(resource.getAlias(), json);\n }\n return jsonObject;\n }", "public JSONObject getInfo() throws Exception;", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {\n return JSON.parseObject(inputMessage.getBody(), this.fastJsonConfig.getCharset(), (Type) clazz, this.fastJsonConfig.getFeatures());\n }", "private String parseJsonResult(String json) {\n final JsonElement parsed = new JsonParser().parse(json);\n if (parsed.isJsonObject()) {\n final JsonObject obj = parsed.getAsJsonObject();\n if (obj.has(\"result\")) {\n return obj.get(\"result\").getAsString();\n }\n if(obj.has(\"error\")) {\n return obj.get(\"error\").getAsString();\n }\n }\n return \"no json received: \" + json;\n }", "public static JsonObject stringToJSON(String json) {\n try {\n JsonParser parser = new JsonParser();\n JsonObject Jso = parser.parse(json).getAsJsonObject();\n return Jso;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return new JsonObject();\n }\n }", "public Object get(String key) {\n \n \t\tJSONObject json = null;\n \t\ttry {\n \t\t\tjson = new JSONObject( content );\n \t\t\treturn json.get( key );\n \n \t\t}\n \t\tcatch ( JSONException ex ) {\n \t\t\tlog.error( ex );\n \t\t\treturn null;\n \t\t}\n \t}", "public JSONObject readJsonFromUrl(String url) throws IOException, JSONException {\n InputStream is = new URL(url).openStream();\n try {\n BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName(\"UTF-8\")));\n String jsonText = readAll(rd);\n JSONObject json = new JSONObject(jsonText);\n return json;\n } finally {\n is.close();\n }\n }", "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public static Personagem fromJson(JSONObject json){\n Personagem personagem = new Personagem(\n json.getString(\"nome\"),\n json.getString(\"raca\"),\n json.getString(\"profissao\"),\n json.getInt(\"mana\"),\n json.getInt(\"ataque\"),\n json.getInt(\"ataqueMagico\"),\n json.getInt(\"defesa\"),\n json.getInt(\"defesaMagica\"),\n json.getInt(\"velocidade\"),\n json.getInt(\"destreza\"),\n json.getInt(\"experiencia\"),\n json.getInt(\"nivel\")\n\n );\n return personagem;\n }" ]
[ "0.7137311", "0.7095413", "0.68126214", "0.67405474", "0.6664993", "0.66316193", "0.6618292", "0.65513134", "0.6510872", "0.64639896", "0.6435821", "0.63796717", "0.6369709", "0.63554597", "0.63378674", "0.63378674", "0.63378674", "0.63353854", "0.63091093", "0.6302105", "0.6301885", "0.62931675", "0.6292554", "0.6274045", "0.62310445", "0.62262005", "0.62190974", "0.6197471", "0.6149757", "0.6100437", "0.60810083", "0.6080211", "0.60719734", "0.6049721", "0.6043477", "0.6042902", "0.60376865", "0.60367364", "0.6031253", "0.6031253", "0.6022888", "0.60161877", "0.60073864", "0.6006231", "0.6005177", "0.5976755", "0.5964493", "0.594257", "0.5941718", "0.59410655", "0.5940381", "0.58996314", "0.5896338", "0.5891324", "0.5888051", "0.5882351", "0.5876939", "0.5875416", "0.5857346", "0.5849547", "0.5849041", "0.584823", "0.58478105", "0.5833408", "0.5831075", "0.58283323", "0.5823919", "0.5817964", "0.58174723", "0.58172256", "0.58123815", "0.58096784", "0.5804977", "0.5802865", "0.5800961", "0.5788469", "0.57872677", "0.5783544", "0.5780533", "0.577847", "0.57775193", "0.57657504", "0.57522166", "0.5732694", "0.57318056", "0.5726258", "0.572571", "0.57200265", "0.5710461", "0.5701031", "0.56915355", "0.5691286", "0.56834203", "0.56686455", "0.56573653", "0.5654179", "0.5653069", "0.5649593", "0.5646676", "0.56438863", "0.5631422" ]
0.0
-1
A method to set starting values and reset the process.
public void setValues(boolean[] values) { this.values = Arrays.copyOf(values, values.length); start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetProcessValues() {\n this.maximumchars=0;\n this.maximumtime=0;\n this.currProcessProgressValue=0;\n this.currTimeProgressValue=0;\n this.pbarProcess.setValue(0);\n this.pbarTime.setValue(0); \n }", "public void reset() {\n\t\tthis.startTime = 0;\n\t\tthis.stopTime = 0;\n\t\tthis.running = false;\n\t}", "void setZeroStart();", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "synchronized void reset() {\n\n // no change if called before getValue() or called twice\n lastValue = currValue = startValue;\n }", "public void resetFileProcessValues() {\n this.maxfiles=0;\n this.currFileProgressValue=0;\n this.pbarFileProcess.setValue(0);\n }", "public synchronized void reset() {\n state = State.WAITING_TO_START;\n }", "public void reset(){\n ioTime=0;\n waitingTime=0;\n state=\"unstarted\";\n rem=total_CPU_time;\n ioBurstTime=0;\n cpuBurstTime=0;\n remainingCPUBurstTime=null;\n }", "public void resetX() {this.startX = 0f;}", "private void setStartValues() {\n startValues = new float[9];\n mStartMatrix = new Matrix(getImageMatrix());\n mStartMatrix.getValues(startValues);\n calculatedMinScale = minScale * startValues[Matrix.MSCALE_X];\n calculatedMaxScale = maxScale * startValues[Matrix.MSCALE_X];\n }", "private void setInitialPIDValues(int[] pidValues) {\n this.pSlider.setValue(pidValues[0]);\n this.iSlider.setValue(pidValues[1]);\n this.dSlider.setValue(pidValues[2]);\n this.ffSlider.setValue(pidValues[3]);\n this.ssSlider.setValue(pidValues[4]);\n \n this.controller.setPidParams(this.initPidValues);\n }", "public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}", "protected abstract void forceStartValues();", "@Override public void start() {\n timer_.reset();\n\n resetControlVariables(); // need reset all key counters bcz they are used in init_loop()\n }", "private void reset() {\n ms = s = m = h = 0;\n actualizar();\n }", "protected void reset()\n {\n super.reset();\n m_seqNum = 1;\n }", "@Override\n public void start() {\n runtime.reset();\n arm.setPower(0);\n }", "public void reset() {\n\t\tappTda_ = new ApplicationTda();\n\t\t\n\t\t// get the associated settings\n\t\tprocessData_ = appTda_.getSettings();\n\t}", "@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupStartValues() {\n }", "public void reset()\n\t{\n\t\tm_running = false;\n\t\tm_elapsedMs = 0;\n\t\tm_lastMs = 0;\n\t}", "private void reset() {\n //todo test it !\n longitude = 0.0;\n latitude = 0.0;\n IDToday = 0L;\n venVolToday = 0L;\n PM25Today = 0;\n PM25Source = 0;\n DBCanRun = true;\n DBRunTime = 0;\n isPMSearchRunning = false;\n isLocationChanged = false;\n isUploadRunning = false;\n refreshAll();\n locationInitial();\n DBInitial();\n sensorInitial();\n }", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }", "public void start() {\n rfMotor.setPower(1);\n rrMotor.setPower(1);\n lfMotor.setPower(1);\n lrMotor.setPower(1);\n }", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "@Override\n public void start() {\n runtime.reset();\n }", "private void set(){\n resetBuffer();\n }", "public void reset() {\n\t\tpos.tijd = 0;\r\n\t\tpos.xposbal = xposstruct;\r\n\t\tpos.yposbal = yposstruct;\r\n\t\tpos.hoek = Math.PI/2;\r\n\t\tpos.start = 0;\r\n\t\topgespannen = 0;\r\n\t\tpos.snelh = 0.2;\r\n\t\tbooghoek = 0;\r\n\t\tpos.geraakt = 0;\r\n\t\tgeraakt = 0;\r\n\t\t\r\n\t}", "public void reset() {\n\t\tstartTime = System.nanoTime();\n\t\tpreviousTime = getTime();\n\t}", "@Override\n public void start() {\n runTime.reset();\n telemetry.addData(\"Run Time\", \"reset\");\n }", "public void reset()\n {\n m_source_.setToStart();\n updateInternalState();\n }", "public void reset ()\n {\n final String METHOD_NAME = \"reset()\";\n this.logDebug(METHOD_NAME + \" 1/2: Started\");\n super.reset();\n this.lid = null;\n this.refId = Id.UNDEFINED;\n this.fromDocType = DocType.UNDEFINED;\n this.logDebug(METHOD_NAME + \" 2/2: Done\");\n }", "public void startProcess() {\r\n\t\tprocess = true;\r\n\t}", "public void start() {\n process(0);\n }", "public synchronized void reset() {\n }", "private void initializePIDValues()\n {\n /* Generate number fields on SmartDashboard for PID values to be input into. */\n // SmartDashboard.putNumber(\"F Value\", 0.0);\n // SmartDashboard.putNumber(\"P Value\", 0.0);\n // SmartDashboard.putNumber(\"I Value\", 0.0);\n // SmartDashboard.putNumber(\"D Value\", 0.0);\n\n // SmartDashboard.putNumber(\"Cruise Velocity Value\", 0);\n // SmartDashboard.putNumber(\"Acceleration Value\", 0);\n \n /**\n * Create button for when pressed on SmartDashboard will configure the PID of\n * the hard coded TalonSRX/TalonFX. Get TalonSRX/TalonFX with get method written\n * in each subsystem for each TalonSRX/TalonFX. When desiring to set the PID\n * values for another TalonSRX/TalonFX, you must hard code in the new parameters\n * for the SetPIDValues command then re-deploy.\n * \n * SetPIDValues Parameters: TalonSRX object (pass in null if configuring\n * TalonFX). TalonFX object (pass in null if configuring TalonSRX). ControlMode\n * boolean: if true, Motion Magic is being used, if false, Motion Magic is not\n * being used.\n */\n // SmartDashboard.putData(\"Set PID Values\", new SetPIDValues(m_intake.getWheelIntakeTalonSRX(), null, false));\n }", "public void setStartState(State startState) {\n\t\tthis.startState=startState;\r\n\t}", "public static void resetValues() {\r\n\t\t// System.out.println(\"ExPar.resetValues()\");\r\n\t\tString cn = \"de.pxlab.pxl.ExPar\";\r\n\t\ttry {\r\n\t\t\tClass cls = Class.forName(cn);\r\n\t\t\tField[] fld = cls.getFields();\r\n\t\t\tint n2 = fld.length;\r\n\t\t\tfor (int j = 0; j < n2; j++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tObject p = fld[j].get(null);\r\n\t\t\t\t\tif (p instanceof de.pxlab.pxl.ExPar) {\r\n\t\t\t\t\t\t// System.out.println(\"ExPar.resetValue(): \" +\r\n\t\t\t\t\t\t// fld[j].getName() + \" = \" +\r\n\t\t\t\t\t\t// ((ExPar)p).defaultValue.toString());\r\n\t\t\t\t\t\t((ExPar) p)\r\n\t\t\t\t\t\t\t\t.setValue((ExParValue) (((ExPar) p).defaultValue\r\n\t\t\t\t\t\t\t\t\t\t.clone()));\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (NullPointerException npx) {\r\n\t\t\t\t} catch (IllegalAccessException iax) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (ClassNotFoundException cnfe) {\r\n\t\t\tSystem.out.println(\"ExPar.resetValues(): Oh! Class \" + cn\r\n\t\t\t\t\t+ \" not found!\");\r\n\t\t}\r\n\t\tsetDate();\r\n\t\tif (Base.hasDisplayDeviceFrameDuration()) {\r\n\t\t\tVideoFrameDuration.set(Base.getDisplayDeviceFrameDuration());\r\n\t\t}\r\n\t}", "public void reset() {\r\n reset(params);\r\n }", "protected void reset() {\n\t\t}", "public void reset() {\n\t\tmCycleFlip = false;\n\t\tmRepeated = 0;\n\t\tmMore = true;\n //mOneMoreTime = true;\n \n\t\t// 추가\n\t\tmStarted = mEnded = false;\n\t\tmCanceled = false;\n }", "public void setStart(int start) {\n this.start=start;\n }", "public void reset() {\n \titems.clear();\n \tsetProcessCount(0);\n }", "public static void reset() {\n start = new Date().getTime();\n killed = 0;\n time = 0;\n }", "void reset()\n {\n reset(values);\n }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "protected void resetParams() {\n\t\treport.report(\"Resetting Test Parameters\");\n\t\t// numberOfRecoverys = 0;\n\t\tstreams = new ArrayList<StreamParams>();\n\t\tlistOfStreamList = new ArrayList<ArrayList<StreamParams>>();\n\t}", "public void reset() {\n firstUpdate = true;\n }", "@Override\r\n\t\t\tpublic void autStartProcess() {\n\t\t\t}", "private void reset() {\n }", "private void reset() {\n\t availableInputs = new HashSet<String>(Arrays.asList(INPUT));\n\t requiredOutputs = new HashSet<String>(Arrays.asList(OUTPUT));\n\t updateInputAndOutput(availableInputs, requiredOutputs);\n\t}", "public void setStart(int start) {\r\n this.start = start;\r\n }", "public void reset() {\n setValuesInternal(new Date(clock.getTime()), false, true);\n }", "public void resetPIDF() {\n m_masterMotor.config_kP(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_P);\n m_masterMotor.config_kI(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_I);\n m_masterMotor.config_kD(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_D);\n m_masterMotor.config_kF(RobotMap.PID_PRIMARY_SLOT, RobotMap.LAUNCHER_F);\n }", "public void reset() {\nsuper.reset();\nsetIncrease_( \"no\" );\nsetSwap_( \"tbr\" );\nsetMultrees_( \"no\" );\nsetRatchetreps_(\"200\");\nsetRatchetprop_(\"0.2\");\nsetRatchetseed_(\"0\");\n}", "public void reset () {\n\t\tclearField();\n\t\tstep_ = 0;\n\t}", "public void resetClick() {\n timeline.stop();\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n gOL.resetGenCounter();\n generationLabel.setText(Integer.toString(gOL.getGenCounter()));\n board.resetBoard();\n if (board instanceof DynamicBoard) {\n ((DynamicBoard)board).setGridSize(50);\n canvasDrawer.resetCellSize();\n }\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n fileHandler.resetMetaData();\n canvasDrawer.resetOffset(board, canvasArea);\n draw();\n }", "public void reset() {\n setPrimaryDirection(-1);\n setSecondaryDirection(-1);\n flags.reset();\n setResetMovementQueue(false);\n setNeedsPlacement(false);\n }", "@Override\n public void start() {\n runtime.reset();\n leftWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n rightWheel.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }", "public void setStart(int start) {\n\t\tthis.start = start;\n\t}", "public static void reset(){\r\n\t\tx=0;\r\n\t\ty=0;\r\n\t}", "private void reset () {\n this.logic = null;\n this.lastPulse = 0;\n this.pulseDelta = 0;\n }", "public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}", "protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }", "@Override\n\tpublic void start()\n\t{\n\t\tarena = \"scenarios/boxpushing/arena/pioneer.controller.arena.txt\"; \n\n\t\t\n\t\tschedule.reset();\n\n\t\tsuper.start();\n\n\t\tresetBehavior();\n\n\t}", "public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "public void reset() {\n cycles = 0;\n nextHaltCycle = GB_CYCLES_PER_FRAME;\n nextUpdateCycle = 0;\n running = false;\n timer.reset();\n \n cpu.reset();\n ram.reset();\n soundHandler.reset();\n }", "private void resetParameters() {\n\t\twKeyDown = false;\n\t\taKeyDown = false;\n\t\tsKeyDown = false;\n\t\tdKeyDown = false;\n\t\tmouseDown = false;\n\t\t// reset mouse\n\t\tMouse.destroy();\n\t\ttry {\n\t\t\tMouse.create();\n\t\t} catch (LWJGLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t// resets the player's hp\n\t\tplayer.setHP(1000);\n\t\t// resets the player's position\n\t\tplayer.setX(initPlayerX);\n\t\tplayer.setY(initPlayerY);\n\t\t// the game is not over\n\t\tgameOver = false;\n\t\tstopDrawingPlayer = false;\n\t\tgameWon = false;\n\t\t// clears the entity arraylists\n\t\tenemy.clear();\n\t\tbullet.clear();\n\t\tenemy_bullet.clear();\n\t\tpowerup.clear();\n\t\texplosion.clear();\n\t\t// cash and totalCash are 0\n\t\tcash = 0;\n\t\ttotalCash = 0;\n\t\t// bullet is activated, upgraded weapons are not activated\n\t\tbulletShot = true;\n\t\tdoubleShot = false;\n\t\tlaserShot = false;\n\t\t// boss\n\t\tbossSpawned = false;\n\t\tbossMovement = 3;\n\t\tbossExplosionNum = 0;\n\t}", "public void reset() {\n sum1 = 0;\n sum2 = 0;\n }", "public void reset()\n {\n // put your code here\n position = 0;\n order = \"\";\n set[0] = 0;\n set[1] = 0;\n set[2] = 0;\n }", "public void reset() { \r\n stop(); \r\n if (midi) \r\n sequencer.setTickPosition(0); \r\n else \r\n clip.setMicrosecondPosition(0); \r\n audioPosition = 0; \r\n progress.setValue(0); \r\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "public void ResetCounter()\r\n {\r\n counter.setCurrentValue(this.startValue);\r\n }", "public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}", "@Override\n public void start() {\n checkValue();\n super.start();\n }", "@Override\n public void start() {\n\n runtime.reset();\n currentSpeedRight = 0.0;\n currentSpeedLeft = 0.0;\n // currentSpeedArm = 0.0;\n currentLiftSpeed = 0.0;\n robot.rearTouch.setMode(DigitalChannel.Mode.INPUT);\n }", "private void startProcess() {\r\n \t\tstartCount++;\r\n \t\tString threadName = Thread.currentThread().getName() + \"-starter-\" + startCount;\r\n \t\tThread starter = new Thread(threadName) {\r\n \t\t\t@Override\r\n \t\t\tpublic void run() {\r\n \t\t\t\tstartupThrotle.acquireUninterruptibly();\r\n \t\t\t\tlong startTime = System.currentTimeMillis();\r\n \t\t\t\tMaximaProcess mp = makeProcess();\r\n \t\t\t\tstartupTimeHistory.add(System.currentTimeMillis() - startTime);\r\n \t\t\t\tmp.deactivate();\r\n \t\t\t\tpool.add(mp);\r\n \t\t\t\tstartupThrotle.release();\r\n \t\t\t}\r\n \t\t};\r\n \t\tstarter.start();\r\n \t}", "public void start(){\n\t\t//System.out.println(\"SimulationTime.start\");\n\t\tthis.running\t\t\t= true;\n\t\tthis.pause\t\t\t\t= false;\n\t}", "public void resetJBJ() {\n min = 0;\n max = 1000;\n spinCVal.setValue(0);\n spinPVal.setValue(0);\n }", "private void resetTwoStage() {\n PrefUtils.setInstallDate(System.currentTimeMillis(), mContext);\n PrefUtils.setInstallDays(0, mContext);\n PrefUtils.setEventCount(0, mContext);\n PrefUtils.setLaunchCount(0, mContext);\n PrefUtils.setStopTrack(false, mContext);\n }", "public void reset() {\n next = 1000;\n }", "void set_running() {\n this.cur_state = State.RUNNING;\n try (Scanner randGen = new Scanner(new File(\"random-numbers.txt\"))){\n if(burst_time == 0) {\n \tif(randInts.size() == 0) { \t \n while(randGen.hasNext()) {\n randInts.add(randGen.nextInt());\n }\n }\n }\n int rand_val = randInts.remove(0);\n burst_time = (rand_val % rbound) + 1;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void reset(){\n this.context.msr.setReadyForInput(false);\n emptyAllInputBuffers();\n emptyAllOutputBuffers();\n emptyEngineersConsoleBuffer();\n }", "public void reset() {\n\n\t}", "public void reset(){\n currentStage = 0;\n currentSide = sideA;\n }", "public void reset() {\n //mLoader.reset();\n start();\n }", "public void resetCurrX() {\n currX = getStartX;\n }", "public void reset(){\n\t\tfrogReposition();\n\t\tlives = 5;\n\t\tend = 0;\n\t}", "@Override\n public void init(){\n setStartIn18Inches(false);\n super.init();\n //start\n programStage = progStates.allowingUserControl1.ordinal();\n\n //since we are measuring, start at 0,0,0\n setStartingPosition(0,0,Math.toRadians(0));\n }", "public void reset()\n {\n Iterator i;\n\n i = params.iterator(); \n while (i.hasNext()) {\n ((Parameter)i.next()).reset();\n }\n\n i = options.iterator(); \n while (i.hasNext()) {\n ((Parameter)i.next()).reset();\n }\n }", "public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}", "@Override\n public void start() {\n fireServo.setPosition(STANDBY_SERVO);\n runtime.reset();\n }", "public void reset () {}", "public void reset()\r\n\t{\r\n\t\ttimer.stop();\r\n\t\ttimer.reset();\r\n\t\tautoStep = 0;\r\n\t}", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}" ]
[ "0.74428654", "0.66450965", "0.64727104", "0.64520544", "0.63994366", "0.6395044", "0.62698513", "0.6262207", "0.625031", "0.6244396", "0.6236841", "0.6223383", "0.6220049", "0.62179595", "0.6178428", "0.6170718", "0.61661166", "0.61524385", "0.61490154", "0.6146559", "0.6143988", "0.608186", "0.60807484", "0.60400146", "0.60394174", "0.6027838", "0.6027838", "0.6027838", "0.6027838", "0.6027838", "0.6016527", "0.5970293", "0.59389424", "0.5922462", "0.59190905", "0.58708423", "0.5869614", "0.58658946", "0.5856986", "0.5847689", "0.5846944", "0.5836258", "0.5833506", "0.5822581", "0.5820563", "0.5810624", "0.5805025", "0.5798303", "0.5794445", "0.5791068", "0.57798094", "0.57777053", "0.5776028", "0.5762711", "0.57591254", "0.5757904", "0.5753688", "0.5752155", "0.57505465", "0.57500887", "0.5749873", "0.5746048", "0.57313776", "0.5731298", "0.57308203", "0.5719925", "0.5717623", "0.5714131", "0.5713449", "0.5711567", "0.5710639", "0.5709389", "0.56952906", "0.5694996", "0.5691188", "0.56911093", "0.5690813", "0.5686932", "0.56859666", "0.56747955", "0.566006", "0.56591725", "0.56584793", "0.56533045", "0.5652294", "0.5639131", "0.563882", "0.5636734", "0.56362927", "0.5630631", "0.56285226", "0.5628472", "0.5627813", "0.5621032", "0.5615886", "0.561467", "0.5610116", "0.5609569", "0.56089246", "0.5604239", "0.5604239" ]
0.0
-1
A method to restart the process
public void start() { stack = new Stack<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void restart();", "public void restart() {\r\n\t\tstart();\r\n\t}", "protected void restart() {\r\n\t\tthis.stop();\r\n\t\tthis.start();\r\n\t}", "public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}", "@Override\n public void restart() {\n }", "private void restartProcess() {\n //you can send service or broadcast intent to restart your process\n Intent intent = getBaseContext().getPackageManager()\n .getLaunchIntentForPackage(getBaseContext().getPackageName());\n PendingIntent restartIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT);\n AlarmManager mgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 1000, restartIntent); // 1秒钟后重启应用\n System.exit(0);\n }", "@Override\n\tpublic void restart() {\n\t\t\n\t}", "public void restart() {\n\t\tthis.restartEvent.emit();\n\t}", "protected void restart()\r\n \t{\r\n \t\tspielen();\r\n \t}", "public void restart()\n\t{\n\t\tinit();\n\t}", "protected abstract void restartImpl();", "@Override\n public void restart() {\n LOG.info(\"Restarting...\");\n stopService();\n startService();\n }", "public void processRestart(){\n destroyWorkerQueue();\n initWorkerQueue();\n }", "public void restart() {\n try {\n getXMPPServer().restart();\n }\n catch (Exception e) {\n Log.error(e.getMessage(), e);\n }\n sleep();\n }", "public static void restart()\n throws Exception {\n\n stop();\n start();\n }", "@Override\n T restart();", "private void restartApplication() {\n android.os.Process.killProcess(android.os.Process.myPid());\r\n System.exit(0);\r\n }", "public void restart() {\r\n\t\tthis.cancel = false;\r\n\t}", "@PostMapping(value = \"/restart\")\n public ResponseEntity restart(){\n try {\n CommandExecutor.execute(Commands.restart);\n return ResponseEntity.ok().build();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ResponseEntity.status(500).build();\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tmp.start();\n\t}", "public final synchronized void restart() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t}", "protected void onRestart ()\n\t{\n\t\tsuper.onRestart ();\n\t}", "public void restart()\n\t\t{\n\t\tif (!restart_in_progress)\n\t\t\t{\n\t\t\tif (number_of_inits++ < 16)\n\t\t\t\t{\n\t\t\t\t/* will mess up our context */\n\t\t\t\tlog (\"Youtube is probably released, re-initializing\");\n\t\t\t\trestart_in_progress = true;\n\t\t\t\t\n\t\t\t\tinitialize (devkey, this);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\tlog (\"Youtube init is \" + number_of_inits + \", probably in some awful feedback loop, won't try to init\");\n\t\t\t}\n\t\telse\n\t\t\tlog (\"YouTube state error! but a re-initialization is in progress\");\n\t\t}", "void notifyRestart();", "private void restart(String[] command) {\n\t\ttry {\n\t\t\tnew ProcessBuilder(\"shutdown\", \"-r\").start();\n\t\t\tSystem.out.println(\"Beginning restart process.\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public final void restartApp() {\r\n Intent intent = new Intent(getApplicationContext(), SplashActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }", "public void restartThread(){\r\n\t\tlog.write(\"Restarting Thread...\");\r\n\t\tstopThread();\r\n\t\tstartThread();\r\n\r\n\t}", "@Override\n \tprotected void onRestart() {\n \t\tsuper.onRestart();\n \t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\r\n\t}", "@Override\r\n\tprotected void onRestart() {\n\t\tXSDK.getInstance().onRestart();\r\n\t\tsuper.onRestart();\r\n\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t}", "@Override\r\n protected void onRestart() {\n\tsuper.onRestart();\r\n }", "public void onRestart(Bundle params) {\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n }", "private void restartApp() {\n Intent intent = new Intent(application, Launcher.class);\n int mPendingIntentId = 123;\n PendingIntent mPendingIntent =\n PendingIntent.getActivity(\n application,\n mPendingIntentId,\n intent,\n PendingIntent.FLAG_CANCEL_CURRENT\n );\n AlarmManager mgr = (AlarmManager) application.getSystemService(Context.ALARM_SERVICE);\n if (mgr != null) {\n mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, mPendingIntent);\n }\n System.exit(0);\n }", "public void restartGame() {\n\t\tclearGame();\n\t\tstartGame();\n\t}", "private void restart(HttpServletRequest request, HttpServletResponse response) throws Exception {\n SimApi.resetSim();\n }", "@Override\n protected void onRestart() {\n super.onRestart();\n\n }", "@Override\n public int reiniciar(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" restart\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Restarting \"+nombreServicio)){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n return 0;\n }", "public void start(long millisToRestart) throws Exception;", "public void RestartGame()\n {\n \n }", "@Override\n protected void onRestart() {\n super.onRestart();\n recreate();\n }", "private void restart(){\n model.init();\n view.refreshPieces();\n start();\n }", "private void restart() {\n \tanimation.stop();\n \tspeed = 1;\n \tstart(stage);\n }", "private void restartMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_restartMenuItemActionPerformed\n //Get all arguments needed for the program through the system environmental variables\n String command = new String();\n command += System.getProperty(\"java.home\") + File.separator + \"bin\" + File.separator + \"java \";\n for (String args : ManagementFactory.getRuntimeMXBean().getInputArguments())\n {\n command += args + \" \";\n } // for\n command += \"-cp \" + ManagementFactory.getRuntimeMXBean().getClassPath() + \" \";\n command += Comas.class.getName() + \" \";\n\n try\n {\n //Create new process\n Runtime.getRuntime().exec(command);\n } // try\n catch (IOException ex)\n {\n ex.printStackTrace();\n } // catch\n\n //Terminate this instance of the program\n System.exit(0);\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tLog.v(\"tag\",\"onRestart\" );\n\t}", "public void restartActivity() {\n finish();\n startActivity(getIntent());\n }", "public void restart() {\n\t\telements[currentElement - 1].turnOff();\n\t\tstart();\n\t}", "public void restartButtonClick(View v){\n Intent restartApp = getBaseContext().getPackageManager().getLaunchIntentForPackage( getBaseContext().getPackageName() );\n restartApp.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(restartApp);\n System.exit(0);\n }", "public void restartGame() {\n\t\tplayerTurn = 1;\n\t\tgameStart = true;\n\t\tdispose();\n\t\tplayerMoves.clear();\n\t\tboardSize();\n\t\tnew GameBoard();\n\t}", "private void forceRestart() {\n\n/*\t\tAlarmManager alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\t\tlong timeMillis = SystemClock.elapsedRealtime() + 1000; //1 second\n\t\tIntent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\talarmMgr.set(AlarmManager.ELAPSED_REALTIME, timeMillis, PendingIntent.getActivity(this, 0, intent, 0));*/\n\t\tnew Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}", "Mono<RestartApplicationResponse> restart(RestartApplicationRequest request);", "@Override\n \tprotected void onRestart() {\n \t\tsuper.onRestart();\n \t\tLog.d(TAG, \"onRestart\");\n \t}", "@Override\n\t\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tToast.makeText(getApplicationContext(), \"onRestart\", Toast.LENGTH_SHORT).show();\n\n\t\t}", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tshowProcessDialog(\"正在进入聊天室\");\n\t\tnew Thread(new SmackThread()).start();\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n void restart(String resourceGroupName, String workspaceName, String computeName, Context context);", "@Override\n protected void onRestart() {\n super.onRestart();\n Intent returnIntent = new Intent();\n setResult(RESULT_CANCELED, returnIntent);\n onRestart = true;\n finish();\n }", "@Override\n public void onRestart() {\n super.onRestart();\n Log.d(Constants.ERROR_TAG_ACTIVITY_ONE, Constants.ON_RESTART);\n }", "@Override\n public void restart_execute(final RestartMethod method) {\n String _hostname = this.compute.getHostname();\n String _plus = (\"EXECUTE COMMAND: machine restart \" + _hostname);\n InputOutput.<String>println(_plus);\n }", "void restart(String resourceGroupName, String resourceName, String replicaName, Context context);", "@Override\n public void onRestart() {\n super.onRestart();\n app.connectToPacemakerAPI(this);\n }", "@ScriptyCommand(name = \"dbg-restart\", description =\n \"(dbg-restart)\\n\" +\n \"Reset the debugger to the start of the evaluation.\\n\" +\n \"See also: dbg-expr.\")\n @ScriptyRefArgList(ref = \"no arguments\")\n public void dbgRestart()\n throws CommandException {\n checkTrace();\n if (trace.getStack() == null) throw new CommandException(ERR040);\n trace.reset();\n }", "@Override\n public void onRestart() {\n model.onRestartScreen(state.titulo,state.comenzar);\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tLog.v(TAG, \" onRestart()\");\n\t}", "public void restart() {\n eaten = 0;\n }", "public abstract void performRestartActivity(IBinder token, boolean start);", "private void restartButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_restartButtonActionPerformed\n\tPlatypusGUI.getInstance().resetModel();\n\tparent.showNextView();\n }", "private void restartFunc() {\n\t\tdoMinus = false;\n\t\tdoDiv = false;\n\t\tdoPlus = false;\n\t\tdoMinus = false;\n\t\t\n\t}", "public static void restartTiming() {\n SimulatorJNI.restartTiming();\n }", "private void restartHandler() {\n ((ChessPanel) this.getParent()).getGameEngine().reset();\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void restart(String resourceGroupName, String workspaceName, String computeName);", "@Override\n protected void onRestart() {\n super.onRestart();\n Log.v(TAG, \"Invoked onRestart()\");\n\n }", "@Override\n\tprotected void onRestart() {\n\t\tshowPhoto(0);\n\t\tsuper.onRestart();\n\t}", "@Override\n\tprotected void onRestart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onRestart();\n\t\tLog.e(\"mainactivity\", \"restarted\");\n\t}", "void restart(String resourceGroupName, String virtualMachineName, Context context);", "public void restart() {\n Board.gameOver = false;\n CollisionUtility.resetScore();\n loadMenu();\n }", "protected void restartServer() throws Exception {\n createRuntimeWrapper();\n }", "@DISPID(14)\r\n\t// = 0xe. The runtime will prefer the VTID if present\r\n\t@VTID(16)\r\n\tboolean restarted();", "public void restartSermonLoader(){\n getLoaderManager().restartLoader(QuerySermonProperties.id,null,this);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.285 -0400\", hash_original_method = \"BB75EF8F6E0673F65CCB71D9E93FEF94\", hash_generated_method = \"BD5AE59555BC5F38C24F9EF27A079410\")\n \npublic void restart() {\n if (isFailed()) {\n mPrintManager.restartPrintJob(mCachedInfo.getId());\n }\n }", "public void restart() {\n\t\tmadeMove = false;\n\t\tcurrentPit = -1;\n\t\tnewGame(player1.getName(), player2.getName(), originalCount); \n\t}", "void restart(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "@Override\n public void restart(HostFilter filter) {\n hostProvisioner.get().restart(session.getApplicationId(), filter);\n }", "@Override\n protected void onRestart(){\n super.onRestart();\n Log.d(TAG_INFO,\"application restarted\");\n }", "@Override\n protected void onRestart(){\n super.onRestart();\n Log.d(TAG_INFO,\"application restarted\");\n }", "@Override\n public void restart(){\n balls.reInit();\n majGui();\n }", "@Override\r\n public void onRestart() {\r\n super.onRestart();\r\n refreshData();\r\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\ttActivityDisplay.setText(\"On Restart Called\");\n\t}", "void restart(String resourceGroupName, String resourceName, String replicaName);", "void restartVideo();", "@Override\n protected void onRestart() {\n super.onRestart();\n xHelper.log(\"goapp\",\"BoardActivity onRestart\");\n }", "private void restartCtrlSocket() {\n ctrlThreadTask = ThreadTasks.RESTART;\n }", "@Override\n protected void onRestart() {\n \tsuper.onRestart();\n \tSystem.out.println(\"onRestart\");\n \tif(thread == null){\n \t\tthread = new FlashThread();\n \t\tthread.start();\n \t}\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onRestart();\n\t}", "@Override\n protected void onRestart() {\n super.onRestart();\n handler.postDelayed(myRun, speed);\n }", "@Test\n public void restartSystemTest() {\n //Setup\n launcher.launch();\n Game game = launcher.getGame();\n game.start();\n game.stop();\n assertThat(game.isInProgress()).isFalse();\n\n //Execute\n game.start();\n\n //Assert\n assertThat(game.isInProgress()).isTrue();\n }" ]
[ "0.83798516", "0.8364677", "0.81806463", "0.81225675", "0.8007125", "0.80057436", "0.7949288", "0.78276193", "0.78274816", "0.7720152", "0.7647777", "0.75401413", "0.74694985", "0.7452986", "0.74012184", "0.73913", "0.73022664", "0.7107076", "0.710202", "0.7082223", "0.7065743", "0.7057173", "0.7023746", "0.7009082", "0.7000483", "0.6992661", "0.6980064", "0.6961671", "0.69396996", "0.69396996", "0.69396996", "0.6932946", "0.691102", "0.691102", "0.691102", "0.6863469", "0.6850536", "0.6811967", "0.6811967", "0.6795971", "0.6791927", "0.6763936", "0.67504674", "0.67254835", "0.67060596", "0.66910595", "0.6679139", "0.66685104", "0.6661743", "0.6656087", "0.66500187", "0.6640467", "0.66116655", "0.65997905", "0.6567013", "0.6564834", "0.65644896", "0.6562825", "0.65610075", "0.6528584", "0.649563", "0.649153", "0.64906615", "0.6474922", "0.64484364", "0.6439422", "0.6423913", "0.6421753", "0.64207464", "0.6409751", "0.6402038", "0.6396982", "0.6394019", "0.6387198", "0.6386715", "0.63856894", "0.63779104", "0.6375486", "0.6371913", "0.63604033", "0.633752", "0.63302004", "0.63250816", "0.6315249", "0.6302756", "0.6302086", "0.62998253", "0.6286194", "0.62277955", "0.62277955", "0.6209451", "0.6203554", "0.6199456", "0.6198127", "0.61973333", "0.61617464", "0.61577696", "0.6147885", "0.61448616", "0.61310273", "0.61280775" ]
0.0
-1
Returns the evaluation result
public boolean getResult() { if (stack.size() != 1) { throw new IllegalStateException("Stack size mismatch"); } return stack.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Result evaluate();", "float getEvaluationResult();", "String evaluate();", "public String getEvaluate() {\r\n return evaluate;\r\n }", "protected abstract Value evaluate();", "public String getEvaluate() {\n return evaluate;\n }", "public Integer getEvaluate() {\n return evaluate;\n }", "public boolean evaluate();", "double eval();", "public Const evaluate();", "protected SimulatorValue giveResult() {\n\tthis.evalExpression();\n\treturn value;\n }", "@Override\r\n public Evaluation getEvaluation ()\r\n {\r\n return evaluation;\r\n }", "public String eval()\r\n\t{\r\n\t\treturn eval(null, null);\r\n\t}", "void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}", "public abstract Object eval();", "@Override\n\tpublic int evaluate(){\n\t\treturn term.evaluate() + exp.evaluate();\n\t}", "@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "abstract public Vertex getEvaluationResult();", "private Object eval(Fact expr) {\n if (expr.getBool() != null) {\n if (\"true\".equals(expr.getBool())) {\n return true;\n } else {\n return false;\n }\n } else if (expr.getString() != null) {\n return expr.getString();\n } else if (expr.getIdent() != null) {\n if (RESULT_TYPE_VARIABLE.equals(resultType)) {\n return expr.getIdent();\n }\n return scope.getVariable(expr.getIdent());\n } else if (expr.getExpr() != null) {\n return eval(expr.getExpr(), resultType);\n } else if (expr.getLocator() != null) {\n return evalLocator(expr.getLocator());\n } else {\n return expr.getNumber();\n }\n }", "public double evaluate(Context context);", "public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }", "Hojas eval();", "public Double evaluate() {\n Stack<Operator> operatorStack = new Stack<>();\n Stack<Operand> operandStack = new Stack<>();\n while (!getTokenQueue().isEmpty()) {\n Token token = getTokenQueue().dequeue();\n if (token instanceof Operand) {\n operandStack.push(((Operand) token));\n } else if (token instanceof LeftParen) {\n operatorStack.push(((LeftParen) token));\n } else if (token instanceof RightParen) {\n while (!(operatorStack.peek() instanceof LeftParen)) {\n topEval(operatorStack, operandStack);\n }\n operatorStack.pop();\n } else {\n Operator operator = (((Operator) token));\n while (keepEvaluating(operatorStack, operator)) {\n topEval(operatorStack, operandStack);\n }\n operatorStack.push(operator);\n }\n }\n while (!operatorStack.isEmpty()) {\n topEval(operatorStack, operandStack);\n }\n return operandStack.pop().getValue();\n }", "int getEvaluations();", "public double evaluate() throws Exception {\r\n // this expression compare from variable\r\n throw new Exception(\"this expression contains a variable\");\r\n }", "public float evaluate() \n {\n return evaluate(expr, expr.length()-1);\n }", "public interface Evaluator\n{\n /**\n * Return true if the given object is valid as an expression to\n * the evaluator. If an object is a valid expression, then the\n * evaluator is, in general, able to <code>eval()</code> it into\n * a result (or at least reasonably attempt to do so).\n *\n * @param value the value to check\n * @return true if it is valid as an expression, false if not\n */\n public boolean isExpression (Object value);\n\n /**\n * Return true if the given object is a possible result of evaluation.\n * If this returns true, then it is conceivable that the given object\n * was the result of a call to <code>eval()</code> on this evaluator.\n *\n * @param value the value to check\n * @return true if it is a possible result, false if not\n */\n public boolean isResult (Object value);\n\n /**\n * Evaluate the given value as an expression, yielding some result\n * value.\n *\n * @param expression the thing to evaluate\n * @return the result of evaluation\n */\n public Object eval (Object expression);\n}", "public String evaluate(String expression);", "public Evaluator getEvaluator() {\n return evaluator;\n }", "EvaluationResult evalExpression(ValueExp expr) { return evalExpression(expr, true); }", "private BigDecimal evaluateResult() throws MathematicalError {\n if (!popOutOperationStack()) {\n throw new MathematicalError(\"Mismatched parentheses in the expression\");\n }\n for (ListIterator<String> iterator = outputQueue.listIterator(); iterator.hasNext(); ) {\n String element = iterator.next();\n if (!element.startsWith(valueBaseName)) {\n iterator.remove();\n Operation<BigDecimal, MathematicalError> operation = operationMap.get(element);\n int argumentsCount = operation.getArgumentsCount();\n BigDecimal[] arguments = new BigDecimal[argumentsCount];\n for (int i = 0; i < argumentsCount; ++i) {\n arguments[i] = valueMap.get(iterator.previous());\n iterator.remove();\n }\n String valueName = valueBaseName + valueCount++;\n BigDecimal tempResult = operation.getResult(arguments);\n if (tempResult == null) {\n return null;\n }\n valueMap.put(valueName, tempResult);\n iterator.add(valueName);\n }\n }\n return valueMap.get(outputQueue.get(0));\n }", "@NotNull\n public final Promise<XExpression> calculateEvaluationExpression() {\n return myValueContainer.calculateEvaluationExpression();\n }", "public String getSelfEvaluation() {\n return selfEvaluation;\n }", "@Override\r\n\tpublic double eval() {\r\n\t\tresult = op.apply(arg.eval());\r\n\t\treturn result;\r\n\t}", "@Override\n public double evaluate() {\n setState(State.START);\n while (true) {\n switch(getState()) {\n case START:\n start();\n break;\n case NUMBER:\n number();\n break;\n case OPERATOR:\n operator();\n break;\n case LEFT_PAREN:\n leftParen();\n break;\n case RIGHT_PAREN:\n rightParen();\n break;\n case END:\n end();\n return (Double)getStack().pop();\n default:\n throw new Error(\"Something is wrong in ParenthesisCalculator.evaluate\");\n }\n }\n }", "public void evaluate() throws Throwable {\n }", "public double getResult() {\n\t\treturn result; // so that skeleton code compiles\n\t}", "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public double evaluate(double x);", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "public double getResult()\n { \n return answer;\n }", "public int expressionEval(String expression){\n\n int result = 0;\n\n\n\n return result;\n }", "int getResultValue();", "int getResultValue();", "boolean isEvaluable();", "public int evaluate(){\r\n\t\tString value = expressionTree.getValue();\r\n\t\tint result = 0;\r\n\t\tif (isNumber(value)){\r\n\t\t\treturn stringToNumber(value);\r\n\t\t}\r\n\t\tif (value.equals(\"+\")){\r\n\t\t\tresult = 0;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult += (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"*\")){\r\n\t\t\tresult = 1;\r\n\t\t\tfor (Iterator<Tree<String>> i = expressionTree.iterator(); i.hasNext();){\r\n\t\t\t\tresult *= (new Expression(i.next().toString())).evaluate();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (value.equals(\"-\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() -\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\tif (value.equals(\"/\")){\r\n\t\t\tresult = (new Expression(expressionTree.getChild(0).toString())).evaluate() /\r\n\t\t\t(new Expression(expressionTree.getChild(1).toString())).evaluate();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "ReturnedValueEvaluationCondition getReturnedValue();", "@Override\n\tpublic Integer evaluate() {\n\t\treturn Integer.parseInt(this.getValue());\n\t}", "public Object eval(Environment e) \n {\n return val;\n }", "@Override\n void execute(RolapEvaluator evaluator) {\n }", "public String getEvaluationCondition()\r\n {\r\n return evaluationCondition;\r\n }", "public boolean evaluate() {\r\n\t\t\tif (this.isKnownValue()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// handle the case when this.getValue() is null\r\n\t\t\tif (this.getValue() == null) {\r\n\t\t\t\t// if the value is null, then we just need to see if expected evaluation is also null\r\n\t\t\t\treturn this.getCurrentEvaluation() == null;\r\n\t\t\t}\r\n\t\t\t// if entities have the same name, they are equals.\r\n\t\t\tif (this.getCurrentEvaluation().getName().equalsIgnoreCase(this.getValue().getName())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}", "public void executeevaluate() {\n \t\tString board = conf.getProperty(\"gamesman.board\");\n \t\tif (board == null)\n \t\t\tUtil.fatalError(\"Please specify a hash to evaluate\");\n \t\tBigInteger val = new BigInteger(board);\n \t\tSystem.out.println(gm.primitiveValue(gm.hashToState(val)));\n \t}", "@Test\n public void test01(){\n Object result = FelEngine.instance.eval(\"5000*12+7500\");\n System.out.println(result);\n }", "public double evaluate(boolean pSave) {\r\n \t\tdouble result = 0.0;\r\n \t\tEnumeration args = getAllArguments().elements();\r\n \t\twhile (args.hasMoreElements()) {\r\n \t\t\tArgument arg = (Argument) args.nextElement();\r\n \t\t\t// System.out.println(\"relevant argument: \" + arg.toString());\r\n \t\t\tresult += arg.evaluate();\r\n \t\t}\r\n \r\n \t\t// should we take into account anyone pre-supposing or opposing us?\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \t\tVector dependent = db.getDependentAlternatives(this, ArgType.OPPOSES);\r\n \t\tIterator depI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += -10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \t\tdependent = db.getDependentAlternatives(this, ArgType.PRESUPPOSES);\r\n \t\tdepI = dependent.iterator();\r\n \t\twhile (depI.hasNext()) {\r\n \t\t\tAlternative depA = (Alternative) depI.next();\r\n \t\t\tif (depA.getStatus() == AlternativeStatus.ADOPTED) {\r\n \t\t\t\tresult += 10; // assume amount is MAX\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// System.out.println(\"setting our evaluation = \" + new\r\n \t\t// Double(result).toString());\r\n \t\tsetEvaluation(result);\r\n \r\n \t\tif (pSave) {\r\n \t\t\t// /\r\n \t\t\t// TODO This was added to get the integrated editors\r\n \t\t\t// updating correctly, however would be better suited\r\n \t\t\t// in a seperate function which is then refactored\r\n \t\t\t// outward so other places in SEURAT use it.\r\n \t\t\tConnection conn = db.getConnection();\r\n \t\t\tStatement stmt = null;\r\n \t\t\tResultSet rs = null;\r\n \t\t\ttry {\r\n \t\t\t\tstmt = conn.createStatement();\r\n \r\n \t\t\t\t// TODO Function call here is really hacky, see\r\n \t\t\t\t// the function inDatabase()\r\n \t\t\t\tif (inDatabase()) {\r\n \t\t\t\t\tString updateParent = \"UPDATE alternatives \"\r\n \t\t\t\t\t\t+ \"SET evaluation = \"\r\n \t\t\t\t\t\t+ new Double(evaluation).toString() + \" WHERE \"\r\n \t\t\t\t\t\t+ \"id = \" + this.id + \" \";\r\n \t\t\t\t\tstmt.execute(updateParent);\r\n \r\n \t\t\t\t\t// Broadcast Notification That Score Has Been Recomputed\r\n \t\t\t\t\tm_eventGenerator.Updated();\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// If The RationaleElement Wasn't In The Database There\r\n \t\t\t\t\t// Is No Reason To Attempt To Save The Evaluation Score\r\n \t\t\t\t\t// Or Broadcast A Notification About It\r\n \t\t\t\t}\r\n \t\t\t} catch (Exception e) {\r\n \t\t\t\tSystem.out.println(\"Exception while saving evaluation score to database\");\r\n \t\t\t} finally {\r\n \t\t\t\tRationaleDB.releaseResources(stmt, rs);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn result;\r\n \t}", "public abstract double evaluer(SolutionPartielle s);", "public E getResult(){\r\n\t\treturn this.result;\r\n\t}", "public Integer eval() {\r\n Stack<String> operatorStack = new Stack<String>();\r\n Stack<Integer> valueStack = new Stack<Integer>();\r\n\r\n // ADD YOUR CODE BELOW HERE\r\n // ..\r\n for (int i = tokenList.size() - 1; i >= 0; i--) {\r\n if (isInteger(tokenList.get(i))) {\r\n valueStack.push(Integer.parseInt(tokenList.get(i)));\r\n } else {\r\n operatorStack.push(tokenList.get(i));\r\n }\r\n }\r\n \r\n \r\n \r\n help(operatorStack,valueStack);\r\n \r\n // ..\r\n // ADD YOUR CODE ABOVE HERE\r\n\r\n return valueStack.get(0); // DELETE THIS LINE\r\n }", "public abstract double evaluate(double value);", "private String evaluate(String expression) {\n String separators = \"()*+/-\";\n String result;\n // Stack for using in algorithm\n Stack<String> stackOperations = new Stack<String>();\n // Stack for RPN - reverse polish notation\n Stack<String> stackRPN = new Stack<String>();\n // Stack for evaluating answer\n Stack<String> stackTemp = new Stack<String>();\n //splitting expression into tokens\n StringTokenizer stringTokenizer = new StringTokenizer(updateUnaryMinus(expression), separators, true);\n\n while (stringTokenizer.hasMoreTokens()) {\n String token = stringTokenizer.nextToken();\n if (isNumber(token)) {\n stackRPN.push(token);\n } else if (isOpenBracket(token)) {\n stackOperations.push(token);\n } else if (isCloseBracket(token)) {\n while (!isOpenBracket(stackOperations.lastElement())) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.pop();\n } else if (isOperator(token)) {\n while (!stackOperations.empty() && isOperator(stackOperations.lastElement())\n && getPrecedence(stackOperations.lastElement()) > getPrecedence(token)) {\n stackRPN.push(stackOperations.pop());\n }\n stackOperations.push(token);\n }\n }\n while (!stackOperations.empty()) {\n stackRPN.push(stackOperations.pop());\n }\n Collections.reverse(stackRPN);\n\n // Evaluation if RPN expression\n while (!stackRPN.empty()) {\n if (isNumber(stackRPN.lastElement())) stackTemp.push(stackRPN.pop());\n else stackTemp.push(makeOperation(stackRPN.pop(), stackTemp.pop(), stackTemp.pop()));\n }\n result = stackTemp.pop();\n return result;\n }", "public EvaluationResultIdentifier getEvaluationResultIdentifier() {\n return evaluationResultIdentifier;\n }", "Object completeExternalFunctionEvaluation() {\n\t\tRTObject returnedObj = null;\r\n\t\twhile (evaluationStack.size() > originalEvaluationStackHeight) {\r\n\t\t\tRTObject poppedObj = popEvaluationStack();\r\n\t\t\tif (returnedObj == null)\r\n\t\t\t\treturnedObj = poppedObj;\r\n\t\t}\r\n\r\n\t\t// Restore our own state\r\n\t\tcallStack = originalCallstack;\r\n\t\toriginalCallstack = null;\r\n\t\toriginalEvaluationStackHeight = 0;\r\n\t\t\r\n\t\t// Restore the callstack that the variablesState uses\r\n\t\tvariablesState.setCallStack(callStack);\r\n\r\n\t\t// What did we get back?\r\n\t\tif (returnedObj != null) {\r\n\t\t\tif (returnedObj instanceof Void)\r\n\t\t\t\treturn null;\r\n\r\n\t\t\t// Some kind of value, if not void\r\n\t\t\tValue<?> returnVal = null;\r\n\r\n\t\t\tif (returnedObj instanceof Value)\r\n\t\t\t\treturnVal = (Value<?>) returnedObj;\r\n\r\n\t\t\t// DivertTargets get returned as the string of components\r\n\t\t\t// (rather than a Path, which isn't public)\r\n\t\t\tif (returnVal.getValueType() == ValueType.DivertTarget) {\r\n\t\t\t\treturn returnVal.getValueObject().toString();\r\n\t\t\t}\r\n\r\n\t\t\t// Other types can just have their exact object type:\r\n\t\t\t// int, float, string. VariablePointers get returned as strings.\r\n\t\t\treturn returnVal.getValueObject();\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "private double individualEvaluation() {\n\t\t//System.out.println(\"indE\"+ myValues.get(myAction.getPurpose()).getStrength(null));\n\t\treturn myValues.get(myAction.getPurpose()).getStrength(null);\n\t}", "public int eval() {\n\t\t\treturn eval(expression.root);\n\t\t}", "int getResult();", "public int evaluate() {\n\t\treturn history + heuristic;\n\t}", "@Override\r\n\tpublic String getResult() {\n\t\tString res;\r\n\t\ttry {\r\n\t\t\tresult = c.calculate(o.getFirst(), o.getSecond(), o.getOperator());\r\n\t\t\t// System.out.println(\"00\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\r\n\t\tres = String.valueOf(result);\r\n\r\n\t\treturn res;\r\n\t}", "public int evaluate() {\n return Condition.INDETERMINATE;\n }", "public double evaluateAsDouble();", "@Override\n\tpublic double evaluate(TransitionSystem ts, Term[] args) throws Exception {\n\t Literal r;\n\t if (literal.indexOf(\".\") > 0) // is internal action\n\t r = new InternalActionLiteral(literal);\n\t else\n\t r = new Literal(literal);\n\t \n\t r.addTerms(args);\n\t VarTerm answer = new VarTerm(\"__RuleToFunctionResult\");\n\t r.addTerm(answer);\n\t \n\t // query the BB\n\t Iterator<Unifier> i = r.logicalConsequence( (ts == null ? null : ts.getAg()), new Unifier());\n\t if (i.hasNext()) {\n\t Term value = i.next().get(answer);\n\t if (value.isNumeric())\n\t return ((NumberTerm)value).solve();\n\t else\n\t throw new JasonException(\"The result of \"+r+\"(\"+value+\") is not numeric!\");\t \n\t } else \n\t throw new JasonException(\"No solution for found for rule \"+r);\n\t}", "public static String getOpResult (){\n \treturn opResult;\n }", "R getValue();", "@Override\n\tdouble evaluate() {\n\t\treturn Math.abs(operand.getVal());\n\t}", "private void testExpression(ASTExpression exp, ASTTerm expectedResult) {\n System.out.print(\"eval[\" + exp + \"] = \");\n ASTTerm result = null;\n try {\n result = interpreter.evaluate(exp);\n } catch (Exception e) {\n fail(e.getMessage());\n }\n System.out.println(result);\n\n assertEquals(expectedResult, result);\n }", "private void evalExpression () {\n\tif (expr.type != null) {\n\t // Expression ist wie vorgesehen getypt\n\t if (expr.type instanceof M_Bool) {\n\t\t// Expression ist eine boolesche, also :\n\t\tdebug.addMsg(\"# expression to evaluate is boolean.\",3);\n\t\tSimulatorBoolEvaluator boolExpr = new SimulatorBoolEvaluator(process, expr);\n\t\tvalue = new SimulatorBoolValue ( boolExpr.giveResult() );\n\t }\n\t else if (expr.type instanceof M_Int) {\n\t\t// Expression ist eine zu Integer evaluierende, also :\n\t\tdebug.addMsg(\"# expression to evaluate is integer.\",3);\n\t\tSimulatorIntEvaluator intExpr = new SimulatorIntEvaluator(process, expr);\n\t\tvalue = new SimulatorIntValue ( intExpr.giveResult() ); \n\t }\n\t else {\n\t /* Platz für Exception, da Expression falsch getypt */\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not properly typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:1 \",0);\n\t }\n\n\t} //--------- end if(1) ------------\n\telse {\n\t // Expression ist nicht getypt also :\n\t debug.addMsg(\"!!! EXCEPTION !!! : Expression not typed \",0);\n\t debug.addMsg(\"!!! Class: SimulatorExprEvaluator \\n!!! Method : evalExpression\\n!!! Pos.:2 \",0);\n\t} //-------- end else --------------\n }", "public Double getResult();", "protected E eval()\n\t\t{\n\t\tE e=this.e;\n\t\tthis.e=null;\n\t\treturn e;\n\t\t}", "public int eval() \n\t { \n\t \treturn eval(root);\n\t }", "Exp\ngetReturnValue();", "@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 abstract double evaluate(Point p);", "private static String evaluate(ArrayList<String> operators, ArrayList<String> operands) {\n\n /* Check for valid input. There should be one more operand than operator. */\n if (operands.size() != operators.size()+1)\n return \"Invalid Input\";\n\n String current;\n int value;\n int numMultiply = 0;\n int numAdd = 0;\n int currentOperator = 0;\n\n /* Get the number of multiplications in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"*\"))\n numMultiply++;\n }\n\n /* Get the number of addition and subtraction in the operators list. */\n for (int i = 0; i < operators.size(); i++) {\n\n if (operators.get(i).equals(\"-\") || operators.get(i).equals(\"+\"))\n numAdd++;\n }\n\n /* Evaluate multiplications first, from left to right. */\n while (numMultiply > 0){\n\n current = operators.get(currentOperator);\n if (current.equals(\"*\")) {\n\n /* When multiplication is found in the operators, get the associative operands from the operands list.\n Associative operands are found in the operands list at indexes current operator and current operator + 1.\n */\n value = Integer.parseInt(operands.get(currentOperator)) * Integer.parseInt(operands.get(currentOperator+1));\n\n /* Remove the operands and the operator since they have been evaluated and add the evaluated answer back in the operands. */\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n\n numMultiply--;\n }\n else\n currentOperator++;\n }\n\n currentOperator = 0;\n\n /* Next evaluate the addition and subtraction, from left to right. */\n while (numAdd > 0){\n current = operators.get(currentOperator);\n if (current.equals(\"+\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) + Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n\n else if (current.equals(\"-\")) {\n\n value = Integer.parseInt(operands.get(currentOperator)) - Integer.parseInt(operands.get(currentOperator+1));\n operators.remove(currentOperator);\n operands.remove(currentOperator);\n operands.remove(currentOperator);\n operands.add(currentOperator, Integer.toString(value));\n numAdd--;\n }\n else\n currentOperator++;\n }\n\n /* When all the operations have been evaluated, the final answer will be in the first element of the operands list. */\n return operands.get(0);\n }", "public int evaluateAsInt();", "public double getBestSolutionEvaluation();", "public String getResult();", "public String getResult();", "public String getResult();", "public Object eval (Object expression);", "Expression getRValue();", "public Single<Double> rxEvaluate() { \n return new io.vertx.reactivex.core.impl.AsyncResultSingle<Double>(handler -> {\n evaluate(handler);\n });\n }", "public int getResult(){\n return localResult;\n }", "public String evalTerm() {\n\n // the value to return\n String value = \"\";\n\n if (this.selection == 1) {\n\n // evaluate option 1: <fac>\n value = this.fac.evalFac();\n\n } else if (this.selection == 2) {\n\n // evaluate option 2: <fac> * <term>\n value = this.fac.evalFac();\n String valueTerm = this.term.evalTerm();\n\n // perform integer multiplication\n int value1 = Integer.parseInt(value);\n int value2 = Integer.parseInt(valueTerm);\n int finalValue = value1 * value2;\n\n // convert back to string\n value = Integer.toString(finalValue);\n\n }\n\n // check for value greater than 99999999\n if (java.lang.Math.abs(Integer.parseInt(value)) > 99999999) {\n\n // error\n System.out.println(\"Error: Value exceeds 8 digits.\");\n System.exit(-1);\n\n }\n\n return value;\n\n }", "private int evaluate() {\n return (int) (Math.random() * 8);\n }", "Expression getValue();", "Expression getValue();", "double getResult() {\r\n\t\treturn result;\r\n\t}", "public String getResult()\r\n\t{\r\n\t\treturn result;\r\n\t}", "@Override\n public Double evaluate() {\n return left.evaluate() + right.evaluate();\n }", "public ExecutionResults getExecutionResults() {\n\t\treturn results ;\n\t}", "public void execute() {\n switch (this.opCode) {\n case 'a':\n this.result = this.leftVal + this.rightVal;\n break;\n case 's':\n this.result = this.leftVal - this.rightVal;\n break;\n case 'm':\n this.result = this.leftVal * this.rightVal;\n break;\n case 'd':\n this.result = this.rightVal != 0 ? this.leftVal / this.rightVal : 0.0d;\n break;\n default:\n System.out.println(\"Invalid opCode: \" + this.opCode);\n this.result = 0.0d;\n break;\n }\n numOfCalculations++;\n sumOfResults += result;\n }", "@Override\n public double evaluate() throws Exception {\n return getExpression1().evaluate() - getExpression2().evaluate();\n }" ]
[ "0.8684162", "0.82164735", "0.7905783", "0.75479585", "0.7516329", "0.75128263", "0.7476961", "0.7432914", "0.7405676", "0.7373544", "0.7364137", "0.73351467", "0.7228592", "0.7122765", "0.7089154", "0.7063719", "0.70195955", "0.70068383", "0.69716907", "0.6942436", "0.69058317", "0.68287754", "0.6796717", "0.67832476", "0.6780789", "0.67801315", "0.67735106", "0.6733238", "0.6671217", "0.6653243", "0.66265947", "0.6615779", "0.6607506", "0.66044664", "0.6583015", "0.65674955", "0.6559998", "0.6532018", "0.65309507", "0.6526316", "0.6523336", "0.64953655", "0.6486586", "0.6486586", "0.6483808", "0.64827794", "0.6477528", "0.64501464", "0.64438796", "0.64427423", "0.6433137", "0.6402759", "0.63581276", "0.6348298", "0.6343262", "0.63425624", "0.6341211", "0.63313395", "0.6316631", "0.6315354", "0.63129383", "0.6303521", "0.6298882", "0.62860006", "0.62820816", "0.6265022", "0.6260223", "0.6259383", "0.62417436", "0.6241626", "0.62348044", "0.6232794", "0.62267166", "0.6223381", "0.6221624", "0.62184256", "0.62052435", "0.6204471", "0.62027884", "0.6200339", "0.61983305", "0.6193787", "0.61875856", "0.617578", "0.6172715", "0.6172715", "0.6172715", "0.6170323", "0.6168844", "0.6155259", "0.6150742", "0.6119365", "0.6114377", "0.6097913", "0.6097913", "0.6086921", "0.60854256", "0.605025", "0.60500777", "0.6044449", "0.604364" ]
0.0
-1
loop = 300 ArrayList.forEach 78ms Stream.forEach 49ms
public static void main(String[] args) { try { int loop = 300; long start = System.currentTimeMillis(); for (int i = 0; i < loop; i++ ) byList(); long t1 = System.currentTimeMillis(); for (int i = 0; i < loop; i++ ) byStream(); long t2 = System.currentTimeMillis(); System.out.println("byList: " + (t1 - start) + "ms"); System.out.println("byStream: " + (t2 - t1) + "ms"); } catch(FileTreatmentException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void doParallelStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.parallelStream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doParallelStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "private static void doStream() {\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n long ans = personCopy.stream().filter(p -> p.getHeight() > 180).count();\n System.out.println(\"doStream(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public static void concurrency() {\n List<String> words = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n words.add(UUID.randomUUID().toString());\n\n //Groups the list into a map of strings by length in serial\n long t2s = System.nanoTime();\n Map<Integer, List<String>> a = words.stream()\n .collect(Collectors.groupingBy(String::length));\n long t2d = System.nanoTime() - t2s;\n\n //Groups the list into a map of strings by length in parallel\n long t1s = System.nanoTime();\n ConcurrentMap<Integer, List<String>> b = words.parallelStream()\n .collect(Collectors.groupingByConcurrent(String::length));\n long t1d = System.nanoTime() - t1s;\n\n System.out.println(\"Collect Serial time : \" + t2d);\n System.out.println(\"Collect Parallel time : \" + t1d);\n }", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\n \n list.stream().forEach(out::println);\n \n out.println();\n \n list.stream().parallel().forEachOrdered(out::println);\n \n \n }", "public void runOneIteration() {\n // Update user latent vectors\n\n //IntStream.range(0,userCount).peek(i->update_user(i)).forEach(j->{});\n\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n\n // Update item latent vectors\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n }", "static void UseArrayList(ArrayList<Integer> myList2){\r\n\t\tLong start = System.currentTimeMillis();\r\n\t\tfor (int n=0; n<myList2.size();n++)\r\n\t\t{\r\n\t\t\tfor (int m=n+1; m<myList2.size();m++){\r\n\t\t\t\tif( myList2.get(n)== myList2.get(m) ) {System.out.println(\"Duplicate found \"+myList2.get(n));}\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong End = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Total time taken for executing this code is: \" + (End-start));\r\n\t}", "public static void main(String[] args) {\n\n\n List<Integer> source = buildIntRange();\n\n if(CollectionUtils.isNotEmpty(source)){\n\n }\n // 传统方式的遍历\n long start = System.currentTimeMillis();\n for (int i = 0; i < source.size(); i++) {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"传统方式 : \" + (System.currentTimeMillis() - start) + \"ms\");\n\n // 单管道stream\n start = System.currentTimeMillis();\n source.stream().forEach(r -> {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n System.out.println(\"stream : \" + (System.currentTimeMillis() - start) + \"ms\");\n\n // 多管道parallelStream\n start = System.currentTimeMillis();\n source.parallelStream().forEach(r -> {\n try {\n TimeUnit.MILLISECONDS.sleep(1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n System.out.println(\"parallelStream : \" + (System.currentTimeMillis() - start) + \"ms\");\n }", "public void rc(){\n List<Integer> numbers = new ArrayList<>();\n var result = List.of(1,2,3,4,5,6,7,8,9,10);\n result\n .parallelStream()\n .forEach(number->addToList(numbers,number));\n print.accept(numbers);\n }", "private void m152570a(List<ByteBuffer> list) {\n synchronized (this.f113322u) {\n for (ByteBuffer byteBuffer : list) {\n m152578e(byteBuffer);\n }\n }\n }", "@Override\n\tpublic void forEach(Processor processor) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tprocessor.process(elements[i]);\n\t\t}\n\t}", "public static <K, V> void fastForEach(Reference2ObjectMap<K, V> map, Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 70 */ ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 71 */ if (entries instanceof Reference2ObjectMap.FastEntrySet) {\n/* 72 */ ((Reference2ObjectMap.FastEntrySet)entries).fastForEach(consumer);\n/* */ } else {\n/* 74 */ entries.forEach(consumer);\n/* */ } \n/* */ }", "public static void doFor(){\n ArrayList<Person> personCopy = new ArrayList<>(person);\n long l = System.currentTimeMillis();\n int ans = 0;\n for (Person p: personCopy){\n if (p.getHeight() > 180){\n ans++;\n }\n }\n System.out.println(\"doFor(): \" + ans);\n long e = System.currentTimeMillis();\n System.out.println(\"Cost time: \" + (e - l) + \"ms\");\n System.out.println(\"----------------------------\");\n }", "public void runOneIteration() {\n\t\t// Update user latent vectors\n\t\tfor (int u = 0; u < userCount; u++) {\n\t\t\tupdate_user(u);\n\t\t}\n\n\t\t// Update item latent vectors\n\t\tfor (int i = 0; i < itemCount; i++) {\n\t\t\tupdate_item(i);\n\t\t}\n\t}", "public void printItemsUsingLambdaCollectorsJDK8(List<Item> items){\n\t\tIO.print(\"\\nPrint average of all items price using JDK8 stream, method reference, collector!\");\r\n\t\t// average requires total sum and no of items as well.\r\n\t\t// collect returns ONLY one value throughout the stream. So we need some kind of placer where we will keep storing sum, count during stream.\r\n\t\tAverager avg = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Averager::new, Averager::accept, Averager::mergeIntermediateAverage); \r\n\t\t\t//accept takes one double value from stream and call merge.. method, which combines previous averger`s sum, count.\r\n\t\t\t// All Averager`s methods have no return type except for average which is not used in stream processing.\r\n\t\tIO.print(\"Average of price: \" + String.format(\"%.4f\", avg.average()));\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of items price using JDK8 stream, collector, suming!\");\r\n\t\tdouble total = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.summingDouble(Item::getPrice)); // no need for map as well.\r\n\t\tIO.print(\"Total price: \" + String.format(\"%.4f\", total)); // same result\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toList!\");\r\n\t\tList<Double> prices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t// alternate of item -> item.getPrice()\r\n\t\t\t.collect(Collectors.toList()); \r\n\t\t\t// collects stream of elements i.e. price, and creates a List of price.\r\n\t\tIO.print(\"List of prices: \" + prices); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector toCollection!\");\r\n\t\tprices = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice) \r\n\t\t\t.collect(Collectors.toCollection(ArrayList::new)); // same as toList: Here, we can get prices in any list form; TreeSet, HashSet, ArrayList.\r\n\t\tIO.print(\"List of prices: \" + prices);\r\n\t\t\r\n\t\tIO.print(\"\\nPrint total of all items price using JDK8 stream, collector joining!\");\r\n\t\tString priceString = items\r\n\t\t\t.stream()\r\n\t\t\t.map(Item::getPrice)\r\n\t\t\t.map(Object::toString) //basically, double.toString() as upper map converts stream of Item into stream of Double\r\n\t\t\t.collect(Collectors.joining(\", \")); // same as toList.\r\n\t\tIO.print(\"List of prices: [\" + priceString + \"]\"); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, List<Item>> byType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType));\r\n\t\tIO.print(\"Items by Type: \" + byType ); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Double> sumByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.summingDouble(Item::getPrice)));\r\n\t\tIO.print(\"Total prices by Type: \" + sumByType); \r\n\t\t\r\n\t\tIO.print(\"\\nPrint items based on type using JDK8 stream, collector grouping!\");\r\n\t\tMap<ITEM_TYPE, Optional<Item>> largetstByType = items\r\n\t\t\t.stream()\r\n\t\t\t.collect(Collectors.groupingBy(Item::getType, Collectors.maxBy(Comparator.comparing(Item::getPrice) )));\r\n\t\tIO.print(\"Total prices by Type: \" + largetstByType); \r\n\t}", "public void forEach(Processor processor) {\n\n\t}", "@Test\n public void forEach() throws Exception {\n }", "@Test\n public void streamApiTest(){\n Collection<Integer> myCollection=initializeIntCollection(3,5);\n\n long sumOfOddValues3times=myCollection.stream().\n filter(o -> o % 2 ==1). // for all odd numbers\n mapToInt(o -> o*3). // multiply their value on 3\n sum(); // and return their sum (reduce operation)\n Assert.assertEquals((3+5+7)*3, sumOfOddValues3times);\n\n Optional<Integer> sumOfModulesOn3= myCollection.stream().\n filter( o -> o % 3 ==0).\n reduce((sum, o) -> sum = sum + o);\n Assert.assertEquals(new Integer(3+6), sumOfModulesOn3.get());\n\n\n\n Collection<Integer> evenCollection=new ArrayList<>();\n myCollection.\n stream().\n filter(o -> o % 2 == 0).\n forEach((i) -> evenCollection.add(i));\n }", "public void mo7636x(List<C0933b> list) {\n int size = list.size();\n for (int i = 0; i < size; i++) {\n mo7620a(list.get(i));\n }\n list.clear();\n }", "public static void main(String[] args) {\n CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n CopyOnWriteArraySet<String> set = new CopyOnWriteArraySet<>();\n\n for (int i = 0; i < 30; i++) {\n new Thread(()->{\n set.add(UUID.randomUUID().toString());\n System.out.println(set);\n },String.valueOf(i)).start();\n }\n\n /**\n * 1.故障现象\n * java.util.ConcurrentModificationException\n * 2.导致原因\n * 并发争抢修改导致\n * 3.解决方案\n * List<String> list = new Vector<>();\n * List<String> list = Collections.synchronizedList(new ArrayList<>());\n * CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n * 4.优化建议\n * CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();\n */\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> array = new ArrayList<>();\n\t\tLinkedList<Integer> linked = new LinkedList<>();\n\t\t\n\t\tlong aStart = System.currentTimeMillis();\n\t\tint i;\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\tlong aEnd = System.currentTimeMillis();\n\t\tlong aTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlong lStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlong lEnd = System.currentTimeMillis();\n\t\tlong lTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\t\n\t\t\n\t\taStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<1000000; i++){\n\t\t\tarray.add(i);\n\t\t}\n\t\taEnd = System.currentTimeMillis();\n\t\taTime = aEnd - aStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+aTime+\"ms\");\n\t\t\n\t\t\n\t\tlStart = System.currentTimeMillis();\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t\tlEnd = System.currentTimeMillis();\n\t\tlTime = lEnd - lStart;\n\t\tSystem.out.println(\"Elapsed Time for the array and \"+i+\" elements : \"+lTime+\"ms\");\n\t\tfor(i = 0; i<100000; i++){\n\t\t\tlinked.add(i);\n\t\t}\n\t}", "public static void main(String[] args) {\n float[] fb=new float[9];\n fb[0]=(int)12;\n fb[1]=(byte)13;\n fb[2]=(short)8;\n fb[3]=12.021f;\n // fb[4]=23443.43d;\n// fb[4]='a';\n// for(int i=0;i<=4;i++) {\n// \t System.out.println(fb[i]);\n// }\n List<Integer> lis1=new ArrayList<>();\n List<Integer> lis2=new ArrayList<>();\n lis1.add(2);\n lis1.add(4);\n lis1.add(16);\n lis1.add(32);\n lis1.add(96);\n lis1.add(123);\n lis1.add(435);\n lis1.add(234);\n lis1.add(100);\n lis1.add(122);\n lis1.add(240);\n lis1.add(350);\n java.util.Iterator<Integer> itr= lis1.iterator();\n //while(itr.hasNext()) {\n // itr.remove();\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n \t System.out.println(itr.next());\n\n \t System.out.println(lis1);\n // \n// long startTime = System.currentTimeMillis();\n// getTotalX(lis1,lis2);\n// System.out.println(\"Time taken by 2 * o(n^2) \" + (System.currentTimeMillis() - startTime) + \"ms\"); \n// \n \t\t \n\t}", "@Test\n public void testGetNextCulturalObjectByStreamMethod() {\n Multimap<Long, CulturalObject> multimap = ArrayListMultimap.create();\n IntStream.range(0, NUMBER_OF_EXECUTIONS).parallel().forEach(i -> {{\n CulturalObject co = cardService.getNextCulturalObject(null);\n if (co != null) {\n multimap.put(co.getId(), co);\n }\n }});\n\n double[] sizes = multimap.keySet().stream().mapToDouble(aLong -> (double) multimap.get(aLong).size()).toArray();\n StandardDeviation std = new StandardDeviation();\n assertThat(std.evaluate(sizes), is(closeTo(0.0, 0.5)));\n\n }", "public static void arraySpeedTestRemove0() {\n ArrayList<Integer> list = new ArrayList<Integer>();\n\t\tfor(int n = 0; n < 8000000; n++) {\n list.add(n);\n }\n\n //Displaying quantity of elements\n\t\tSystem.out.println(\"*** Quantity of elements in the collection: \" + list.size());\n\n //Deleting last element in the collection\n long begin = System.currentTimeMillis();\n\t\tlist.remove(list.size()-1);\n long end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing last element has taken: \" + (end - begin) + \"ms\");\n\n //Deleting first element from collection\n begin = System.currentTimeMillis();\n\t\tlist.remove(0);\n end = System.currentTimeMillis();\n\n //Displaying time of deletion\n\t\tSystem.out.println(\"*** Removing first element has taken: \" + (end - begin) + \"ms\");\n}", "public static <T> void forEach(List<T> list, Consumer<T> c) {\n\t\tfor (T t : list) {\n\t\t\tc.accept(t);\n\t\t}\n\t}", "Foreach createForeach();", "public static void main(String[] args) {\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\t\n\t\t//adding\n\t\tnumbers.add(10);\n\t\tnumbers.add(100);\n\t\tnumbers.add(50);\n\t\t\n\t\t//retrieving\n\t\tSystem.out.println(numbers.get(0));\n\t\t\n\t\t//Indexed for loop iteration\n\t\tSystem.out.println(\"Iteration#1\");\n\t\tfor(int i=0; i<numbers.size(); i++) {\n\t\t\tSystem.out.println(numbers.get(i));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Iteration#2\");\n\t\tfor (Integer value: numbers) {\n\t\t\tSystem.out.println(value);\n\t\t}\n\t\t\n\t\t//removing items from the Last if ArrayList is fast\n\t\tnumbers.remove(numbers.size() -1);\n\t\t\n\t\t//remove items from the start of list a little slower, cuz internally it is an array\n\t\tnumbers.remove(0);\n\t\t\n\t\tLinkedList<Integer> linkedList = new LinkedList<Integer>();\n\t\tArrayList<Integer> arrayList = new ArrayList<Integer>();\n\t\t\n\t\tdoTimings(\"LinkedList\", linkedList);\n\t\tdoTimings(\"ArrayList\", arrayList);\n\t\t\n\t}", "private static void iterator() {\n\t\t\r\n\t}", "@Override\n public void forEach(Consumer<? super T> action) {\n items.forEach(action);\n }", "@Test\n public void test1(){\n\n// List<String> list= new ArrayList<String>();\n// list.add(\"张三\");\n// list.add(\"李四\");\n// list.add(\"王五\");\n// list.add(\"马六\");\n// System.out.println(list.get(0));\n//\n// list.forEach(li-> System.out.println(li+\"干什么\"));\n//// Runnable no=() -> System.out.println(\"hello\");\n//\n// Complex complex=new Complex(2,3);\n//\n// Complex c=new Complex(5,3);\n// Complex cc=c.plus(complex);\n// System.out.println(cc.toString()+\"11111111111111111111\");\n List<String> data = new ArrayList<>();\n data.add(\"张三\");\n data.add(\"李四\");\n data.add(\"王三\");\n data.add(\"马六\");\n data.parallelStream().forEach(x-> System.out.println(x));\n System.out.println(\"--------------------\");\n data.stream().forEach(System.out::println);\n System.out.println(\"+++++++++++++++++\");\n List<String> kk=data.stream().sorted().limit(2).collect(Collectors.toList());\n kk.forEach(System.out::println);\n List<String> ll=data.stream()\n .filter(x -> x.length() == 2)\n .map(x -> x.replace(\"三\",\"五\"))\n .sorted()\n .filter(x -> x.contains(\"五\")).collect(Collectors.toList());\n ll.forEach(string-> System.out.println(string));\n for (String string:ll) {\n System.out.println(string);\n }\n ll.stream().sorted().forEach(s -> System.out.println(s));\n// .forEach(System.out::println);\n Thread thread=new Thread(()->{ System.out.println(1); });\n thread.start();\n\n LocalDateTime currentTime=LocalDateTime.now();\n\n System.out.println(\"当前时间\"+currentTime);\n LocalDate localDate=currentTime.toLocalDate();\n System.out.println(\"当前日期\"+localDate);\n\n Thread tt=new Thread(()-> System.out.println(\"111\"));\n }", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mInetAddressList) {\n\t\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\t\tif (System.currentTimeMillis() - cacheEntry.getValue().getCreateTime() >= mCacheTime * 1000) {\n\t\t\t\t\t\tcacheIterator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs2=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size2=:\"+hs2.size());\r\n\t\t\t\tIterator<String> iter = hs2.iterator();\r\n\t\t\t\twhile(iter.hasNext()){\r\n\t\t\t\t String result = iter.next();\r\n\t\t\t\t }\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time2=: \"+(end-start));\r\n\t\t\t}", "@Override\n protected void runOneIteration() throws Exception {\n }", "private void m10259a(ArrayList<Double> arrayList) {\n int size = arrayList.size();\n if (size <= this.f8993u) {\n this.f8973a.mo3315b((ArrayList) arrayList);\n return;\n }\n ArrayList arrayList2 = new ArrayList();\n int i = size / this.f8993u;\n for (int i2 = 0; i2 < this.f8993u; i2++) {\n int i3 = i2 * i;\n if (i3 >= size) {\n arrayList2.add(arrayList.get(size - 1));\n } else {\n arrayList2.add(arrayList.get(i3));\n }\n }\n this.f8973a.mo3315b(arrayList2);\n }", "public void iterateEventList();", "private static void concurrentList(){\n\t\tList<Object> unsafeList = new ArrayList<Object>();\n\t\tList<Object> safeList = Collections.synchronizedList(unsafeList);\n\t\t\n\t\t/*\n\t\t * Note that you must manually synchronize the returned list when iterating over it, for example:\n\t\t */\n\t\tsynchronized (safeList) {\n\t\t Iterator<Object> it = safeList.iterator();\n\t\t while (it.hasNext()) {\n\t\t System.out.println(it.next());\n\t\t }\n\t\t}\n\t}", "public int forEachByte(int index, int length, ByteProcessor processor)\r\n/* 667: */ {\r\n/* 668:676 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 669:677 */ return super.forEachByte(index, length, processor);\r\n/* 670: */ }", "public void manualCount(ArrayList<Sheet> Sheets){\n \r\n for (int i = 0; i<Sheets.size();i++){\r\n Sheet sheet = Sheets.get(i);\r\n for(int j =0 ;j<sheet.Patterns.size();j++){\r\n checkPatterns(sheet.Patterns.get(j));\r\n }\r\n /*\r\n if(i%5000 == 0){\r\n System.out.println(i+\":\"+(System.currentTimeMillis()-startTimeParallel));\r\n }\r\n */\r\n }\r\n }", "@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }", "@Override\n\tpublic void run() {\n\t\tresult =\n\t\t\tStream.iterate(new int[]{0, 1}, s -> new int[]{s[1], s[0] + s[1]})\n\t\t\t\t.limit(limit)\n\t\t\t\t.map(n -> n[0])\n\t\t\t\t.collect(toList());\n\n\t}", "private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tIterator<Integer> iterator = list.iterator();\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tint i = iterator.next();\n\t\t\t\t\tSystem.out.println(\"Thread-0遍历: \" + i);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(10);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public static void calculateSumViaStreams(List<Integer> numbers){\n int sum = numbers.stream()\n .filter(x -> x % 2 == 0)\n .map(y -> y * y)\n .reduce(0, (x, y) -> x + y);\n\n System.out.println(sum);\n }", "@Benchmark\r\n\tpublic void withoutStream(Blackhole bh) {\r\n\t\tList<Double> result = new ArrayList<Double>(DATA_FOR_TESTING.size() / 2 + 1);\r\n\t\tfor (Integer i : DATA_FOR_TESTING) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tresult.add(Math.sqrt(i));\r\n\t\t\t\tbh.consume(i);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static public void callForeachRDD (org.apache.spark.streaming.api.java.JavaDStream<byte[]> jdstream, org.apache.spark.streaming.api.python.PythonTransformFunction pfunc) { throw new RuntimeException(); }", "private void m10266b(List<C2411a> list) {\n int i;\n int i2;\n List arrayList = new ArrayList();\n ArrayList arrayList2 = new ArrayList();\n arrayList.addAll(list);\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(0.0d));\n for (i = 0; i < 5; i++) {\n C2411a c2411a = (C2411a) arrayList.remove(0);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n }\n int size = arrayList.size();\n i = 5;\n while (i > 0) {\n i2 = size - 1;\n c2411a = (C2411a) arrayList.remove(size - i);\n this.f8987o.add(Double.valueOf(c2411a.m12234j()));\n arrayList2.add(Double.valueOf(c2411a.m12233i() / 1000.0d));\n i--;\n size = i2;\n }\n int size2 = arrayList.size();\n int i3 = size2 / 387;\n int i4 = 0;\n int i5 = 6;\n while (i4 < 387) {\n i2 = i4 * i3;\n if (i2 >= size2) {\n double j = ((C2411a) arrayList.get(size2 - 1)).m12234j();\n if (j > this.f8976d.getMaxVelocity()) {\n j = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(j));\n arrayList2.add(i5, Double.valueOf(((C2411a) arrayList.get(size2 - 1)).m12233i() / 1000.0d));\n size = i5 + 1;\n } else {\n c2411a = (C2411a) arrayList.get(i2);\n i = (i4 + 1) * i3;\n if (i >= size2) {\n i = size2 - 1;\n }\n C2411a c2411a2 = (C2411a) arrayList.get(i);\n long h = (c2411a2.m12232h() / 1000) - (c2411a.m12232h() / 1000);\n double d;\n if (h <= 0) {\n double d2 = 0.0d;\n while (i2 < (i4 + 1) * i3) {\n d2 += ((C2411a) arrayList.get(i2)).m12234j();\n i2++;\n }\n d = d2 / ((double) i3);\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n } else {\n d = ((c2411a2.m12233i() - c2411a.m12233i()) / ((double) h)) * 3.6d;\n if (d > this.f8976d.getMaxVelocity()) {\n d = this.f8976d.getMaxVelocity();\n }\n this.f8987o.add(i5, Double.valueOf(d));\n }\n arrayList2.add(i5, Double.valueOf(c2411a.m12233i() / 1000.0d));\n size = i5 + 1;\n }\n i4++;\n i5 = size;\n }\n this.f8987o.add(Double.valueOf(0.0d));\n arrayList2.add(Double.valueOf(this.f8976d.getTotalDistance()));\n i2 = this.f8987o.size();\n i = 1;\n while (i < i2) {\n if (this.f8978f >= ((Double) arrayList2.get(i - 1)).doubleValue() && this.f8978f < ((Double) arrayList2.get(i)).doubleValue()) {\n this.f8987o.add(i, Double.valueOf(this.f8976d.getMaxVelocity()));\n arrayList2.add(i, Double.valueOf(this.f8978f));\n break;\n }\n i++;\n }\n this.f8993u = this.f8987o.size();\n }", "private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "public List<V> transformList(List<E> list) {\n \tList<V> result = new ArrayList<>(list.size());\n if (list != null) {\n for (E entity : list) {\n result.add(getCachedVO(entity));\n }\n }\n \treturn result;\n }", "public void forEach(Consumer<K,V> consumer) {\n for (int lock = 0; lock < lockCount; lock++){\n synchronized(locks[lock]){\n for (int bucket=lock; bucket<buckets.length; bucket+=lockCount) {\n ItemNode<K,V> node = buckets[bucket];\n while (node != null) {\n consumer.accept(node.k, node.v);\n node = node.next;\n }\n }\n }\n }\n }", "public int forEachByte(ByteProcessor processor)\r\n/* 661: */ {\r\n/* 662:670 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 663:671 */ return super.forEachByte(processor);\r\n/* 664: */ }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "static /* synthetic */ Iterable m6171a(List list) {\n $jacocoInit()[107] = true;\n return list;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "@Override\n public void consume(Stream<T> items) {\n final Set<byte[]> hashes =\n new TreeSet<>(\n (left, right) -> {\n for (int i = 0, j = 0; i < left.length && j < right.length; i++, j++) {\n var a = (left[i] & 0xff);\n var b = (right[j] & 0xff);\n if (a != b) {\n return a - b;\n }\n }\n return left.length - right.length;\n });\n final var output = SftpServer.MAPPER.createArrayNode();\n items.forEach(\n item -> {\n final var outputNode = output.addObject();\n for (final var writer : writers) {\n writer.accept(item, outputNode);\n }\n try {\n hashes.add(\n MessageDigest.getInstance(\"SHA1\")\n .digest(SftpServer.MAPPER.writeValueAsBytes(outputNode)));\n } catch (NoSuchAlgorithmException | JsonProcessingException e) {\n throw new RuntimeException(e);\n }\n });\n\n // Now, we can take a hash of the sorted hashes and be confident that if the data is the same,\n // the has will be the same even if the data was supplied in a different order\n try {\n final var digest = MessageDigest.getInstance(\"SHA1\");\n for (final var hash : hashes) {\n digest.update(hash);\n }\n final var totalHash = Utils.bytesToHex(digest.digest());\n if (totalHash.equals(lastHash)) {\n return;\n }\n if (server.get().refill(name, command + \" \" + totalHash, output)) {\n lastHash = totalHash;\n }\n\n } catch (NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n }", "void iterate(FnIntFloatToVoid function);", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void backPressureFix() {\n\t\tFlowable.range(1, 1000000)\n\t\t//below map will run in sequential\n\t\t//since sequential it has to complete whole task then only it can allow consumer to start\n\t\t\t.map(item -> {\n\t\t\t\tSystem.out.println(\"Produced item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t\treturn item;\n\t\t\t})\n\t\t\t.observeOn(Schedulers.io())\n\t\t\t//.subscribeOn(Schedulers.io())//with this whole pipelein runs in seprate thread paralleley\n\t\t\t//below will run in concurrent\n\t\t\t.subscribe(item ->{\n\t\t\t\t//mimcing slowness\n\t\t\t\tThreadUtil.sleep(300);\n\t\t\t\tSystem.out.println(\"Consumed item \"+item +\" using thread \"+Thread.currentThread().getName());\n\t\t\t})\n\t\t\t\n\t\t\t;\n\t\t\n\t\t//since running in async we need to sleep\n\t\tThreadUtil.sleep(10000000);\n\t\t\t\n\t}", "private void applyFilters() {\n Task task = new Task() {\n @Override\n public Object call() {\n long start = System.currentTimeMillis();\n System.out.println(\"Applying filters! \" + filterList.size());\n filteredRowItemList = fullCustomerRowItemList;\n for (CustomerListFilter eachFilter : filterList) {\n eachFilter.setCustomerList(filteredRowItemList);\n filteredRowItemList = eachFilter.run();\n }\n System.out.println(\"Filtering took : \" + (System.currentTimeMillis() - start) + \" ms\");\n searchResultsTable.setItems(filteredRowItemList);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n return null;\n }\n };\n task.run();\n }", "@Test\n public void test17() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1337,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test17\");\n LinkedHashSet<Object> linkedHashSet0 = new LinkedHashSet<Object>();\n ResettableIterator<Object> resettableIterator0 = IteratorUtils.loopingIterator((Collection<?>) linkedHashSet0);\n assertEquals(false, resettableIterator0.hasNext());\n }", "protected static int m34121a(int i, long j, List<C22441c> list) {\n C22441c c22441c;\n AppMethodBeat.m2504i(114774);\n Object obj = 1;\n while (i < sJS.size()) {\n try {\n Object obj2;\n c22441c = (C22441c) sJS.get(i);\n if (obj == null || c22441c.endTime <= j) {\n list.add(c22441c);\n obj2 = obj;\n } else {\n C22441c c22441c2 = new C22441c();\n c22441c2.sJY = c22441c.sJY;\n c22441c2.startTime = j;\n c22441c2.endTime = c22441c.endTime;\n list.add(c22441c2);\n obj2 = null;\n }\n i++;\n obj = obj2;\n } catch (Exception e) {\n AppMethodBeat.m2505o(114774);\n return -1;\n }\n }\n if (list.size() == 0) {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = j;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n } else {\n c22441c = new C22441c();\n c22441c.sJY = sJQ;\n c22441c.startTime = sJP.startTime;\n c22441c.endTime = System.currentTimeMillis();\n list.add(c22441c);\n }\n int size = sJS.size();\n AppMethodBeat.m2505o(114774);\n return size;\n }", "public void forEachExample(){\n createPeople()\n .stream()\n .forEach(print);\n }", "public synchronized void processAll()\r\n {\r\n if (!myItems.isEmpty())\r\n {\r\n myProcessor.accept(New.list(myItems));\r\n myItems.clear();\r\n }\r\n }", "public final List<l> apply(List<j> list) {\n kotlin.jvm.internal.h.e(list, \"it\");\n boolean a = this.dlr.a(this.dls, list);\n Iterable<j> iterable = list;\n Collection arrayList = new ArrayList(n.e(iterable, 10));\n for (j jVar : iterable) {\n kotlin.jvm.internal.h.d(jVar, \"it\");\n arrayList.add(new l(jVar, a ^ 1));\n }\n return (List) arrayList;\n }", "private void baseAlgorithm() {\n\t\tlong start = System.nanoTime();\n\t\tinitCentroids();\n\t\tint counter = 0;\n\t\twhile (counter < 1000\n\t\t\t\t&& (lastCentroids == null || !SeriesComparator.equalClustering(lastCentroids, centroids))) {\n\t\t\tresetClusters();\n\t\t\tassignPoints();\n\t\t\tlastCentroids = new ArrayList<Point2D>(centroids);\n\t\t\tcalculateNewMean();\n\t\t\tbasicIterations++;\n\t\t\tcounter++;\n\t\t}\n\t\tconvertToClustering();\n\t\tbasicRuntime = System.nanoTime() - start;\n\t}", "protected final void forEachActiveStream(Http2FrameStreamVisitor streamVisitor) throws Http2Exception {\n/* 83 */ this.frameCodec.forEachActiveStream(streamVisitor);\n/* */ }", "public void collector(ArrayList<ACell> cells) {\r\n for (ACell c : cells) {\r\n c.collector(this);\r\n }\r\n }", "public void streamIterate(){\n Stream.iterate(new int[]{0, 1},t -> new int[]{t[1], t[0]+t[1]})\n .limit(20)\n .forEach(t -> System.out.println(\"(\" + t[0] + \",\" + t[1] +\")\"));\n /*\n In Java 9, the iterate method was enhanced with support for a predicate.\n For example, you can generate numbers starting at 0 but stop the iteration once the number is greater than 100:\n * */\n IntStream.iterate(0, n -> n < 100, n -> n + 4)\n .forEach(System.out::println);\n }", "private void m14048a(List<ScanResult> list, SQLiteDatabase sQLiteDatabase) {\n Throwable th;\n System.currentTimeMillis();\n this.f18056e = false;\n if (list != null && list.size() != 0 && sQLiteDatabase != null && list != null) {\n double d = 0.0d;\n double d2 = 0.0d;\n int i = 0;\n Object obj = null;\n double[] dArr = new double[8];\n Object obj2 = null;\n int i2 = 0;\n StringBuffer stringBuffer = new StringBuffer();\n int i3 = 0;\n for (ScanResult scanResult : list) {\n if (i3 > 10) {\n break;\n }\n if (i3 > 0) {\n stringBuffer.append(\",\");\n }\n i3++;\n stringBuffer.append(\"\\\"\").append(Jni.encode2(scanResult.BSSID.replace(Config.TRACE_TODAY_VISIT_SPLIT, \"\"))).append(\"\\\"\");\n }\n Cursor cursor = null;\n Cursor rawQuery;\n try {\n rawQuery = sQLiteDatabase.rawQuery(\"select * from wof where id in (\" + stringBuffer.toString() + \");\", null);\n try {\n if (rawQuery.moveToFirst()) {\n while (!rawQuery.isAfterLast()) {\n double d3 = rawQuery.getDouble(1) - 113.2349d;\n double d4 = rawQuery.getDouble(2) - 432.1238d;\n int i4 = rawQuery.getInt(4);\n int i5 = rawQuery.getInt(5);\n if (i5 <= 8 || i5 <= i4) {\n int i6;\n Object obj3;\n float[] fArr;\n if (!this.f18055d) {\n if (obj == null) {\n int i7;\n if (obj2 != null) {\n int i8 = 0;\n while (i8 < i2) {\n Object obj4;\n double d5;\n double d6;\n fArr = new float[1];\n Location.distanceBetween(d4, d3, dArr[i8 + 1], dArr[i8], fArr);\n if (fArr[0] < 1000.0f) {\n obj4 = 1;\n d5 = d + dArr[i8];\n d6 = dArr[i8 + 1] + d2;\n i5 = i + 1;\n } else {\n obj4 = obj;\n i5 = i;\n d6 = d2;\n d5 = d;\n }\n i8 += 2;\n d2 = d6;\n d = d5;\n obj = obj4;\n i = i5;\n }\n if (obj == null) {\n if (i2 >= 8) {\n break;\n }\n i4 = i2 + 1;\n dArr[i2] = d3;\n i7 = i4 + 1;\n dArr[i4] = d4;\n i6 = i7;\n obj3 = obj2;\n } else {\n d += d3;\n d2 += d4;\n i++;\n i6 = i2;\n obj3 = obj2;\n }\n } else {\n i4 = i2 + 1;\n dArr[i2] = d3;\n i7 = i4 + 1;\n dArr[i4] = d4;\n i3 = 1;\n i6 = i7;\n }\n } else {\n fArr = new float[1];\n Location.distanceBetween(d4, d3, d2 / ((double) i), d / ((double) i), fArr);\n if (fArr[0] > 1000.0f) {\n rawQuery.moveToNext();\n } else {\n i6 = i2;\n obj3 = obj2;\n }\n }\n } else {\n fArr = new float[1];\n Location.distanceBetween(d4, d3, this.f18059h, this.f18058g, fArr);\n if (((double) fArr[0]) > this.f18057f + 2000.0d) {\n rawQuery.moveToNext();\n } else {\n obj = 1;\n d += d3;\n d2 += d4;\n i++;\n i6 = i2;\n obj3 = obj2;\n }\n }\n if (i > 4) {\n break;\n }\n rawQuery.moveToNext();\n i2 = i6;\n obj2 = obj3;\n } else {\n rawQuery.moveToNext();\n }\n }\n if (i > 0) {\n this.f18056e = true;\n this.f18060i = d / ((double) i);\n this.f18061j = d2 / ((double) i);\n }\n }\n if (rawQuery != null) {\n try {\n rawQuery.close();\n } catch (Exception e) {\n }\n }\n } catch (Exception e2) {\n cursor = rawQuery;\n } catch (Throwable th2) {\n th = th2;\n }\n } catch (Exception e3) {\n if (cursor != null) {\n try {\n cursor.close();\n } catch (Exception e4) {\n }\n }\n } catch (Throwable th3) {\n rawQuery = null;\n th = th3;\n if (rawQuery != null) {\n try {\n rawQuery.close();\n } catch (Exception e5) {\n }\n }\n throw th;\n }\n }\n }", "@Test\n public void test10() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1330,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test10\");\n HashMap<String, StringTokenizer>[] hashMapArray0 = (HashMap<String, StringTokenizer>[]) Array.newInstance(HashMap.class, 3);\n ObjectArrayListIterator<HashMap<String, StringTokenizer>> objectArrayListIterator0 = new ObjectArrayListIterator<HashMap<String, StringTokenizer>>(hashMapArray0, 0, 0);\n Iterator<HashMap<String, StringTokenizer>> iterator0 = IteratorUtils.unmodifiableIterator((Iterator<HashMap<String, StringTokenizer>>) objectArrayListIterator0);\n assertEquals(false, iterator0.hasNext());\n }", "public void testExecuteInParallel_Collection() throws Exception\n {\n System.out.println( \"executeInParallel\" );\n Collection<Callable<Double>> tasks = createTasks( 10 );\n Collection<Double> result = ParallelUtil.executeInParallel( tasks );\n assertEquals( result.size(), tasks.size() );\n }", "public void forEach(Consumer<GeometricalObject> action);", "@Ignore\r\n @Test\r\n public void speedTest() throws InterruptedException {\n for (int i = 0; i < 10; i++) {\r\n singleSpeedTest();\r\n }\r\n }", "public List<MapBean> setGameServerData(List serverIds, String service, MapBean request) {\n/* 114 */ if (serverIds.isEmpty()) return List$.MODULE$.empty(); \n/* 115 */ long id = System.currentTimeMillis();\n/* 116 */ (new scala.Tuple2[4])[0] = Predef$ArrowAssoc$.MODULE$.$minus$greater$extension(Predef$.MODULE$.ArrowAssoc(\"id\"), BoxesRunTime.boxToLong(id)); (new scala.Tuple2[4])[1] = Predef$ArrowAssoc$.MODULE$.$minus$greater$extension(Predef$.MODULE$.ArrowAssoc(\"sign\"), SignUtils$.MODULE$.makeSign(id)); (new scala.Tuple2[4])[2] = Predef$ArrowAssoc$.MODULE$.$minus$greater$extension(Predef$.MODULE$.ArrowAssoc(\"service\"), service); (new scala.Tuple2[4])[3] = Predef$ArrowAssoc$.MODULE$.$minus$greater$extension(Predef$.MODULE$.ArrowAssoc(\"data\"), request); MapBean params = MapBean$.MODULE$.apply((Seq)Predef$.MODULE$.wrapRefArray((Object[])new scala.Tuple2[4]));\n/* */ \n/* 118 */ ObjectRef fs = ObjectRef.create(List$.MODULE$.empty());\n/* 119 */ serverIds.foreach((Function1)new AbstractController$$anonfun$setGameServerData$1(this, params, fs));\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 146 */ return (List<MapBean>)((List)fs.elem).map((Function1)new AbstractController$$anonfun$setGameServerData$2(this), List$.MODULE$.canBuildFrom()); }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tfor(int i = 0; i < 1000; i++) {\r\n\t\t\t\t\tfinal BasicDBObject doc = new BasicDBObject(\"_id\", i);\r\n\t\t\t\t\tdoc.put(\"ts\", new Date());\r\n\t\t\t\t\tcoll.insert(doc);\r\n\t\t\t\t}\r\n\t\t\t}", "public void forEach(Consumer<T> consumer) {\n collected.forEach(consumer);\n }", "private void streamWithSimpleForEach() {\n List<String> myList = Arrays.asList(\"a1\", \"a2\", \"b1\", \"c2\", \"c1\");\n\n myList.stream()\n .filter(s -> s.startsWith(\"c\")).map(String::toUpperCase)\n .sorted()\n .forEach(System.out::println);\n }", "public /* synthetic */ void m109038a(List list, int i) {\n mo67233a(ImageViewerFragment.m80019a((ArrayList) StreamSupport.m150134a(list).mo131127a($$Lambda$FeedMomentsQAViewHolder$goL0hrr3W6gS6WdbV8nSzby50A.INSTANCE).mo131125a(Collectors.m150203a($$Lambda$ofunvu1bqmYbfXGEtxXaV_csE4M.INSTANCE)), i));\n }", "private static void demoPerformance(int aNumIterations){\n\t\tStopWatch stopwatch = new StopWatch();\n\t\tint[] numbers = {1,2,3,4,5,6,7,8,9,10};\n\n\t\tstopwatch.start();\n\t\tcopyUsingClone(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using clone: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingArraycopy(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using System.arraycopy: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingArraysCopyOf(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using Arrays.copyOf: \" + stopwatch);\n\n\t\tstopwatch.reset();\n\t\tstopwatch.start();\n\t\tcopyUsingForLoop(numbers, aNumIterations);\n\t\tstopwatch.stop();\n\t\tlog(\"Using for loop: \" + stopwatch);\n\t}", "public int sumListeForEach(ArrayList<Integer> list) {\r\n int resultat = 0;\r\n for (int tal : list) {\r\n resultat = resultat + tal;\r\n }\r\n return resultat;\r\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tdefault EagerFutureStream<Collection<U>> batchByTime(long time, TimeUnit unit) {\n\t\n\t\tint size = this.getLastActive().list().size();\n\t\tList[] list = {new ArrayList<U>()};\n\t\tint[] count = {0};\n\t\tSimpleTimer[] timer = {new SimpleTimer()};\n\t\treturn (EagerFutureStream)this.map(next-> { \n\t\t\t\tsynchronized(timer){\n\t\t\t\t\tcount[0]++;\n\t\t\t\t\tif(unit.toNanos(time)-timer[0].getElapsedNanoseconds()>0){\n\t\t\t\t\t\t\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t\tList<U> result = list[0];\n\t\t\t\t\t\tlist[0] = new ArrayList<U>();\n\t\t\t\t\t\t timer[0] = new SimpleTimer();\n\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\tif(count[0]==size){\n\t\t\t\t\t\tlist[0].add(next);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<U> result = list[0];\n\t\t\t\t\t\tlist[0] = new ArrayList<U>();\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t\treturn new ArrayList();\n\t\t\t\t}\n\t\t\t}\t).filter(l->l.size()>0);\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tlong start=System.currentTimeMillis();\r\n\t\t\t\tHashSetAdd hsd=new HashSetAdd();\r\n\t\t\t\tHashSet<String> hs1=hsd.add();\r\n\t\t\t\tSystem.out.println(\"size1=:\"+hs1.size());\r\n\t\t\t\tfor(String result:hs1){\r\n\t\t\t\t\tresult.toString();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlong end=System.currentTimeMillis();\r\n\t\t\t\tSystem.out.println(\"time1=: \"+(end-start));\r\n\t\t\t}", "public void forEach(Consumer<K,V> consumer) {\n ItemNode<K,V> b;\n for (int lock = 0; lock < lockCount; lock++){\n for (int bucket=lock; bucket<buckets.length; bucket+=lockCount) {\n if (sizes.get(lock) != 0){\n b = buckets[bucket];\n while (b != null) {\n consumer.accept(b.k, b.v);\n b = b.next;\n }\n }\n }\n }\n }", "private static Stream<?> all(Iterator<Object> i) {\n requireNonNull(i);\n final Iterable<Object> it = () -> i;\n return StreamSupport.stream(it.spliterator(), false);\n }", "public static void main(String... args){\n\n long millisecsStart = System.currentTimeMillis();\n\n LongStream.range(0, 50).forEach(i -> {\n System.out.println( i + \" -> \" + calc(i));\n });\n\n long millisecsEnd = System.currentTimeMillis();\n\n System.out.println(\"Total Time Millis = \" + (millisecsEnd - millisecsStart));\n }", "public void testConsumer ()\n {\n\n List<String> list = new ArrayList<>();\n list.add(\"ccc\");\n list.add(\"bbb\");\n list.add(\"ddd\");\n list.add(\"DDDD\");\n list.add(\"ccc\");\n list.add(\"aaa\");\n list.add(\"eee\");\n\n// Collections.sort(list);\n// Collections.sort(list, (s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.sort((s, s2) -> s.compareTo(s2));\n// list.sort((s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.forEach(s -> System.out.println(s));\n// list.forEach(s -> System.out.println(s));\n\n\n// Predicate<String> predicate2 = s -> s.length()>3;\n// System.out.println(\"predicate2.test(\\\"DDDD\\\") = \" + predicate2.test(\"DDDD\"));\n\n// Stream<String> stringStream = list.stream();\n// stringStream.forEach(s -> System.out.println(s));\n// stringStream.forEach(s -> System.out.println(s));//会报错\n\n// list.stream().forEach(s -> System.out.println(s));\n// list.stream().forEach(s -> System.out.println(s));\n\n //并行流是无序的\n// list.parallelStream().forEach(s -> System.out.println(s));\n// list.parallelStream().forEach(s -> System.out.println(s));\n\n// list.stream().skip(3).forEach(s -> System.out.println(s));\n// list.stream().distinct().forEach(s -> System.out.println(s));\n// System.out.println(\"list.stream().count() = \" + list.stream().count());\n// list.stream().limit(2).forEach(s -> System.out.println(s));\n\n// list.stream().filter(s -> s.length()<4).forEach(s -> System.out.println(s));\n\n// BiFunction<Integer, String, Person> bf = Person::new;\n// BiFunction<Integer, String, Person> bf = (n, s) -> new Person(s);\n\n// Person aaa = bf.apply();\n\n// System.out.println(\"aaa = \" + bf.apply(0, \"aaa\"));\n \n }", "public final void mo102897a() {\n ArrayList arrayList = this.mObservers;\n C32569u.m150513a((Object) arrayList, C6969H.m41409d(\"G64ACD709BA22BD2CF41D\"));\n int size = arrayList.size();\n while (true) {\n size--;\n if (size >= 0) {\n ((AbstractC23316c) this.mObservers.get(size)).mo102899a();\n } else {\n return;\n }\n }\n }", "private static void printCloudletList(List<Cloudlet> list) {\n\t\tint size = list.size();\n\t\tCloudlet cloudlet;\n List<Double> CPUtime = new ArrayList<Double>();\n List <Double> cputime = new ArrayList<Double>();\n List <Double> start_time = new ArrayList<Double>();\n List<Double> starttime = new ArrayList<Double>();\n List<Double> endtime = new ArrayList<Double>();\n\t\tString indent = \" \";\n\t\tLog.printLine();\n\t\tLog.printLine(\"========== OUTPUT ==========\");\n\t\tDecimalFormat dft = new DecimalFormat(\"###.##\");\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tcloudlet = list.get(i);\n\t\t if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){\n\t\t\t\tcputime.add(cloudlet.getActualCPUTime());\n\t\t\t\tstart_time.add(cloudlet.getExecStartTime());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tcloudlet = list.get(i);\n\t\t\tif (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){\n\t\t if(!CPUtime.contains(cloudlet.getActualCPUTime())) {\n\t\t \t CPUtime.add(cloudlet.getActualCPUTime());\n\t\t \t }\n\t\t if(!starttime.contains(cloudlet.getExecStartTime())) {\n\t\t \t starttime.add(cloudlet.getExecStartTime());\n\t\t \t}\n\t\t if(!endtime.contains(cloudlet.getFinishTime())) {\n\t\t \t endtime.add(cloudlet.getFinishTime());\n\t\t \t }\n\t\t\t}\n\t\t}\n\t\t\n int n=0;\n\t\tfor (int i=0; i< CPUtime.size();i++) {\n\t\t\t\n n= Collections.frequency(cputime,CPUtime.get(i));\n Log.printLine(dft.format(n)+\" \"+\"Cloudlets finish in \"+ dft.format(CPUtime.get(i))+\"s\" );\n\t\t}\n\t\tLog.printLine();\n\t\tfor (int i=0; i< starttime.size();i++) {\n\t\t\t n= Collections.frequency(start_time,starttime.get(i));\n\t\t\t Log.printLine(dft.format(n)+\" \"+\"Cloudlets executes in time \"+ dft.format(starttime.get(i))+\"~\" + dft.format(endtime.get(i))+\"s\");\n\t\t }\n\t}", "@Override\r\n\tpublic void iterateCount() {\n\t\t\r\n\t}", "@Override\n public void addIterationListener(LoopIterationListener lis) {\n iterationListeners.addFirst(lis);\n }", "@Test\n public void forEachTest() {\n Object[] resultActual = new Object[] {this.work1, this.work2, this.work3, this.work4};\n Object[] resultExpected = new Object[4];\n int index = 0;\n for (String work : this.queue) {\n resultExpected[index++] = work;\n }\n assertThat(resultActual, is(resultExpected));\n }", "public void run( ) {\n long sum = 0;\n for (int i = 0; i < 1000; i++) {\n sum += i;\n }\n System.out.println(sum);\n }", "public void callLazystream()\n {\n\n Stream<String> stream = list.stream().filter(element -> {\n wasCalled();\n System.out.println(\"counter in intermediate operations:\" + counter);\n return element.contains(\"2\");\n });\n\n System.out.println(\"counter in intermediate operations:\" + counter);\n }", "public boolean forEach(I2ForEach<T> func)\n\t{\n\t\tfor (T e : this)\n\t\t{\n\t\t\tif (!func.ForEach(e))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static void containerListNotSafe() {\n List<String> list = new CopyOnWriteArrayList<>();\n // 开启了20个线程\n for (int i = 1; i <= 30; i++) {\n new Thread(() -> {\n list.add(UUID.randomUUID().toString().substring(0,8));\n System.out.println(Thread.currentThread().getName()+list);\n }, String.valueOf(i)).start();\n }\n\n // java.util.ConcurrentModificationException 并发修改异常\n //1.故障现象\n //\tjava.util.ConcurrentModificationException 并发修改异常\n //2.导致原因\n //\n //3.解决方案\n //\t3.1 new Vector<>();\n //\t3.2 Collections.synchronizedList(new ArrayList<>());\n //\t3.3 new CopyOnWriteArrayList<>();\n //4.优化方案\n //\n\n // 写时复制\n // CopyOnWrite,容器即写时复制的容器.往一个容器添加元素的时候,不直接往当前容器Object[]添加,而是先将当前容器Object[]进行copy,复制出\n // 一个新的容器,Object[] newElements,然后新的容器Object[] newElements里面添加元素,添加完元素之后,\n // 再将原容器的引用指向新的容器 setArray(newElements);这样做的好处是可以对CopyOnWrite容器进行并发的读,而不需要加锁,\n // 因为当前容器不会添加任何元素.所以CopyOnWrite容器也是一种读写分离的思想,\n\n // /**\n // * Appends the specified element to the end of this list.\n // *\n // * @param e element to be appended to this list\n // * @return {@code true} (as specified by {@link Collection#add})\n // */\n // public boolean add(E e) {\n // final ReentrantLock lock = this.lock;\n // lock.lock();\n // try {\n // Object[] elements = getArray();\n // int len = elements.length;\n // Object[] newElements = Arrays.copyOf(elements, len + 1);\n // newElements[len] = e;\n // setArray(newElements);\n // return true;\n // } finally {\n // lock.unlock();\n // }\n // }\n\n\n }", "public static List<TweetWithSentiment> checkTweetListAgainstWordlistParallel(List<TweetWithSentiment> tweetList, String[] wordList) {\n\n // List of Tweets to be returned to caller\n List<TweetWithSentiment> problematicTweets = new ArrayList<>();\n\n // Loop through each tweet in the passed list of tweets\n // Parallelization of forEach loop\n tweetList.parallelStream().forEach(tweet -> {\n\n // Initialise boolean to check whether a tweet is contained in list\n boolean alreadyContainedInList = false;\n\n // Loop through prohibited words list, if any tweets contain prohibited word, increment count\n for (String problematicWord : wordList) {\n if (RegexToAWordInTweet.regexToAWordInTweet(problematicWord, tweet.tweetText)) {\n\n // check if we have saved any problem tweets, if not just add tweet to the list\n if (problematicTweets.size() > 0) {\n\n // loop through problem tweets, check if tweet id is already present,\n // if it is, then dont add it again\n for (TweetWithSentiment checkTweet : problematicTweets) {\n\n // Gets each tweet in the problematic tweets list,\n // used for checking if tweet is already in list\n // Check whether the current tweets id is\n // already in the problematic tweet list,\n // if it is then flag is set to true, if not it will remain false\n if (tweet.id.equals(checkTweet.id)) {\n alreadyContainedInList = true;\n break;\n }\n }\n\n // if the tweet isn't already in the list ,add it\n if (!alreadyContainedInList) {\n problematicTweets.add(tweet);\n }\n\n // after checking if it's in list, reset flag for next comparison\n alreadyContainedInList = false;\n\n // If we haven't saved any tweets yet, just save it\n } else {\n problematicTweets.add(tweet);\n }\n }\n }\n });\n\n // Sort list & return sorted list to method caller\n problematicTweets.sort(Comparator.comparing(TweetWithSentiment::getId).reversed());\n return problematicTweets;\n }", "private <T extends C9360c> void m15511a(List<T> list) {\n if (list != null && mo9140c() != null) {\n int i = 0;\n int i2 = 0;\n for (T t : list) {\n if (t.f25644a == this.f13394b.getOwner().getId()) {\n i = t.f25645b;\n } else if (t.f25644a == this.f13396d.f11667e) {\n i2 = t.f25645b;\n }\n }\n if (!((Integer) this.f13396d.get(\"data_pk_anchor_score\", Integer.valueOf(0))).equals(Integer.valueOf(i))) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_anchor_score\", Integer.valueOf(i));\n }\n if (!((Integer) this.f13396d.get(\"data_pk_guest_score\", Integer.valueOf(0))).equals(Integer.valueOf(i2))) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_guest_score\", Integer.valueOf(i2));\n }\n }\n }", "static void m11180a(List<Component<?>> list) {\n Set<C3246b> c = m11182c(list);\n Set<C3246b> b = m11181b(c);\n int i = 0;\n while (!b.isEmpty()) {\n C3246b next = b.iterator().next();\n b.remove(next);\n i++;\n for (C3246b next2 : next.mo20820d()) {\n next2.mo20823g(next);\n if (next2.mo20822f()) {\n b.add(next2);\n }\n }\n }\n if (i != list.size()) {\n ArrayList arrayList = new ArrayList();\n for (C3246b next3 : c) {\n if (!next3.mo20822f() && !next3.mo20821e()) {\n arrayList.add(next3.mo20819c());\n }\n }\n throw new DependencyCycleException(arrayList);\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(1);\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tlist.add(7);\n\t\t\n\t\tIterator<Integer> it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()) {\n\t\t\tint element = it.next();\n\t\t\tSystem.out.println(\"element \"+element);\n\t\t\tif(element == 1) {\n\t\t\t\tit.remove();\n\t\t\t\tit.next();\n\t\t\t\tit.remove();\n\t\t\t\t//it.forEachRemaining(Filter::add);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(\"list \"+list);\n\t\t\n\t\t//forEach\n\t//\tlist.forEach(System.out::println);\n\t\t//list.forEach(Filter::filter);\n\t//\tlist.forEach(new Filter());\n\t}", "@FunctionalInterface\npublic interface Act<E> {\n\n void forEach(E pill,ITree ctx,ILime consumer);\n\n}" ]
[ "0.6395078", "0.6233454", "0.61180055", "0.5879164", "0.58349377", "0.58230823", "0.5674038", "0.54666257", "0.54340214", "0.5361127", "0.5333676", "0.53004205", "0.52964497", "0.5210187", "0.5202249", "0.5180822", "0.51435655", "0.5097016", "0.50830203", "0.5079108", "0.5050584", "0.5042741", "0.50247604", "0.501965", "0.49940267", "0.49791652", "0.49720246", "0.49609044", "0.49565008", "0.49453378", "0.49403447", "0.49332908", "0.49292675", "0.492056", "0.4911775", "0.49084198", "0.49061745", "0.48955536", "0.48856062", "0.48779446", "0.4877061", "0.4873055", "0.48497215", "0.4822495", "0.48168236", "0.4815106", "0.48062137", "0.48013338", "0.4785808", "0.47717", "0.4768625", "0.4761133", "0.47571388", "0.47534126", "0.4752662", "0.4752181", "0.4752181", "0.47521532", "0.47321317", "0.47267482", "0.47261935", "0.47243136", "0.47228733", "0.47198367", "0.47185388", "0.47089583", "0.47026592", "0.4700884", "0.47002986", "0.46959794", "0.46927443", "0.4688838", "0.46850005", "0.46849158", "0.46839452", "0.46836668", "0.46750146", "0.46718448", "0.46712723", "0.46596926", "0.46478724", "0.46435404", "0.46387377", "0.46329308", "0.4630367", "0.46190006", "0.46186262", "0.46169037", "0.46073568", "0.4605456", "0.46050462", "0.4601719", "0.46013096", "0.45995098", "0.45993334", "0.45988122", "0.4596906", "0.45852005", "0.45845744", "0.45830718" ]
0.5617458
7
Sets the background music volume based on adjuster's location
public static void setVolume(Music backgroundMusic) { backgroundMusic.setVolume((Assets.musicAdjusterBounds.x - 410) / 250); if ((Assets.musicAdjusterBounds.x - 410) / 250 < 0) { backgroundMusic.setVolume(0); Assets.musicAdjusterBounds.x = 410; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateVolume(){\r\n if(currentLoop0) backgroundMusicLoop0.gainControl.setValue(Window.musicVolume);\r\n else backgroundMusicLoop1.gainControl.setValue(Window.musicVolume);\r\n }", "public abstract SoundPlayer setVolume(int volume);", "void setVolume(float volume);", "public void volumeAdjust(double delta)\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n musicPlayer.setVolume(musicPlayer.getVolume() + delta);\n Log.add(\"[MUSIC]\\tVolume adjusted by: \" + delta);\n }", "public void setVolume(double volume)\n {\n mediaPlayer.setVolume(volume);\n }", "public static void setMasterVolume(float masterVolume){\r\n\t\tif(masterVolume <= 1.0f && masterVolume >= 0.0f){\r\n\t\t\tSound.masterVolume = masterVolume;\r\n\t\t}else if(masterVolume < 0.0f){\r\n\t\t\tSound.masterVolume = 0.0f;\r\n\t\t}else{\r\n\t\t\tSound.masterVolume = 1.0f;\r\n\t\t}\r\n\t\tSound.masterVolumeStorage = Sound.masterVolume;\r\n\t}", "public void updateVolume() {\n\t\tMixer.Info[] mixerInfos = AudioSystem.getMixerInfo();\n\n\t\tfor (Mixer.Info mixerInfo : mixerInfos) {\n\t\t\tMixer mixer = AudioSystem.getMixer(mixerInfo);\n\t\t\tLine.Info[] lineInfos = mixer.getTargetLineInfo();\n\n\t\t\tfor (Line.Info lineInfo : lineInfos) {\n\t\t\t\ttry {\n\t\t\t\t\tLine line = mixer.getLine(lineInfo);\n\t\t\t\t\tline.open();\n\t\t\t\t\tif (line.isControlSupported(FloatControl.Type.VOLUME)) {\n\t\t\t\t\t\tFloatControl volumeControl = (FloatControl) line.getControl(FloatControl.Type.VOLUME);\n\t\t\t\t\t\tvolumeControl.setValue((float) volume);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setVolume(float volume) {\n\t alSourcef(musicSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(reverseSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(flangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(distortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(distortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahDistortSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(wahDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t alSourcef(revWahDistortFlangeSourceIndex, AL_GAIN, volume / 100.0f);\n\t}", "public void adjustVolume(double volume) {\n try {\n controller.setGain(volume);\n this.volume = volume;\n } catch (BasicPlayerException e) {\n e.printStackTrace();\n }\n }", "public void setVolume(float volume) {\n mediaPlayer.setVolume(volume, volume);\n }", "public void adjustVolume(int direction) {\n Message msg = mHandler.obtainMessage(MESSAGE_ADJUST_VOLUME, direction, 0);\n mHandler.sendMessage(msg);\n }", "public static void adjustVolume() {\n\t\tfor (BufferedSound sound : sounds.values()) {\n\t\t\tif(sound != null) {\n\t\t\t\tsound.adjustVolume();\n\t\t\t}\n\t\t}\n\t}", "public void setSoundVolume(float soundVolume) {\n _soundVolume = soundVolume;\n }", "@Override\r\n\tpublic void setVolume(float volume) {\n\t\t\r\n\t}", "public void setVolume(int volume);", "public void setVolume(float value){\n\t\tgainControl.setValue(value);\n\t}", "void Init(int sfxVolume, int musicVolume);", "protected float getSoundVolume()\n\t{\n\t\treturn 1F;\n\t}", "public void setVolume(float volume) {\n }", "public void setVolume(int level);", "public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected float getSoundVolume()\n {\n return 0.4F;\n }", "private void musicClicked() {\n MatchScreen.setMusicVolume(MatchScreen.getMusicVolume() == 0 ? 0.5f : 0);\n setSoundButtonColor(MatchScreen.getMusicVolume() == 0, music);\n }", "public void setVolume(double value) {\n this.volume = value;\n }", "void volume(double volume) {\n execute(\"player.volume = \" + volume);\n }", "public void start() {\n this.pause = false;\n super.setVolume(this.currentVolumeValue, this.currentVolumeValue);\n super.start();\n if(PlayerEngineImpl.this.isFadeVolume) {\n this.handler.removeCallbacks(this.volumeRunnable);\n this.currentVolumeValue = Math.max(0.0F, this.currentVolumeValue);\n this.handler.post(this.volumeRunnable);\n } else {\n super.setVolume(1.0F, 1.0F);\n }\n }", "@Override\n\t\t\tpublic void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n\t\t\t\tmediaPlayer.setVolume(arg1, arg1);\n\t\t\t}", "@Override\r\n public void _updateSource(MixerSource source) {\n Vec3d sourcePosition = source.getAudioNode() == null ? playerPosition : source.getAudioNode().getGlobalCoordinates();\r\n Vec3d relativepos = Vec3d.substraction(sourcePosition, playerPosition);\r\n\r\n //Calculate and set the new volume\r\n source.setVolume(getVolumeFromDistance(relativepos.length(), source.getCurrentAudio().getBaseVolume()));\r\n }", "void setValueMixerSound(int value);", "void setupSounds() {\n soundSwitch = new Switch(Switch.CHILD_NONE);\n soundSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up the sound media container\n java.net.URL soundURL = null;\n String soundFile = \"res/sounds/Get_up_on_your_feet_mixdown2.wav\";\n try {\n soundURL = new java.net.URL(codeBaseString + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n if (soundURL == null) { // application, try file URL\n try {\n soundURL = new java.net.URL(\"file:./\" + soundFile);\n } catch (java.net.MalformedURLException ex) {\n System.out.println(ex.getMessage());\n System.exit(1);\n }\n }\n //System.out.println(\"soundURL = \" + soundURL);\n MediaContainer soundMC = new MediaContainer(soundURL);\n\n // set up the Background Sound\n soundBackground = new BackgroundSound();\n soundBackground.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundBackground.setSoundData(soundMC);\n soundBackground.setSchedulingBounds(infiniteBounds);\n soundBackground.setEnable(false);\n soundBackground.setLoop(Sound.INFINITE_LOOPS);\n soundSwitch.addChild(soundBackground);\n\n // set up the point sound\n soundPoint = new PointSound();\n soundPoint.setCapability(Sound.ALLOW_ENABLE_WRITE);\n soundPoint.setSoundData(soundMC);\n soundPoint.setSchedulingBounds(infiniteBounds);\n soundPoint.setEnable(false);\n soundPoint.setLoop(Sound.INFINITE_LOOPS);\n soundPoint.setPosition(-5.0f, 5.0f, 0.0f);\n Point2f[] distGain = new Point2f[2];\n // set the attenuation to linearly decrease volume from max at\n // source to 0 at a distance of 15m\n distGain[0] = new Point2f(0.0f, 1.0f);\n distGain[1] = new Point2f(15.0f, 0.0f);\n soundPoint.setDistanceGain(distGain);\n soundSwitch.addChild(soundPoint);\n\n // Create the chooser GUI\n String[] soundNames = { \"None\", \"Background\", \"Point\", };\n\n soundChooser = new IntChooser(\"Sound:\", soundNames);\n soundChooser.addIntListener(new IntListener() {\n public void intChanged(IntEvent event) {\n int value = event.getValue();\n // Should just be able to use setWhichChild on\n // soundSwitch, have to explictly enable/disable due to\n // bug.\n switch (value) {\n case 0:\n soundSwitch.setWhichChild(Switch.CHILD_NONE);\n soundBackground.setEnable(false);\n soundPoint.setEnable(false);\n break;\n case 1:\n soundSwitch.setWhichChild(0);\n soundBackground.setEnable(true);\n soundPoint.setEnable(false);\n break;\n case 2:\n soundSwitch.setWhichChild(1);\n soundBackground.setEnable(false);\n soundPoint.setEnable(true);\n break;\n }\n }\n });\n soundChooser.setValue(Switch.CHILD_NONE);\n\n }", "@Override\n public void setAudioVolumeInsideVolumeSeekBar(int i) {\n float currentVolume = 1.0f;\n if (i < PlayerConstants.MaxProgress) {\n currentVolume = (float)(1.0f - (Math.log(PlayerConstants.MaxProgress - i) / Math.log(PlayerConstants.MaxProgress)));\n }\n setAudioVolume(currentVolume);\n //\n }", "public void play() {\n if (audio != null) {\n audio.play(sfxVolume);\n }\n }", "public Volume()\n {\n setImage(\"volumeOn.png\");\n GreenfootImage volumeOn = getImage();\n volumeOn.scale(70,70);\n setImage(volumeOn);\n soundtrack.playLoop();\n }", "@FXML protected void VolumeButtonClicked(ActionEvent event) {\n if (music.getShouldPlaySFX()){\r\n MusicPlayer music2 = new MusicPlayer();\r\n music2.playSFX(MusicPlayer.Track.adjustSound);\r\n }\r\n\r\n music.setShouldPlay(!music.getShouldPlay());\r\n }", "@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\tfloat set = (float) progress/100;\n\t\t\t\tLog.v(\"set\", set+\"\");\n\t\t\t\tmMediaPlayer[0].setVolume(set,set);\n\t\t\t}", "public void increseVolume() {\n\t\tvolume++;\n\t\tSystem.out.println(\"MobilePhone当前音量为:\"+volume);\n\t}", "public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void setVolume(StarObjectClass self,float leftVolume, float rightVolume){ \r\n \t\tStarCLEMediaPlayer mediaplayer = (StarCLEMediaPlayer)WrapAndroidClass.GetAndroidObject(self,\"AndroidObject\");\r\n \t\tif( mediaplayer == null )\r\n \t\t\treturn;\r\n \t\tmediaplayer.setVolume(leftVolume,rightVolume);\r\n \t}", "public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }", "@Override\n public void onVolumeChanged(int volume) {\n int mMicNum = 8;\n int[] mMic = new int[]{R.drawable.recog001, R.drawable.recog002,\n R.drawable.recog003, R.drawable.recog004,\n R.drawable.recog005, R.drawable.recog006,\n R.drawable.recog007, R.drawable.recog008};\n\n int index = volume;\n if (index < 0)\n index = 0;\n if (index >= mMicNum)\n index = mMicNum - 1;\n if (mCompleteBtn != null && mRecoState == 1)\n mCompleteBtn.setBackgroundResource(mMic[index]);\n }", "public void StartSoundAtVolume(ISoundOrigin origin, int sound_id, int volume);", "@SuppressWarnings(\"unchecked\")\n\tpublic void setEffectsVolume(float volume){\n\t\tvolume = volume / 100;\n\t\tif (volume < 0){\n\t\t\tvolume = 0;\n\t\t}\t\n\t\tif (volume > 1){\n\t\t\tvolume = 1;\n\t\t}\n\t\t\n\t\tthis.mLeftVolume = this.mRightVolume = volume;\n\t\t\n\t\t// change the volume of playing sounds\n\t\tIterator<?> iter = this.mSoundIdStreamIdMap.entrySet().iterator();\n\t\twhile (iter.hasNext()){\n\t\t\tMap.Entry<Integer, Integer> entry = (Map.Entry<Integer, Integer>)iter.next();\n\t\t\tthis.mSoundPool.setVolume(entry.getValue(), mLeftVolume, mRightVolume);\n\t\t}\n\t}", "@Override\n \tpublic void onSetVolume(double arg0) {\n \t}", "public void adjustVolume(MediaDevice device, int volume) {\n ThreadUtils.postOnBackgroundThread(() -> {\n device.requestSetVolume(volume);\n });\n }", "public void setVolume(float volume) {\r\n\t\tthis.volume = volume;\r\n\t}", "public void setVolume(double volume)\n {\n if (this.mediaPlayer == null)\n {\n return;\n }\n\n this.mediaPlayer.setVolume(volume);\n }", "public float getSoundVolume() {\n return _soundVolume;\n }", "public void increaseVolume()\r\n {\r\n volume++;\r\n }", "public void increaseVolume() {\r\n\t\tvolume++;\r\n\t}", "public void playWinSounds(){\r\n try {\r\n File mFile = new File(Filepath3);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput4 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip4 = AudioSystem.getClip();\r\n clip4.open(audioInput4);\r\n FloatControl gainControl4 = (FloatControl) clip4.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl4.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip4.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "@Override\n\tprotected float getSoundVolume() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}", "public static void setSoundEffectsVolume(final double sfxVolume) {\n if (sfxVolume >= 0 && sfxVolume <= 1) {\n SoundEffect.sfxVolume = sfxVolume;\n }\n }", "@Override\n\tpublic void volume() {\n\t\tsolido.volume = (solido.areaBase * altura) / 3;\n\t}", "public void setVolume(int v) {\n volume = v;\n }", "public void setVolume(int volume) {\n mBundle.putInt(KEY_VOLUME, volume);\n }", "@Override\n public void onResume() {\n super.onResume();\n MusicManager.start(this, prefs.getBoolean(\"bgMusic\", true));\n }", "void setFluidContents(int volume);", "public void play(MediaPlayer choice) {\n if (choice == background) {\n if (!background2.isPlaying() && levelCtrl.level >= levelChange) {\n background2.setVolume(volume, volume);\n background2.start();\n }\n else if (!background.isPlaying()) {\n background.setVolume(volume, volume);\n background.start();\n }\n }\n else if (!choice.isPlaying()) {\n choice.setVolume(volume, volume);\n choice.start();\n }\n }", "public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }", "@Override\r\n\tpublic void setMusic() {\r\n\t\tmanager.getMusicManager().setMusic((Music) Gdx.audio.newMusic(Gdx.files.internal(\"Music/Bandit Camp.mp3\")));\r\n\t}", "@Override\r\n public void show() {\r\n // makes sure the controller is ready for new inputs\r\n controller.reset();\r\n // tell the game to take input data via our controller\r\n Gdx.input.setInputProcessor(controller);\r\n // update the preferences\r\n parent.updateActivePreferences();\r\n // set the volume to our new preference\r\n bgMusic.setVolume(musicVol);\r\n bgMusic.play();\r\n }", "@Override\r\n public void _updateSource(MixerSource source) {\n Vec3d sourcePosition = source.getAudioNode() == null ? playerPosition : source.getAudioNode().getGlobalCoordinates();\r\n Vec3d relativepos = playerOrientation.inverseRotate(Vec3d.substraction(sourcePosition, playerPosition));\r\n\r\n double distance = relativepos.length();\r\n\r\n //Calculate the new volume\r\n double volume = getVolumeFromDistance(distance, source.getCurrentAudio().getBaseVolume());\r\n if (relativepos.x() == 0) {\r\n source.setVolume(volume);\r\n } else {\r\n if (relativepos.x() > 0) { // the source is at the right of the mixer\r\n source.setRightVolume(volume);\r\n source.setLeftVolume(volume * (1 + relativepos.x() / distance));\r\n } else {\r\n if (relativepos.x() < 0) { // the source is at the left of the mixer\r\n source.setRightVolume(volume * (1 - relativepos.x() / distance));\r\n source.setLeftVolume(volume);\r\n }\r\n }\r\n }\r\n }", "public void changeVolume(double volume){\n\t\tsynth.changeVolume(volume);\n\t}", "public Builder setVolume(int value) {\n bitField0_ |= 0x00000008;\n volume_ = value;\n onChanged();\n return this;\n }", "public void init() {\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"MasterVolume\")) {\n MasterVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"MasterVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"MasterVolume\", MasterVolume);\n }\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"MusicVolume\")) {\n MusicVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"MusicVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"MusicVolume\", MusicVolume);\n }\n\n if (Gdx.app.getPreferences(\"properties\").contains(\"SoundVolume\")) {\n SoundVolume = Gdx.app.getPreferences(\"properties\").getFloat(\"SoundVolume\");\n } else {\n Gdx.app.getPreferences(\"properties\").putFloat(\"SoundVolume\", SoundVolume);\n }\n\n Gdx.app.getPreferences(\"properties\").flush();\n\n Click = Gdx.audio.newSound(Gdx.files.internal(\"Music/Sound/menu-clik.wav\"));\n\n }", "@Override\r\n\t\tpublic void dmr_setVolume(int volume) throws RemoteException {\n\t\t\tint flag = 4097;\r\n\t\t\tmAmanager.setStreamVolume(AudioManager.STREAM_MUSIC, volume,\r\n\t\t\t\t\tflag);\r\n\t\t\tUtils.printLog(TAG, \"soundManager.setVolume\" + volume);\r\n\t\t}", "public void mp3(View view) {\n mp1 = MediaPlayer.create(this, R.raw.heyjude);\n mp1.setLooping(false);\n mp1.setVolume(100, 100);\n mp1.start();\n }", "@Test\n public void setVolume() {\n final int volume = 16;\n\n getApplicationHandler().setVolume(volume, true);\n\n assertTrue(getApplicationHandler().getVolume() == volume);\n expandPanel();\n onView(withId(R.id.vli_seek_bar)).check(matches(withProgress(volume)));\n onView(withId(R.id.vli_volume_text)).check(matches(withText(String.valueOf(volume))));\n }", "public void playLaneSounds(){\r\n try {\r\n File mFile = new File(Filepath5);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput6 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip6 = AudioSystem.getClip();\r\n clip6.open(audioInput6);\r\n FloatControl gainControl6 = (FloatControl) clip6.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl6.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip6.start();\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tAudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE);\n\t\tfloat actualVolume = (float) audioManager\n\t\t\t\t.getStreamVolume(AudioManager.STREAM_MUSIC);\n\t\tfloat maxVolume = (float) audioManager\n\t\t\t\t.getStreamMaxVolume(AudioManager.STREAM_MUSIC);\n\t\tfloat volume = actualVolume / maxVolume;\n\t\t\n\t\tLog.e(\"Test\", \"isloaded: \" + loaded);\n\t\tif (loaded && (sound == R.id.radioButton_on) && fromAlarm) {\n\t\t\tsoundPool.play(soundID, volume, volume, 1, 0, 1f);\n\t\t\tLog.e(\"Test\", \"Played sound\");\n\t\t}\n\t}", "public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}", "public boolean setPropertyVolume(long aValue);", "public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }", "public void start() {\n ToneControl control = null;\n try {\n myPlayer = Manager.createPlayer(Manager.TONE_DEVICE_LOCATOR);\n // do the preliminary set-up:\n myPlayer.realize();\n // set a listener to listen for the end of the tune:\n myPlayer.addPlayerListener(this);\n // get the ToneControl object in order to set the tune data:\n control = (ToneControl) myPlayer.getControl(\"ToneControl\");\n control.setSequence(myTune);\n // set the volume to the highest possible volume:\n VolumeControl vc = (VolumeControl) myPlayer\n .getControl(\"VolumeControl\");\n vc.setLevel(100);\n } catch (Exception e) {\n // the music isn't necessary, so we ignore exceptions.\n }\n }", "public static int getMusicVolume()\n\t{\n\t\treturn musicVolume;\n\t}", "private void setUpSound() {\n\t\tAssetManager am = getActivity().getAssets();\n\t\t// activity only stuff\n\t\tgetActivity().setVolumeControlStream(AudioManager.STREAM_MUSIC);\n\n\t\tAudioManager audioManager = (AudioManager) getActivity().getSystemService(Context.AUDIO_SERVICE);\n\t\tsp = new SPPlayer(am, audioManager);\n\t}", "public SoundEffect adjust(float volume, float pitch) {\n \t\treturn new SoundEffect(this, volume, pitch);\n \t}", "void setAudioSliderPosition(double audio_position){\n audioSliderPosition.setValue(audio_position);\n }", "private void setAudioProfilModem() {\n int ringerMode = mAudioManager.getRingerModeInternal();\n ContentResolver mResolver = mContext.getContentResolver();\n Vibrator vibrator = (Vibrator) mContext\n .getSystemService(Context.VIBRATOR_SERVICE);\n boolean hasVibrator = vibrator == null ? false : vibrator.hasVibrator();\n if (AudioManager.RINGER_MODE_SILENT == ringerMode) {\n if (hasVibrator) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_VIBRATE);\n /* @} */\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_ON);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_ON);\n } else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n /* @} */\n }\n } else if (AudioManager.RINGER_MODE_VIBRATE == ringerMode) {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 1);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_OUTDOOR);\n /* @} */\n }else if (AudioManager.RINGER_MODE_OUTDOOR == ringerMode) {//add by wanglei for outdoor mode\n Settings.System.putInt(mResolver,Settings.System.SOUND_EFFECTS_ENABLED, 1);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_NORMAL);\n }else {\n Settings.System.putInt(mResolver,\n Settings.System.SOUND_EFFECTS_ENABLED, 0);\n /* SPRD: fixbug454214 The status bar scene mode button is not synchronized with the button set up the scene mode. @{ */\n //mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n mAudioManager.setRingerModeInternal(AudioManager.RINGER_MODE_SILENT);\n /* @} */\n if (hasVibrator) {\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_RINGER,\n AudioManager.VIBRATE_SETTING_OFF);\n mAudioManager.setVibrateSetting(\n AudioManager.VIBRATE_TYPE_NOTIFICATION,\n AudioManager.VIBRATE_SETTING_OFF);\n }\n }\n }", "public static void updateMusic()\r\n\t{\r\n\t\tif ( Settings.isMusicOn() && !musicPlaying() )\r\n\t\t\tstartMusic();\r\n\t\telse if ( !Settings.isMusicOn() && musicPlaying() )\r\n\t\t\tstopMusic();\r\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tMainMusic.setVolume(0,0);\n\t\t\n\t}", "public static void playSound(Context context) {\n mAudioManager = (AudioManager) context.getSystemService(AUDIO_SERVICE);\n assert mAudioManager != null;\n originalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n Log.d(TAG, \"originalVolume: \"+ originalVolume);\n mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC), 0);\n mAudioManager.setMode(AudioManager.STREAM_MUSIC);\n mAudioManager.setSpeakerphoneOn(true);\n\n if (mp != null) {\n mp.stop();\n }\n\n mp = MediaPlayer.create(context, R.raw.ringingsound);\n mp.setLooping(true);\n mp.start();\n\n }", "public void playDonkeySounds(){\r\n try {\r\n File mFile = new File(Filepath2);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput3 = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip3 = AudioSystem.getClip();\r\n clip3.open(audioInput3);\r\n FloatControl gainControl3 = (FloatControl) clip3.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl3.setValue(-10.0f); //reduces the volume by 10 decibels\r\n clip3.start();\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void backgroundMusic(String path) {\n if (Objects.equals(playingFile, path)) return;\n playingFile = path;\n\n\n // stop if playing\n stop();\n\n if (path == null) {\n // nothing to play\n playingClip = null;\n return;\n }\n\n try {\n\n // find file\n final AudioInputStream stream = AudioSystem.getAudioInputStream(new File(path));\n\n // create player\n playingClip = AudioSystem.getClip();\n playingClip.open(stream);\n playingClip.loop(playingClip.LOOP_CONTINUOUSLY);\n\n // play\n playingClip.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void mute() {\n\t\tif (isMute) {\n\t\t\tplaybin.setVolume(0);\n\t\t\tisMute = false;\n\t\t} else {\n\t\t\tplaybin.setVolume(volume);\n\t\t\tisMute = true;\n\t\t}\n\t}", "public void toggle() {\n if (volume == 1f) {\n volume = 0f;\n }\n else if (volume == 0f) {\n volume = 1f;\n }\n\n }", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "private void normalizeVolume(Context c, float startVolume) {\n final AudioManager audio =\n (AudioManager) c.getSystemService(Context.AUDIO_SERVICE);\n systemNotificationVolume =\n audio.getStreamVolume(AudioManager.STREAM_ALARM);\n audio.setStreamVolume(AudioManager.STREAM_ALARM,\n audio.getStreamMaxVolume(AudioManager.STREAM_ALARM), 0);\n setVolume(startVolume);\n }", "private void playHintAudio() {\n AudioManager audioManager = (AudioManager)getContext().getSystemService(Context.AUDIO_SERVICE);\n int mode = audioManager.getRingerMode();\n Log.d(TAG,\"mode = \" + mode);\n\n if(mode != AudioManager.RINGER_MODE_SILENT && mode != AudioManager.RINGER_MODE_VIBRATE) {\n // prize modify for bug 44603 by zhaojian 20171205 start\n mMediaPlayer = MediaPlayer.create(getContext(),R.raw.hb_sound2);\n Log.d(\"debug\",\"isNotifySound = \" + getConfig().isNotifySound());\n if(getConfig().isNotifySound()) {\n mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n @Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n }\n });\n mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n mp.release();\n }\n });\n mMediaPlayer.start();\n }\n // prize modify for bug 44603 by zhaojian 20171205 end\n }\n }", "public boolean getBackgroundMusic(){\n return backgroundMusicOn;\n }", "public void setVolume(int v) {\n\t\tif (On) {\n\t\t\tif (v < 0 || v > 5) {\n\t\t\t\tSystem.out.println(\"New volume not within range!\");\n\t\t\t} else {\n\t\t\t\tVolume = v;\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Radio off ==> No adjustment possible\");\n\n\t\t}\n\t}", "private void soundClicked() {\n Sounds.setVolume(Sounds.getVolume() == 0 ? 1 : 0);\n setSoundButtonColor(Sounds.getVolume() == 0, sound);\n }", "void onAudioLevel(float level);", "public void activateVolume(boolean on){\n\n\t\tif(prevPitch != cow.getPitch()) {\n\t\t\tcow.setIsPlaying(on);\n\n\t\t\t//if(sequencer.isRunning()) {\n\t\t\t\tcow.stopNote(synthesizer);\n\t\t\t//-}\n\n\t\t\tif (cow.getIsPlaying()) {\n\t\t\t\tsynthesizer = cow.playNote();\n\t\t\t}\n\n\t\t\tprevPitch = cow.getPitch();\n\t\t}\n\t\t\n\t}", "public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}", "public void stopBackgroundMusic()\n {\n background.stop();\n }", "private void equalizeSound() {\n// set up the spinner\n ArrayList<String> equalizerPresetNames = new ArrayList<String>();\n ArrayAdapter<String> equalizerPresetSpinnerAdapter\n = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item,\n equalizerPresetNames);\n equalizerPresetSpinnerAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n Spinner equalizerPresetSpinner = (Spinner) findViewById(R.id.spinner);\n\n// get list of the device's equalizer presets\n for (short i = 0; i < mEqualizer.getNumberOfPresets(); i++) {\n equalizerPresetNames.add(mEqualizer.getPresetName(i));\n }\n\n equalizerPresetSpinner.setAdapter(equalizerPresetSpinnerAdapter);\n\n// handle the spinner item selections\n equalizerPresetSpinner.setOnItemSelectedListener(new AdapterView\n .OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent,\n View view, int position, long id) {\n //first list item selected by default and sets the preset accordingly\n mEqualizer.usePreset((short) position);\n// get the number of frequency bands for this equalizer engine\n short numberFrequencyBands = mEqualizer.getNumberOfBands();\n// get the lower gain setting for this equalizer band\n final short lowerEqualizerBandLevel = mEqualizer.getBandLevelRange()[0];\n\n// set seekBar indicators according to selected preset\n for (short i = 0; i < numberFrequencyBands; i++) {\n short equalizerBandIndex = i;\n SeekBar seekBar = (SeekBar) findViewById(equalizerBandIndex);\n// get current gain setting for this equalizer band\n// set the progress indicator of this seekBar to indicate the current gain value\n seekBar.setProgress(mEqualizer\n .getBandLevel(equalizerBandIndex) - lowerEqualizerBandLevel);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n// not used\n }\n });\n }", "public static void enableSound() {\n\t\tvelocity = 127;\n\t}", "public void playThemeSound() {\n\t\tAudioPlayer audio = AudioPlayer.getInstance();\n\t\taudio.playSound(MUSIC_FOLDER, THEME);\n\t}", "public void ChangeMusic(int musicnum, boolean looping);" ]
[ "0.786049", "0.67252934", "0.6685018", "0.6549507", "0.65189517", "0.649389", "0.64634067", "0.63867205", "0.6371925", "0.6358745", "0.63450325", "0.63227046", "0.6309211", "0.6265157", "0.62088764", "0.61879194", "0.61874896", "0.6182841", "0.61747676", "0.6162091", "0.6154404", "0.6147183", "0.61233026", "0.61100036", "0.61042804", "0.60806036", "0.607747", "0.6054399", "0.6039385", "0.6020249", "0.6014043", "0.5998736", "0.599129", "0.59653723", "0.5962488", "0.5952309", "0.59350127", "0.5932067", "0.592872", "0.5920828", "0.5908264", "0.5906652", "0.5898414", "0.58967644", "0.5890505", "0.5887651", "0.586567", "0.5852465", "0.58345807", "0.5831777", "0.5824964", "0.5823115", "0.58156866", "0.5806952", "0.5802519", "0.58018106", "0.5787904", "0.5775119", "0.57743347", "0.5771428", "0.5769376", "0.57691216", "0.57685053", "0.57586545", "0.5758242", "0.5757123", "0.57535046", "0.5748965", "0.5731586", "0.57175356", "0.57169515", "0.5716008", "0.57058245", "0.56870496", "0.5686009", "0.56833607", "0.5681612", "0.5665182", "0.56558985", "0.56517494", "0.56341094", "0.562005", "0.5618444", "0.5616906", "0.5616103", "0.5607497", "0.5606712", "0.5596304", "0.55954903", "0.55934995", "0.5584924", "0.5576899", "0.5576399", "0.5575666", "0.55738753", "0.5570885", "0.5566546", "0.5566194", "0.55609536", "0.5560286" ]
0.767629
1
TODO Autogenerated method stub
@Override public void undo() { }
{ "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
A list of tasks for progress monitor.
private interface WorkPlan { Stage PREINIT = new Stage(Messages.LaunchInitializationProcedure_UPDATE_DEBUGGER_STATE, 0.1f); Stage SET_OPTIONS = new Stage(Messages.LaunchInitializationProcedure_SET_OPTIONS, 1f); Stage LOAD_SCRIPTS = new Stage(Messages.LaunchInitializationProcedure_LOAD_SCRIPTS, 1f); Stage SYNCHRONIZE_BREAKPOINTS = new Stage(Messages.LaunchInitializationProcedure_SYNCHRONIZE_BREAKPOINTS, 1f); boolean IS_INITIZALIZED = ProgressUtil.layoutProgressPlan(PREINIT, SET_OPTIONS, LOAD_SCRIPTS, SYNCHRONIZE_BREAKPOINTS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }", "java.util.List<java.lang.Integer> getProgressList();", "java.util.List<java.lang.Integer> getProgressList();", "java.util.List<java.lang.Integer> getProgressList();", "public static void printTasks(){\n int totalTime = 0;\n int totalWait = 0;\n for(Task t : taskList){\n\n if(t.isAborted){\n System.out.println(\"TASK \" + t.taskNumber + \" aborted\" );\n }else{\n System.out.println(\"TASK \" + t.taskNumber + \" \" + t.terminateTime + \" \" + t.waitingCount + \" %\" + 100 * ((float)t.waitingCount / t.terminateTime));\n totalTime += t.terminateTime;\n totalWait += t.waitingCount;\n }\n }\n System.out.println(\"TOTAL\" + \" \" + totalTime + \" \" + totalWait + \" %\" + 100 *((float)totalWait / totalTime));\n\n }", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public String[] getTaskList() {\n String[] tasks = {\"export\"};\n\n return tasks;\n }", "public void listTasks() {\n try {\n File file = new File(filePath);\n Scanner sc = new Scanner(file);\n Ui.viewTasks();\n while (sc.hasNextLine()) {\n System.out.println(sc.nextLine());\n }\n } catch (FileNotFoundException e) {\n Ui.printFileNotFound();\n }\n }", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "public List<File> getTasks() {\n return tasks;\n }", "public ArrayList<Task> listNotStarted() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 0) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "private static Task[] createTaskList() {\n\t\t\n\t Task evalTask = new EvaluationTask();\n\t Task tamperTask = new TamperTask();\n\t Task newDocTask = new NewDocumentTask();\n\t Task reportTask = new AssignmentReportTask();\n\n\t Task[] taskList = {evalTask, tamperTask, newDocTask, reportTask};\n\n\t return taskList;\n\t}", "public void printTasks() {\n int i = 0;\n for (Task task : tasks) {\n StringBuilder message = new StringBuilder()\n .append(\"Task \").append(i++).append(\": \").append(task);\n\n for (Task blocker : task.firstToFinish) {\n message.append(\"\\n depends on completed task: \").append(blocker);\n }\n\n for (Task blocker : task.firstToSuccessfullyFinish) {\n message.append(\"\\n depends on successful task: \").append(blocker);\n }\n\n stdout.println(message.toString());\n }\n }", "public List<Task> listTasks(String extra);", "TaskList getList();", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "List<Task> getAllTasks();", "public ArrayList<Task> listConcluded() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 100) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }", "public int getTasks() {\r\n return tasks;\r\n }", "public List<TaskDescription> getActiveTasks();", "public ArrayList<Task> getList() {\n return tasks;\n }", "public List<Task> getTasks() {\n return this.tasks;\n }", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "public ArrayList<Task> getTasks() {\n return tasks;\n }", "public ArrayList<Task> allTasks() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Worker) {\n tasks.add(((Worker) role).getTask());\n } else if (role instanceof Supervisor) {\n tasks.add(((Worker) role).getTask());\n }\n }\n return tasks;\n }", "public ArrayList<Task> getTaskList() {\n\t\treturn tasks;\n\t}", "TaskList() {\r\n tasks = new ArrayList<>();\r\n }", "TaskList(List<Task> tasks) {\n this.tasks = tasks;\n }", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "public synchronized List<MonitoredTask> getTasks()\n {\n purgeExpiredTasks();\n ArrayList<MonitoredTask> ret = Lists.newArrayListWithCapacity(tasks.size());\n for (@SuppressWarnings(\"unchecked\") Iterator<TaskAndWeakRefPair> it = tasks.iterator(); it.hasNext(); )\n {\n TaskAndWeakRefPair pair = it.next();\n MonitoredTask t = pair.get();\n ret.add(t.clone());\n }\n return ret;\n }", "public <T> List<T> massExec(Callable<? extends T> task);", "public List<String> getRunningESBTaskList() throws Exception {\n return ntaskManager.getRunningTaskList();\n }", "@Override\r\n\tpublic List<GridTask<LinPackResult>> split() {\r\n\t\tList<GridTask<LinPackResult>> list = new ArrayList<GridTask<LinPackResult>>();\r\n\t\tfor (int i=0; i < tasks; i++) {\r\n\t\t\tlist.add(new LinPackTask(cycles));\r\n\t\t}\r\n\t\t\r\n\t\tsw = new StopWatch();\r\n\t\t\r\n\t\tsw.start();\r\n\t\t\r\n\t\treturn list;\r\n\t}", "@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }", "private void sendTasks(ArrayList<Task> list) {\n output.println(list.size());\n for (Task t : list) {\n output.println(t.getDateString() + \" \" + t.getName());\n }\n }", "public List<PendingClusterTask> pendingTasks() {\n final var currentTimeMillis = threadPool.relativeTimeInMillis();\n return allBatchesStream().flatMap(e -> e.getPending(currentTimeMillis)).toList();\n }", "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 Task[] getTasks()\n {\n return tasks.toArray(new Task[tasks.size()]);\n }", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public TaskList() {\n tasks = new ArrayList<>();\n }", "public static void listTasks(ArrayList<Task> taskList) {\r\n StringBuilder sb = new StringBuilder();\r\n int i = 1;\r\n sb.append(\"Here are the tasks in your list:\\n\");\r\n for (Task task : taskList) {\r\n sb.append(i++ + \".\" + task.toString() + \"\\n\");\r\n }\r\n CmdUx.printHBars(sb.toString());\r\n }", "public TaskList(ArrayList<Task> tasks) {\n this.tasks = tasks;\n }", "public TaskList(ArrayList<Task> tasks) {\n this.tasks = tasks;\n }", "public ArrayList<Task> getVisibleTasks() {\n ArrayList<Task> visibleTasks = new ArrayList<>();\n forAllTasks(new Consumer(visibleTasks) {\n /* class com.android.server.wm.$$Lambda$DisplayContent$TaskStackContainers$rQnI0Y8R9ptQ09cGHwbCHDiG2FY */\n private final /* synthetic */ ArrayList f$0;\n\n {\n this.f$0 = r1;\n }\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.TaskStackContainers.lambda$getVisibleTasks$0(this.f$0, (Task) obj);\n }\n });\n return visibleTasks;\n }", "public String getTasks() {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n\n return result.toString();\n }", "ObservableList<Task> getTaskList();", "int activeTasks();", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return progress_;\n }", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return progress_;\n }", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return progress_;\n }", "@Override\n\tpublic Collection<TaskStatus> getTaskStatus(){\n \tcheckInitialized();\n \t\n \t@SuppressWarnings(\"unchecked\")\n\t\tCollection<Collection<TaskStatus>> statusTree=Collections.EMPTY_LIST;\n \tfinal MultiTask<Collection<TaskStatus>> mtask;\n \ttry {\n\t\t\t mtask = breeder.executeCallable(new GetTaskStatus(this));\n\t\t\t statusTree = mtask.get();\n \t} catch (ExecutionException ex){\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t} catch(InterruptedException ex) {\n \t\tlog.fatal(\"Could not get status of tasks for job \"+this.getId(), ex);\n \t}\n\t\t\t\n\t\t// Flatten into single collection\n\t\tList<TaskStatus> result = new ArrayList<TaskStatus>((int)(statusTree.size()*this.getThreadCount()));\n\t\tfor(Collection<TaskStatus> statusForNode: statusTree) {\n\t\t\tresult.addAll(statusForNode);\n\t\t}\n\t\t\n\t\treturn result;\n \n\t}", "private void doViewAllCompletedTasks() {\n ArrayList<Task> t1 = todoList.getListOfCompletedTasks();\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 completed tasks available.\");\n }\n }", "void addDoneTasks(List<Task> task);", "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 }", "void doWork(AbstractTaskList list);", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\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}", "private TaskBaseBean[] getAllTasksCreatedByUser100() {\n TaskBaseBean[] tasks = TaskServiceClient.findTasks(\n projObjKey,\n AppConstants.TASK_BIA_CREATED_BY,\n \"100\"\n );\n return tasks;\n }", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return java.util.Collections.unmodifiableList(progress_);\n }", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return java.util.Collections.unmodifiableList(progress_);\n }", "public java.util.List<java.lang.Integer>\n getProgressList() {\n return java.util.Collections.unmodifiableList(progress_);\n }", "void submitAndWaitForAll(Iterable<Runnable> tasks);", "private static ProgressMonitor getProgressMonitor(final TaskMonitor aTM)\n{\n return new ProgressMonitor() {\n public void update(int arg0) { aTM.updateTask(arg0); }\n public void start(int arg0) { aTM.startTasks(arg0); }\n public boolean isCancelled() { return aTM.isCancelled(); }\n public void endTask() { aTM.endTask(); }\n public void beginTask(String arg0, int arg1) { aTM.beginTask(arg0, arg1); }\n };\n}", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "@GetMapping(value = \"/getAllTasks\")\n\tpublic List<Task> getAllTasks()\n\t{\n\t\treturn this.integrationClient.getAllTasks();\n\t}", "public void processTasks (List tasks) {\n if (!allNecessaryAssetsReported()) { // if need subordinates aren't there yet, way 10 seconds\n getAllAssets ();\n delayedTasks.addAll (tasks);\n\n if (logger.isInfoEnabled()) {\n\tlogger.info (getName() + \" - necessary subords have not reported, so waiting \" + waitTime + \n\t\t \" millis to process \" + delayedTasks.size () + \n\t\t \" tasks.\");\n\treportMissingAssets ();\n }\n\n examineBufferAgainIn (waitTime); // wait 10 seconds and check again\n }\n else { // ok, all subords are here, lets go!\n if (logger.isInfoEnabled()) {\n\tlogger.info (getName() + \" - all necessary subords have reported, so processing \" + tasks.size() + \n\t\t \" tasks.\");\n }\n\n tasks.addAll (delayedTasks);\n delayedTasks.clear();\n super.processTasks (tasks);\n }\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 }", "Set<Task> getAllTasks();", "public void outputTasks ()\n\t{\n\t\toutput (\"\\n> (all-tasks)\\n\");\n\t\tString[] tasks = Task.allTaskClasses();\n\t\tfor (int i=0 ; i<tasks.length ; i++) output (tasks[i]);\n\t}", "LinkedList<double[]> getTasks() {\r\n return tasks;\r\n }", "public int getNumTasks() {\n return tasks.size();\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 TaskList() {\n tasks = new ArrayList<>();\n cachedTasks = new Stack<>();\n }", "public TaskManager() {\n\t\tcompletedTasks = new ArrayList<Tasks>();\n\t}", "public static List<ITask> findWorkedTaskOfSessionUser() {\r\n return findTaskOfSessionUser(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, FINISHED_MODE, null);\r\n }", "public TaskList(List<Task> tl) {\n tasks = tl;\n }", "public List<Task> getTasksClones() {\n return (List<Task>) CloneService.clone(tasks);\n }", "public List<TaskVersion1> getDefaultTasks() {\n return TaskWrapper.convertTasks(projectView.getDefaultTasks());\n }", "@ApiModelProperty(required = true, value = \"List of active tasks generated by the connector\")\n public List<ConnectorTaskId> getTasks() {\n return tasks;\n }", "public void printList()\n {\n tasks.forEach(task -> System.out.println(task.getDetails()));\n }", "public List<InProgress> findAllInProgress() {\n try {\n return jdbcTemplate.query(\"SELECT id, task_details, finish_date,difficulty,priority FROM in_progress\",\n (rs, rowNum) -> new InProgress(rs.getLong(\"id\"), rs.getString(\"task_details\")\n ,rs.getDate(\"finish_date\"), rs.getString(\"difficulty\"),\n rs.getString(\"priority\") ));\n } catch (Exception e) {\n return new ArrayList<InProgress>();\n }\n }", "public ArrayList getTaskListeners(){\n initListener();\n return listeners;\n }", "public ArrayList<Task> getVisibleTasks() {\n return this.mTaskStackContainers.getVisibleTasks();\n }", "public List<TaskVersion1> getDefaultTasks();", "public void setTaskList(List<WTask> list)\n\t{\n\t\tthis.taskList = list;\n\t}", "public void listThreads() {\n\t\tthis.toSlave.println(MasterProcessInterface.LIST_THREADS_COMMAND);\n\t}", "public TaskList(){}", "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 ArrayList<Task> list() {\n return this.list;\n }", "public void sortTasks() {\n tasks.sort(null);\n }" ]
[ "0.6939226", "0.6780892", "0.6780892", "0.6780892", "0.67155355", "0.6709719", "0.66562474", "0.66164505", "0.6535252", "0.64994454", "0.64711195", "0.63999677", "0.6388932", "0.637328", "0.63593", "0.62771535", "0.6253341", "0.62359166", "0.62359166", "0.62359166", "0.622942", "0.62203825", "0.62071544", "0.62071544", "0.6166251", "0.61550355", "0.61477697", "0.6137144", "0.6128103", "0.6119163", "0.6115273", "0.61068374", "0.60962903", "0.60641974", "0.6052651", "0.60497946", "0.60477513", "0.60464567", "0.6043023", "0.6020386", "0.5999542", "0.5985519", "0.5979749", "0.5973454", "0.596637", "0.5959786", "0.5957867", "0.59534097", "0.5930995", "0.5930995", "0.5930995", "0.5925674", "0.5907709", "0.5907709", "0.5895315", "0.58880216", "0.58800113", "0.58730793", "0.58692", "0.58692", "0.58692", "0.58526504", "0.5845022", "0.5831893", "0.5827971", "0.5819122", "0.5815605", "0.578594", "0.5780413", "0.57772505", "0.57772505", "0.57772505", "0.5769898", "0.5757277", "0.5755112", "0.5747766", "0.5738238", "0.5724166", "0.57165873", "0.571618", "0.5712867", "0.5709185", "0.570813", "0.57016915", "0.5700879", "0.56662726", "0.56535304", "0.56451297", "0.56426156", "0.5641067", "0.5640723", "0.5634107", "0.56340075", "0.56274164", "0.56250346", "0.56055576", "0.56039906", "0.560025", "0.55982506", "0.55935967", "0.55883354" ]
0.0
-1
A list of tasks for breakpoint synchronization subprocess.
private interface BreakpointsWorkPlan { Stage ANALYZE = new Stage(null, 1f); Stage REMOTE_CHANGES = new Stage(null, 1f); boolean IS_LAYOUTED = ProgressUtil.layoutProgressPlan(ANALYZE, REMOTE_CHANGES); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "public String[] getTaskList() {\n String[] tasks = {\"export\"};\n\n return tasks;\n }", "@Override\r\n public List getExecutingTask() {\n return null;\r\n }", "public void printTasks() {\n int i = 0;\n for (Task task : tasks) {\n StringBuilder message = new StringBuilder()\n .append(\"Task \").append(i++).append(\": \").append(task);\n\n for (Task blocker : task.firstToFinish) {\n message.append(\"\\n depends on completed task: \").append(blocker);\n }\n\n for (Task blocker : task.firstToSuccessfullyFinish) {\n message.append(\"\\n depends on successful task: \").append(blocker);\n }\n\n stdout.println(message.toString());\n }\n }", "private static Task[] createTaskList() {\n\t\t\n\t Task evalTask = new EvaluationTask();\n\t Task tamperTask = new TamperTask();\n\t Task newDocTask = new NewDocumentTask();\n\t Task reportTask = new AssignmentReportTask();\n\n\t Task[] taskList = {evalTask, tamperTask, newDocTask, reportTask};\n\n\t return taskList;\n\t}", "public void listAllTasks() {\n System.out.println(LINEBAR);\n if (tasks.taskIndex == 0) {\n ui.printNoItemInList();\n System.out.println(LINEBAR);\n return;\n }\n\n int taskNumber = 1;\n for (Task t : tasks.TaskList) {\n System.out.println(taskNumber + \". \" + t);\n taskNumber++;\n }\n System.out.println(LINEBAR);\n }", "public List<Task> getTasksClones() {\n return (List<Task>) CloneService.clone(tasks);\n }", "public static List<Task> findAllRunningTasks() {\r\n List<Task> outTasks = new ArrayList<Task>();\r\n List<ITask> iTasks = findAllTasks(DEFAULT_INDEX, DEFAULT_PAGESIZE, null, SortOrder.ASCENDING, RUNNING_MODE, null);\r\n\r\n for (ITask iTask : iTasks) {\r\n outTasks.add(convertITaskToTask(iTask));\r\n }\r\n return outTasks;\r\n }", "public List<Task> listTasks(String extra);", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "public void generateNewTasks(List<CaptureTask> tasks) {\n\t\t\r\n\t}", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "@Override\r\n\tpublic List<GridTask<LinPackResult>> split() {\r\n\t\tList<GridTask<LinPackResult>> list = new ArrayList<GridTask<LinPackResult>>();\r\n\t\tfor (int i=0; i < tasks; i++) {\r\n\t\t\tlist.add(new LinPackTask(cycles));\r\n\t\t}\r\n\t\t\r\n\t\tsw = new StopWatch();\r\n\t\t\r\n\t\tsw.start();\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public String listOfTasks() {\n String listOfTasks = Messages.LIST_TASKS_MESSAGE;\n for (int i = 0; i < Parser.getOrderAdded(); i++) {\n listOfTasks += recordedTask.get(i).getTaskNum() + DOT_OPEN_SQUARE_BRACKET\n + recordedTask.get(i).getCurrentTaskType() + CLOSE_SQUARE_BRACKET + OPEN_SQUARE_BRACKET\n + recordedTask.get(i).taskStatus() + CLOSE_SQUARE_BRACKET + Messages.BLANK_SPACE\n + recordedTask.get(i).getTaskName()\n + ((i == Parser.getOrderAdded() - 1) ? Messages.EMPTY_STRING : Messages.NEW_LINE);\n }\n return listOfTasks;\n }", "public void listTasks() {\n try {\n File file = new File(filePath);\n Scanner sc = new Scanner(file);\n Ui.viewTasks();\n while (sc.hasNextLine()) {\n System.out.println(sc.nextLine());\n }\n } catch (FileNotFoundException e) {\n Ui.printFileNotFound();\n }\n }", "public List<TaskDescription> getActiveTasks();", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return tasks;\n }", "public List<Task> getTasks() {\n return this.tasks;\n }", "public List<File> getTasks() {\n return tasks;\n }", "public synchronized List<MonitoredTask> getTasks()\n {\n purgeExpiredTasks();\n ArrayList<MonitoredTask> ret = Lists.newArrayListWithCapacity(tasks.size());\n for (@SuppressWarnings(\"unchecked\") Iterator<TaskAndWeakRefPair> it = tasks.iterator(); it.hasNext(); )\n {\n TaskAndWeakRefPair pair = it.next();\n MonitoredTask t = pair.get();\n ret.add(t.clone());\n }\n return ret;\n }", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "public List<ScheduledTask> getAllPendingTasks() {\n \t\tSet<String> smembers = jedisConn.smembers(ALL_TASKS);\n \t\tList<ScheduledTask> alltasks = new ArrayList<>();\n \t\tGson gson = new Gson();\n \t\t// the get actual tasks by the ids\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}", "private void runScheduleTasks() {\r\n // To minimize the time the lock is held, make a copy of the array\r\n // with the tasks while holding the lock then release the lock and\r\n // execute the tasks\r\n List<Runnable> tasksCopy;\r\n synchronized (taskLock) {\r\n if (tasks.isEmpty()) { return; } \r\n tasksCopy = tasks;\r\n tasks = new ArrayList<Runnable>(4);\r\n }\r\n for (Runnable task : tasksCopy) {\r\n task.run();\r\n } \r\n }", "java.util.List<String>\n getTaskIdList();", "public List<String> getRunningESBTaskList() throws Exception {\n return ntaskManager.getRunningTaskList();\n }", "List<Task> getAllTasks();", "java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();", "public Collection<Node> getTasks(Processor p) {\n return p.getScheduledTasks();\n }", "TaskList getList();", "@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }", "public List<TaskVersion1> getDefaultTasks() {\n return TaskWrapper.convertTasks(projectView.getDefaultTasks());\n }", "public ArrayList<Task> getTaskList() {\n\t\treturn tasks;\n\t}", "public Task[] getTasks()\n {\n return tasks.toArray(new Task[tasks.size()]);\n }", "public ArrayList<Task> getTasks() {\n return tasks;\n }", "List<ExtDagTask> taskList(ExtDagTask extDagTask);", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "TaskList(List<Task> tasks) {\n this.tasks = tasks;\n }", "public Hashtable getTaskDefinitions() {\n return ComponentHelper.getComponentHelper(this).getTaskDefinitions();\n }", "@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }", "Set<StandbyTask> getStandbyTasks();", "public List<TaskVersion1> getDefaultTasks();", "@ApiModelProperty(required = true, value = \"List of active tasks generated by the connector\")\n public List<ConnectorTaskId> getTasks() {\n return tasks;\n }", "public com.google.protobuf.ProtocolStringList\n getTaskIdList() {\n return taskId_;\n }", "@Override\n public List<Map<String, String>> taskConfigs(int i) {\n\n throw new UnsupportedOperationException(\"This has not been implemented.\");\n }", "public ArrayList<Task> listNotStarted() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Task t : this.tasks) {\n if (t.getStatus() == 0) {\n tasks.add(t);\n }\n }\n return tasks;\n }", "Set<Task> getDependentTasks();", "public ArrayList<Task> getTaskList() {\n return tasks;\n }", "public List<Taskdef> getLocalTaskdefs()\n {\n return localTaskdefs;\n }", "public void outputTasks ()\n\t{\n\t\toutput (\"\\n> (all-tasks)\\n\");\n\t\tString[] tasks = Task.allTaskClasses();\n\t\tfor (int i=0 ; i<tasks.length ; i++) output (tasks[i]);\n\t}", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "public ArrayList<Task> list() {\r\n return tasks;\r\n }", "private Task[][] getTasks() {\n\t\tList<Server> servers = this.scheduler.getServers();\n\t\tTask[][] tasks = new Task[servers.size()][];\n\t\tfor (int i = 0; i < servers.size(); i++) {\n\t\t\ttasks[i] = servers.get(i).getTasks();\n\t\t}\n\t\treturn tasks;\n\t}", "public java.util.List<java.lang.String> getDebugRunningsList() {\n return java.util.Collections.unmodifiableList(result.debugRunnings_);\n }", "void schedule(Collection<ExportedTaskNode> taskNodes);", "TaskList() {\r\n tasks = new ArrayList<>();\r\n }", "public List<CaptureTask> loadTaskToTaskPool(int poolSize) {\n\t\treturn null;\r\n\t}", "private void sendTasks(ArrayList<Task> list) {\n output.println(list.size());\n for (Task t : list) {\n output.println(t.getDateString() + \" \" + t.getName());\n }\n }", "public <T> List<T> massExec(Callable<? extends T> task);", "public List<Task> loadDependentTasks(Task task) {\n\t\treturn null;\r\n\t}", "public List<Runnable> shutdownNow() {\n lock.lock();\n try {\n shutdown();\n List<Runnable> result = new ArrayList<>();\n for (SerialExecutor serialExecutor : serialExecutorMap.values()) {\n serialExecutor.tasks.drainTo(result);\n }\n result.addAll(executor.shutdownNow());\n return result;\n } finally {\n lock.unlock();\n }\n }", "public int getTasks() {\r\n return tasks;\r\n }", "Set<Task> getAllTasks();", "public void setTaskList(List<WTask> list)\n\t{\n\t\tthis.taskList = list;\n\t}", "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 void runTasks() {\n promoteBlockedTasks();\n\n final AtomicInteger counter = new AtomicInteger(0);\n\n ExecutorService runners = threadPerCpuExecutor(stderr, \"TaskQueue\");\n\n for (int i = 0; i < Runtime.getRuntime().availableProcessors(); i++) {\n runners.execute(() -> {\n while (runOneTask()) {\n // running one task at a time\n counter.getAndIncrement();\n }\n });\n }\n\n runners.shutdown();\n\n try {\n runners.awaitTermination(FOREVER, TimeUnit.SECONDS);\n\n stdout.println(String.format(\"Executed tasks: %d\", counter.get()));\n\n } catch (InterruptedException e) {\n stdout.println(\"failed task: \" + e.getMessage());\n e.printStackTrace(stderr);\n throw new AssertionError();\n }\n }", "List<Task> getTaskdetails();", "@Override\n\tpublic void launchTasks() throws Exception {\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\tnew AbstractComponent.AbstractTask() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).switchFridgeOn();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\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\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\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\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).setOndulatorPolicy(\"default\");\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\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\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getFridgeTemperature();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t2000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTask(\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\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\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getBatteryEnergy();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t3000, TimeUnit.MILLISECONDS);\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\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\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).controllFridge();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 4000, 1000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t\t\t\t\n\t\t\t\tthis.scheduleTaskWithFixedDelay(\t\t\n\t\t\t\t\t\tnew AbstractComponent.AbstractTask() {\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\ttry {\n\t\t\t\t\t\t\t\t\t((Controller)this.getTaskOwner()).getEPConsommation();\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\tthrow new RuntimeException(e) ;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1000, 4000 // délai entre la fin d'une exécution et la suivante, à modifier \n\t\t\t\t\t\t,TimeUnit.MILLISECONDS) ;\n\t}", "public static void listTasks(ArrayList<Task> taskList) {\r\n StringBuilder sb = new StringBuilder();\r\n int i = 1;\r\n sb.append(\"Here are the tasks in your list:\\n\");\r\n for (Task task : taskList) {\r\n sb.append(i++ + \".\" + task.toString() + \"\\n\");\r\n }\r\n CmdUx.printHBars(sb.toString());\r\n }", "public com.google.protobuf.ProtocolStringList\n getTaskIdList() {\n return taskId_.getUnmodifiableView();\n }", "public WatchListMonitorTask()\r\n {\r\n debug(\"WatchListMonitorTask() - Constructor \");\r\n }", "public Collection<FixupTask> getAllFixupTasks() {\n\t\tCollection<FixupTask> res;\n\t\tres = this.fixupTaskService.findAll();\n\t\treturn res;\n\t}", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public ArrayList<Task> getTaskList() {\n return taskList;\n }", "public ArrayList<Task> allTasks() {\n ArrayList<Task> tasks = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Worker) {\n tasks.add(((Worker) role).getTask());\n } else if (role instanceof Supervisor) {\n tasks.add(((Worker) role).getTask());\n }\n }\n return tasks;\n }", "private final List<ActivityManager.AppTask> m881c() {\n List<ActivityManager.AppTask> appTasks = ((ActivityManager) this.f1350b.getSystemService(\"activity\")).getAppTasks();\n return appTasks == null ? Collections.emptyList() : appTasks;\n }", "public Collection<FixupTask> getAllFixupTasks() {\r\n\t\tCollection<FixupTask> res;\r\n\t\tres = this.fixupTaskService.findAll();\r\n\t\treturn res;\r\n\t}", "public void removeTasks() {\n\t\t\r\n\t}", "public String getTasks() {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n\n return result.toString();\n }", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "void addToList(Task task) throws InvalidCommandException;", "@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 void printList()\n {\n tasks.forEach(task -> System.out.println(task.getDetails()));\n }", "void addDoneTasks(List<Task> task);", "public List<TaskGenerateTrigger> loadTaskTriggers() {\n\t\treturn null;\r\n\t}", "public ArrayList<Task> getList() {\n return tasks;\n }", "public void sortTasks() {\n tasks.sort(null);\n }", "@Override\n\tpublic List<ScheduleTask> getScheduleTaskList() {\n\t\treturn (List<ScheduleTask>) find(\"from ScheduleTask\");\n\t}", "@Override\n\tprotected ArrayList<String> getCommandsToExecute() {\n\t\treturn null;\n\t}", "@Access(AccessType.PUBLIC)\r\n \tpublic Set<String> getTasks();", "public static void printTasks(){\n int totalTime = 0;\n int totalWait = 0;\n for(Task t : taskList){\n\n if(t.isAborted){\n System.out.println(\"TASK \" + t.taskNumber + \" aborted\" );\n }else{\n System.out.println(\"TASK \" + t.taskNumber + \" \" + t.terminateTime + \" \" + t.waitingCount + \" %\" + 100 * ((float)t.waitingCount / t.terminateTime));\n totalTime += t.terminateTime;\n totalWait += t.waitingCount;\n }\n }\n System.out.println(\"TOTAL\" + \" \" + totalTime + \" \" + totalWait + \" %\" + 100 *((float)totalWait / totalTime));\n\n }", "ObservableList<Task> getTaskList();", "public Task[] getTasks() throws ProcessManagerException {\r\n try {\r\n return Workflow.getTaskManager().getTasks(currentUser, currentRole,\r\n currentProcessInstance);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_GET_TASKS_FAILED\", e);\r\n }\r\n }", "private static void executeTask02() {\n }", "public void runSerial(List<Callable<?>> tasks) {\n\t\tfor (Callable<?> t : tasks) {\n\t\t\ttry {\n\t\t\t\tt.call();\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t}", "void doWork(AbstractTaskList list);", "@Override\n\tpublic Object[] splitTasks() {\n\t\tif (tasks == null) {\n\t\t\tSystem.out.println(\"There are \"+taskNum +\" tasks, and handled by \"+clientsNum+\" clients\");\n\t\t}\t\t\n\t\ttasks = new SimpleTask[clientsNum];\n\t\ttq = taskNum / clientsNum;\n//\t\tbatchSize = tq;\n\t\tint left = taskNum - tq * clientsNum;\n\t\t\n\t\tfor (int i = 0; i < tasks.length; i++) {\n\t\t\tint l = 0;\n\t\t\tif (left >= i+1) {\n\t\t\t\tl = 1;\n\t\t\t}\n\t\t\tif (i == 0) {\n\t\t\t\ttasks[i] = new SimpleTask(1, tq + l, batchSize);\n\t\t\t} else {\n\t\t\t\ttasks[i] = new SimpleTask(\n\t\t\t\t\t\ttasks[i - 1].getEnd()+ 1, tasks[i - 1].getEnd() + tq + l, batchSize);\n\t\t\t}\t\t\t\n\t\t}\n//\t\tSystem.out.println(\"done .\"+clientsNum);\n\t\tthis.srvQ2QLSTM.getCfg().getQlSTMConfigurator().setMBSize(batchSize);\n\t\tthis.srvQ2QLSTM.getCfg().getAlSTMConfigurator().setMBSize(batchSize);\t\t\n\t\treturn tasks;\n\t}", "public TaskList(List<Task> tl) {\n tasks = tl;\n }", "public TaskList(ArrayList<Task> tasks) {\n this.tasks = tasks;\n }" ]
[ "0.61388063", "0.6087712", "0.5860043", "0.58596843", "0.5820978", "0.57778364", "0.57746726", "0.57611907", "0.5759168", "0.57516897", "0.57428145", "0.56084037", "0.56084037", "0.559597", "0.55800384", "0.55602056", "0.5553479", "0.5534992", "0.5534992", "0.5534992", "0.54773325", "0.54733115", "0.5469408", "0.5463048", "0.54507893", "0.54498005", "0.5432075", "0.5431707", "0.5420609", "0.541411", "0.5404123", "0.54005975", "0.5383803", "0.5380031", "0.5372581", "0.53604877", "0.53582525", "0.5356943", "0.5348396", "0.534557", "0.53382045", "0.5333095", "0.5327226", "0.5321699", "0.5318616", "0.53103065", "0.530862", "0.53054965", "0.53017884", "0.53016895", "0.52895075", "0.5288469", "0.52694196", "0.52528334", "0.5248526", "0.5241354", "0.52302814", "0.52261525", "0.52216005", "0.5221526", "0.52144027", "0.5213907", "0.5212834", "0.51992375", "0.5184313", "0.516966", "0.51688725", "0.5163017", "0.51598656", "0.51432645", "0.5140289", "0.51397395", "0.51298803", "0.51237226", "0.5121201", "0.5118542", "0.51097625", "0.5102926", "0.51022816", "0.51021487", "0.5093053", "0.5090865", "0.50884753", "0.5086422", "0.5072782", "0.50601244", "0.5048494", "0.5045415", "0.50419956", "0.5036382", "0.5034719", "0.5028334", "0.50276184", "0.50110215", "0.49997166", "0.4998379", "0.49936625", "0.49903175", "0.49826056", "0.49738798", "0.49670434" ]
0.0
-1
The doGet method of the servlet. This method is called when a form has its tag value method equals to get.
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\n this.doPost(req, resp);\r\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\r\n\r\n doPost(req, resp); // call doPost processing\r\n\r\n }", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }", "@Override\n protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {\n doPost( request, response );\n }", "@Override\n\tpublic void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tthis.doPost(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tdoPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n doPost(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\tthrows ServletException, IOException {\nthis.doPost(request, response);\n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n \tdoPost(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // only POST should be used\n doPost(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n \n doPost(request, response);\n }", "public void doGet(\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response); // calling doPost method\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException\r\n\t{\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t doPost(request, response);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost( final HttpServletRequest request, final HttpServletResponse response ) throws ServletException, IOException {\r\n\t\tdoGet( request, response );\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t\t\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doPost(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoPost(req, resp);\n\t}", "public synchronized void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request, response);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doGet(request, response);\r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\r\n\t\tdoPost(request, response);\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "protected void doGet(HttpServletRequest request, \r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\t// Send all get requests to doPost\r\n\t\tdoPost(request, response);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req,resp);\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException,\n IOException\n {\n doPost(request,response);\n }", "@Override\n protected void doGet( HttpServletRequest req, HttpServletResponse resp )\n throws ServletException, IOException {\n log( \"GET\" );\n createInputBloodDonationForm( req, resp );\n }", "protected void doGet(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request,response);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\ndoPost(request, response);\n\t\t\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\r\n\t{\r\n\t\tdoPost(request, response);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doPost(request, response);\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n\n doGet(request, response);\n\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoGet(request, response);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n this.doPost(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}", "public void doGet(HttpServletRequest request, \n HttpServletResponse response)\n throws ServletException, IOException \n {\n response.setContentType(\"text/html\");\n\n // Writing message to the web page\n PrintWriter out = response.getWriter();\n String title = \"Using GET Method to Read Form Data\";\n String docType =\n \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n \n out.println(docType +\n \t \"<html>\\n\" +\n \t \"<head><title>\" + title + \"</title></head>\\n\" +\n \t \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \t \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \t \"<ul>\\n\" +\n \t \" <li><b>Email</b>: \"\n \t + request.getParameter(\"uname\") + \"\\n\" +\n \t \" <li><b>Password</b>: \"\n \t + request.getParameter(\"psw\") + \"\\n\" +\n \t \"\t<li><b>Remember?</b>: \"\n \t + request.getParameter(\"remember\") +\n \t \"</ul>\\n\" +\n \t \"</body>\" +\n \t \"</html>\"\n \t );\n \n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request,response);\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n\t{\n\t\tthis.doPost(request, response);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "public void doGet(HttpServletRequest request,\n HttpServletResponse response) throws ServletException,\n IOException {\n doPost(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }" ]
[ "0.7432514", "0.73521626", "0.7254457", "0.7252173", "0.7243877", "0.72416717", "0.7207163", "0.7207163", "0.7205729", "0.72009903", "0.72009677", "0.71832514", "0.71736676", "0.717088", "0.7159246", "0.71558", "0.71525633", "0.71515167", "0.71400803", "0.7138813", "0.7138813", "0.71347684", "0.71347684", "0.71347684", "0.71338934", "0.7124325", "0.71160007", "0.7108819", "0.71001637", "0.70978236", "0.709085", "0.709085", "0.709085", "0.709085", "0.709085", "0.7087061", "0.7087061", "0.7087061", "0.7087061", "0.7086715", "0.7075651", "0.7074198", "0.70691264", "0.70691246", "0.7054483", "0.704961", "0.70495355", "0.70495355", "0.70477206", "0.70355606", "0.7032538", "0.70091456", "0.70091456", "0.70049864", "0.70037985", "0.70004797", "0.6996423", "0.6996423", "0.69934", "0.69931644", "0.6990276", "0.69860625", "0.6984705", "0.6980132", "0.6979644", "0.69790673", "0.69754714", "0.6975102", "0.6970448", "0.69696593", "0.6969614", "0.6968336", "0.69657004", "0.69655716", "0.6965131", "0.6951971", "0.6936411", "0.6936411", "0.6936411", "0.692907", "0.69250554", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.69035095", "0.68986136", "0.68978524", "0.6896207", "0.6896207", "0.6890813", "0.6890366", "0.68847865", "0.68820864" ]
0.0
-1
The doPost method of the servlet. This method is called when a form has its tag value method equals to post.
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String service = request.getParameter("service"); if (service.equals("login")) { String inputId = request.getParameter("id"); String password = request.getParameter("pwd"); String role = request.getParameter("role"); if (role.equals("1")) { int sid = Integer.parseInt(inputId); StudentDao stuDao = new StudentDao(); Student stu = stuDao.searchStudentBySid(sid); String message; if (stu == null) { message = "用户不存在!"; request.setAttribute("message", message); request.getRequestDispatcher("login.jsp").forward(request, response); } else if (password != null && !password.equals(stu.getPassword())) { message = "密码错误,请重新输入密码!"; request.setAttribute("password", password); request.setAttribute("message", message); request.getRequestDispatcher("login.jsp").forward(request, response); } else { message = stu.getName(); request.setAttribute("studentinfo", stu); //设置学生个人信息属性,方便登录成功后取出表现给用户 request.setAttribute("message", message); request.getRequestDispatcher("main.jsp").forward(request, response); } } else if (role.equals("2")) { int tid = Integer.parseInt(inputId); TeacherDao teacherDao = new TeacherDao(); Teacher teacher = teacherDao.searchTeacherByTid(tid); String message; if (teacher == null) { message = "用户不存在!"; request.setAttribute("message", message); request.getRequestDispatcher("login1.jsp").forward(request, response); } else if (password != null && !password.equals(teacher.getPassword())) { message = "密码错误,请重新登陆!"; request.setAttribute("message", message); request.getRequestDispatcher("login1.jsp").forward(request, response); } else { message = teacher.getName(); request.setAttribute("teaInfo", teacher); request.setAttribute("message", message); CourseDao courseDao = new CourseDao(); List courseList = courseDao.searchCoursesByTid(tid); request.setAttribute("courses", courseList); request.getRequestDispatcher("main1.jsp").forward(request, response); } } } else if(service.equals("inputScore")) { String message; String inputCid = request.getParameter("cid"); int cid = Integer.parseInt(inputCid); CourseDao courseDao = new CourseDao(); Course course = courseDao.searchCourseByCid(cid); ScoreDao scoreDao = new ScoreDao(); List scoreList = scoreDao.searchInputScoresByCid(cid); // 忘记写下面两个得到的结果就是NullPointerException..... TeacherDao teacherDao = new TeacherDao(); Teacher teacher = teacherDao.searchTeacherByCid(cid); message = teacher.getName(); request.setAttribute("message", message); request.setAttribute("teaInfo", teacher); request.setAttribute("inputscores", scoreList); request.setAttribute("course", course); request.getRequestDispatcher("response1.jsp").forward(request, response); } else if(service.equals("saveScore")) { Enumeration pNames = request.getParameterNames(); @SuppressWarnings("rawtypes") Map hm = new HashMap(); while (pNames.hasMoreElements()) { String name = (String) pNames.nextElement(); float score = 0; if (name.startsWith("2")) { String scoreStr = request.getParameter(name); int sid = Integer.parseInt(name); if (scoreStr != null) score = Float.parseFloat(scoreStr); hm.put(sid, score); } } String cidStr = request.getParameter("cid"); int cid = Integer.parseInt(cidStr); ScoreDao scoreDao = new ScoreDao(); scoreDao.saveScores(hm, cid); CourseDao cDao = new CourseDao(); Course cou = cDao.searchCourseByCid(cid); //String inputTid = request.getParameter("tid"); //int tid = Integer.parseInt(inputTid); TeacherDao teacherDao = new TeacherDao(); Teacher teacher = teacherDao.searchTeacherByCid(cid); String message; message = teacher.getName(); request.setAttribute("teaInfo", teacher); request.setAttribute("message", message); List scoreList = scoreDao.searchScoresByCid(cid); request.setAttribute("scores", scoreList); request.setAttribute("course", cou); request.getRequestDispatcher("scoresList.jsp").forward(request, response); } else if(service.equals("queryCourseBySid")) { String inputSid = request.getParameter("sid"); int sid = Integer.parseInt(inputSid); StudentDao stuDao = new StudentDao(); Student stu = stuDao.searchStudentBySid(sid); ScoreDao scoDao = new ScoreDao(); List coursesList = scoDao.queryCourseBySid(sid); String message; message = stu.getName(); request.setAttribute("studentinfo", stu); request.setAttribute("coursesinfo", coursesList); request.setAttribute("message", message); request.getRequestDispatcher("stdcos.jsp").forward(request, response); } else if(service.equals("queryScoreBySid")) { String inputSid = request.getParameter("sid"); int sid = Integer.parseInt(inputSid); StudentDao stuDao = new StudentDao(); Student stu = stuDao.searchStudentBySid(sid); ScoreDao scoDao = new ScoreDao(); List scoList = scoDao.queryScoreBySid(sid); String message; message = stu.getName(); request.setAttribute("studentinfo", stu); request.setAttribute("scoList", scoList); request.setAttribute("message", message); request.getRequestDispatcher("scores.jsp").forward(request, response); } else if(service.equals("queryStuInfo")) { String inputSid = request.getParameter("sid"); int sid = Integer.parseInt(inputSid); StudentDao stuDao = new StudentDao(); Student stu = stuDao.searchStudentBySid(sid); ScoreDao scoDao = new ScoreDao(); List scoList = scoDao.queryScoreBySid(sid); ScoreDao scoDao1 = new ScoreDao(); List coursesList = scoDao1.queryCourseBySid(sid); String message; message = stu.getName(); request.setAttribute("studentinfo", stu); request.setAttribute("scoList", scoList); request.setAttribute("message", message); request.setAttribute("coursesinfo", coursesList); request.getRequestDispatcher("main.jsp").forward(request, response); } else if(service.equals("queryTeachCourses")) { String inputTid = request.getParameter("tid"); int tid = Integer.parseInt(inputTid); TeacherDao teacherDao = new TeacherDao(); Teacher teacher = teacherDao.searchTeacherByTid(tid); String message; message = teacher.getName(); request.setAttribute("teaInfo", teacher); request.setAttribute("message", message); CourseDao courseDao = new CourseDao(); List courseList = courseDao.searchCoursesByTid(tid); request.setAttribute("courses", courseList); request.getRequestDispatcher("response.jsp").forward(request, response); } else if(service.equals("queryTeaInfo")) { String inputId = request.getParameter("tid"); int tid = Integer.parseInt(inputId); TeacherDao teacherDao = new TeacherDao(); Teacher teacher = teacherDao.searchTeacherByTid(tid); String message; message = teacher.getName(); request.setAttribute("teaInfo", teacher); request.setAttribute("message", message); request.getRequestDispatcher("main1.jsp").forward(request, response); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost( )\n {\n \n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\r\n\t/**\r\n\t * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse\r\n\t * response)\r\n\t */\r\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\t\n\t\t\tdoGet(request, response);\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\tsuper.doPost(req, resp);\n\t\n\tSystem.out.println(\"dddd\");\n}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\ndoGet(request, response);\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n this.doGet(request, response);\n\t\t\n\t\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t\t\r\n\t}", "@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \tdoGet(request, response);\n }", "protected void doPost(HttpServletRequest request, \r\n \t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n processRequest(request, response);\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }", "public void processPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString string= request.getParameter(\"action\");\n\t\tif(string.equals(\"fileUpload\")) {\n\t\t\tfileUpload(request, response);\n\t\t}\n\t\telse if(string.equals(\"updateImformation\")) {\n\t\t\tupdateImformation(request, response);\n\t\t}\n\t\telse {\n\t\t\trequest.getRequestDispatcher(\"index.jsp\").forward(request, response);\n\t\t}\n\t}", "protected void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n {\n doGet(request,response);\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "protected void doPost(final HttpServletRequest request,final HttpServletResponse response)\r\n throws ServletException, IOException {\r\n this.doGet(request, response);\r\n \r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {\n doPost( request, response );\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n doGet(request,response);\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tdoGet(request, response);\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n processRequest(request, response);\r\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\tthrows ServletException, IOException {\n\t\tMap<String, String> messages = new HashMap<String, String>();\n\t\treq.setAttribute(\"messages\", messages);\n\n\t\tList<MeetUps> meetups = new ArrayList<MeetUps>();\n \n\t\t// Retrieve and validate the user last name that is retrieved from the form POST submission. By default, it\n\t\t// is populated by the URL query string (in FindUsers.jsp).\n\t\tString district = req.getParameter(\"district\");\n\t\tif (district == null || district.trim().isEmpty()) {\n\t\t\tmessages.put(\"success\", \"Please enter a valid intensity value.\");\n\t\t} else {\n\t\t\t// Retrieve meetups, and store as a message.\n\t\t\ttry {\n\t\t\t\tmeetups = meetupsDao.getAllMeetUpsByDistrict(district);\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IOException(e);\n\t\t\t}\n\t\t\tmessages.put(\"success\", \"Displaying results for meetups in the district: \" + district);\n\t\t}\n\t\treq.setAttribute(\"meetups\", meetups);\n \n\t\treq.getRequestDispatcher(\"/MeetUp.jsp\").forward(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProcess(req, resp);\r\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n processRequest(request, response);\n }", "@Override\n protected void doPost\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException\n {\n internalProcessRequest(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n\r\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n \tif(\"Submit Request\".equalsIgnoreCase(request.getParameter(\"action\"))){\t\t\t\r\n \t\tSite site = getLoggedOnSite(request);\r\n \t\tUser user = getLoggedOnUser(request);\r\n\r\n\t \tint itemId = Integer.parseInt(request.getParameter(\"itemId\"));\r\n\t \tint numRequested = Integer.parseInt(request.getParameter(\"numberUnits\"));\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tmakeFoodBankRequestDAO.makeFoodBankRequest(itemId, site.getId(), user.getEmail(), numRequested);\r\n\t\t\t\t\r\n\t\t\t\tresponse.getWriter().write((\"Success\"));\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tresponse.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());\r\n\t\t\t}\r\n\t\t}\r\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n \r\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\n\t}" ]
[ "0.7657226", "0.76023036", "0.7524087", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.74691117", "0.7467355", "0.74277", "0.74118495", "0.7402203", "0.738549", "0.7371081", "0.7369612", "0.7369612", "0.73690754", "0.73477966", "0.73444855", "0.7338501", "0.7324378", "0.73197407", "0.7313682", "0.7308681", "0.7305659", "0.7302406", "0.7302406", "0.7302406", "0.72706866", "0.72706866", "0.72706866", "0.7268643", "0.7225607", "0.7225607", "0.7225607", "0.7225135", "0.7225135", "0.71465594", "0.71275556", "0.7116052", "0.70882493", "0.70692873", "0.7057836", "0.7048484", "0.7041338", "0.70369875", "0.7034991", "0.70310956", "0.7014035", "0.699851", "0.69876504", "0.69825065", "0.69751984", "0.69360757", "0.6932715", "0.69247216", "0.69247216", "0.69247216", "0.69247216", "0.69247216", "0.69247216", "0.69247216", "0.69185597", "0.69185597", "0.69185597", "0.69185597", "0.69185597", "0.6915187", "0.69120973", "0.69100356", "0.6908473", "0.68973196", "0.68973196", "0.689283", "0.6889443", "0.68839586", "0.6873252", "0.6873252", "0.6873252", "0.68722403", "0.68661696", "0.68632877", "0.68610084", "0.6857985", "0.68521655", "0.6851028", "0.68468994", "0.6844512", "0.6839171", "0.68385834", "0.6832161", "0.6828243", "0.68200487", "0.68190587", "0.681232" ]
0.0
-1
Notify the start of an element.
public void startElement(int nameCode, int properties) throws XPathException { defaultNamespaceStack.push(startTag.getAttribute(defaultNamespaceCode)); if (emptyStylesheetElement) { depthOfHole++; return; } if (depthOfHole == 0) { String useWhen; int uriCode = getNamePool().getURICode(nameCode); if (uriCode == NamespaceConstant.XSLT_CODE) { useWhen = startTag.getAttribute(useWhenCode); } else { useWhen = startTag.getAttribute(xslUseWhenCode); } if (useWhen != null) { Expression expr = null; try { SourceLocator loc = new SourceLocator() { public String getSystemId() { return UseWhenFilter.this.getSystemId(); } public String getLocation() { return "use-when expression in " + getSystemId(); } }; UseWhenStaticContext staticContext = new UseWhenStaticContext(getConfiguration(), nsResolver, loc); expr = prepareUseWhen(useWhen, staticContext, loc); boolean b = evaluateUseWhen(expr, staticContext); if (!b) { int fp = nameCode & NamePool.FP_MASK; if (fp == StandardNames.XSL_STYLESHEET || fp == StandardNames.XSL_TRANSFORM) { emptyStylesheetElement = true; } else { depthOfHole = 1; return; } } } catch (XPathException e) { XPathException err = new XPathException("Error in use-when expression. " + e.getMessage()); err.setLocator(expr.getSourceLocator()); err.setErrorCodeQName(e.getErrorCodeQName()); getPipelineConfiguration().getErrorListener().error(err); err.setHasBeenReported(true); throw err; } } nextReceiver.startElement(nameCode, properties); } else { depthOfHole++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void notifyStart();", "protected void notifyStart(\n )\n {\n for(IListener listener : listeners)\n {listener.onStart(this);}\n }", "@Override\n\tpublic void elementStart(float tpf) {\n\t\t\n\t}", "boolean notifyBegin();", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "public abstract void notifyArrayStart();", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}", "public void setStartElement(final int startIdx) {\r\n\t\tgetState().start = startIdx;\r\n\t}", "protected void _notifyInteractionStarted() {\n for (int i=0; i < _listeners.size(); i++) {\n ((InteractionsListener)_listeners.get(i)).interactionStarted();\n }\n }", "public void onBegin() {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "public void startElement(String localName) throws SAXException {\n\t\tstartElement(\"\", localName, \"\", EMPTY_ATTS);\n\t}", "public void startContent() throws XPathException {\r\n if (depthOfHole == 0) {\r\n nextReceiver.startContent();\r\n }\r\n }", "void notifyStarted(MessageSnapshot snapshot);", "public synchronized void tellAt(){\n\t\tnotifyAll();\n\t}", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public abstract void tellStarting();", "public void start() {\n enableEvents = true;\n reset();\n }", "public void start() {\r\n message = \"Now I'm starting up...\";\r\n repaint();\r\n }", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "void notifyElementAdded(Object element) {\n\t\tinitTransients();\r\n\t\tfor (int i = 0; i < methodsListeners.size(); i++ ) {\r\n\t\t\t((VectorMethodsListener) methodsListeners.elementAt(i)).elementAdded(changeable, element, changeableCopy.size());\r\n\t\t}\r\n\t\tfor (int i = 0; i < transientMethodsListeners.size(); i++ ) {\r\n\t\t\t((VectorMethodsListener) transientMethodsListeners.elementAt(i)).elementAdded(changeable, element, changeableCopy.size());\r\n\t\t}\r\n\t}", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "public void markContentBegin() {\n this.ris.markContentBegin();\n }", "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "void sendStartMessage();", "void sendStartMessage();", "@Override\n\tpublic void notify(int seg, int start) {\n\n\t}", "public void start() {\n \tupdateHeader();\n }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public void beforeFirst() {\n\t\tmoveTo(0);\n\t}", "public DsSipElementListener elementBegin(int contextId, int elementId)\n throws DsSipParserListenerException {\n if (DsSipMessage.DEBUG) {\n System.out.println(\n \"elementBegin - contextId = [\"\n + contextId\n + \"][\"\n + DsSipMsgParser.HEADER_NAMES[contextId]\n + \"]\");\n System.out.println(\n \"elementBegin - elementId = [\"\n + elementId\n + \"][\"\n + DsSipMsgParser.ELEMENT_NAMES[elementId]\n + \"]\");\n System.out.println();\n }\n\n if (elementId == SINGLE_VALUE) {\n return this;\n } else {\n return null;\n }\n }", "void start(Element e, Attributes attributes) {\n this.current = e;\n\n if (e.startElementListener != null) {\n e.startElementListener.start(attributes);\n }\n\n if (e.endTextElementListener != null) {\n this.bodyBuilder = new StringBuilder();\n }\n\n e.resetRequiredChildren();\n e.visited = true;\n }", "public void firstElement() {\r\n \t\tcurrentObject = 0;\r\n \t}", "public void startWatching(){\n this.listWatcher.start();\n }", "public void displayStartMessage(String message){\n\t\tif (startCompleted){\n\t\t\tdisplayMessage(message);\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(onStartMessage);\n\t\t\tthis.onStartMessage = message;\n\t\t}\n\t}", "public void firstFeedAdded() {\n mOnFirstFeedAddedListener.onFirstFeedAdded();\n }", "public void start(Node n) {}", "public void start() {\n start(mRangeStart, mRange, mIsPositive);\n }", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "public void addNotify() {\n\t\tsuper.addNotify();\n\t\tif (thread == null) {\n\t\t\tthread = new Thread(this);\n\t\t\tthread.start();\n\t\t}\n\t}", "public void start(int p) {\n\t\t_start.setEnabled(true);\n\t\tupdateToPlace(p);\n\t}", "private void fire() {\n\t\tlog.finer(\"Firing node\");\n\t\t\n\t\tplay();\n\t\taddAnimation(new NodeEcho(parent, pos, diam, diam + 15));\n\t}", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "@Override\n public void start() {\n checkValue();\n super.start();\n }", "void onStarted();", "public void start( )\n {\n // Implemented by student.\n }", "@Override\n\tpublic boolean getStart() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "protected void started() {\n for(MinMaxListener listener : listeners) {\n listener.started();\n }\n }", "public void sendeSpielStarten();", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "public void startDocument() throws SAXException {\n \n }", "@Override\r\n\tpublic void update(Notification notification, EObject element) {\n\t\tsuper.update(notification, element);\r\n\t}", "protected abstract void startListener();", "protected void onBegin() {}", "public void onStart(ElementPath elementPath) {\r\n Element element = elementPath.getCurrent();\r\n\r\n // Save the location of the last (i.e. parent) path\r\n pathStack.add(path);\r\n\r\n // Calculate the new path\r\n if (atRoot) {\r\n path = path + element.getName();\r\n atRoot = false;\r\n } else {\r\n path = path + \"/\" + element.getName();\r\n }\r\n\r\n if ((handlers != null) && (handlers.containsKey(path))) {\r\n // The current node has a handler associated with it.\r\n // Find the handler and save it on the handler stack.\r\n ElementHandler handler = (ElementHandler) handlers.get(path);\r\n handlerStack.add(handler);\r\n\r\n // Call the handlers onStart method.\r\n handler.onStart(elementPath);\r\n } else {\r\n // No handler is associated with this node, so use the\r\n // defaultHandler it it exists.\r\n if (handlerStack.isEmpty() && (defaultHandler != null)) {\r\n defaultHandler.onStart(elementPath);\r\n }\r\n }\r\n }", "public void prepend(T element);", "public void notifyLoaded();", "@Override\n public void prepend(T element){\n if(isEmpty()){\n add(element);\n } else{\n this.first = new DLLNode<T>(element, null, this.first);\n this.first.successor.previous = this.first;\n }\n }", "public void start() {\r\n view.addListener(this);\r\n view.makeVisible();\r\n view.display();\r\n }", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "@Override\n public void startDocument() throws SAXException {\n }", "@Override\r\n public void startDocument() throws SAXException {\n }", "public void processStart(MessageForm message) {\n message.setCode(Mc.start);\n hold(scheduleA.getTimeOfSleep(mySim().currentTime()), message);\n if (initialised) {\n MyMessage msg1 = new MyMessage((MyMessage) message);\n assistantFinished(msg1);\n }\n\n if (!initialised) {\n initialised = true;\n }\n }", "@Override\n public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n\n elementOn = true;\n\n if (localName.equals(\"begin\"))\n {\n data = new CallMTDGetterSetter();\n } else if (localName.equals(\"OHC_CALL_REPORT\")) {\n /**\n * We can get the values of attributes for eg. if the CD tag had an attribute( <CD attr= \"band\">Akon</CD> )\n * we can get the value \"band\". Below is an example of how to achieve this.\n *\n * String attributeValue = attributes.getValue(\"attr\");\n * data.setAttribute(attributeValue);\n *\n * */\n }\n }", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "private void waitForSecondChangeBeforeNotification() {\n\t\tif (hasChanged())\n\t\t\tnotifyObservers(Global.COMPONENT_SIZE_UPDATE);\n\t\telse\n\t\t\tsetChanged();\n\t}", "@Override\n public void onStart(boolean fromBeginning)\n {\n if(fromBeginning)\n {\n System.out.println(mLabel + \" Started!\");\n }\n else\n {\n System.out.println(mLabel + \" resumed\");\n }\n }", "public void startElement (String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException\n {\n // no op\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "protected abstract void displayStartMsg();", "public void insertAtBeginning(int element) {\n\t\thead = new Node(element, head);\n\t}", "@Override \n\t public void startDocument() throws SAXException {\n\t\t _data = new ArrayList<AlarmItemContent>();\n\t\t position = -1;\n\t }", "public void start(float delta) {\n\t\t\n\t}", "public void onMoveGestureStarted()\n\t{\n\t\tfireEvent(TiC.EVENT_MOVE_START, null);\n\t}", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "public void startRefresh() {\n SmartDashboard.putNumber(\"Ele P\", 0.0);\n SmartDashboard.putNumber(\"Ele I\", 0.0);\n SmartDashboard.putNumber(\"Ele D\", 0.0);\n SmartDashboard.putNumber(\"Ele Set\", 0.0);\n }", "public void onStarted(long startedTime);", "public void start() {\n tickers.stream().forEach(t -> t.start());\n }", "void nodeStarted();", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void start(Point p);", "@objid (\"c3f1412d-ca73-479b-8bf7-561601b3f34c\")\n void setStart(CommunicationNode value);", "public void doNotify(){\n\t\tsynchronized(m){\n\t\t\tm.notifyAll();\n\t\t}\n\t}", "@Override\n public void prepend(T elem) {\n if(isEmpty()) { //if list is empty\n first = new DLNode(elem, null, null);//new element created, there's nothing before and after it yet\n last = first;\n }\n else{ //list in not empty\n \n first = new DLNode(elem, null, first); //new element goes to the front, there nothing before it, the old first element is after it\n \n first.next.prev = first; //ensure that reference to our first element is pointing to the new first element\n }\n \n }", "public void notifyControllerStart(int port);", "public void XMLstartElement(String element, HashMap attributes) {\r\n /**\r\n * Ex: <remotecontrol button=\"NUMERIC4\" state=\"DOWN\" />\r\n * This is a notification from the remote control module\r\n * about one of our requested remote control buttons have\r\n * been pressed.\r\n */\r\n if (element.equals(\"remotecontrol\") && attributes.containsKey(\"button\") && attributes.containsKey(\"state\")) {\r\n String state = (String)attributes.get(\"state\");\r\n String button = (String)attributes.get(\"button\");\r\n\r\n //find all room objects that are associated with this remote button\r\n Iterator it = roomObjects.values().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)it.next();\r\n if (o.remoteButton.equals(button)) {\r\n //toggle all such room objects\r\n sendRoomObject(o.address, o.byteValue, state);\r\n }\r\n }\r\n }\r\n }", "@Override\r\n public void start() {\r\n }", "@Override\r\n public void notify(Object arg) {\n }" ]
[ "0.68187237", "0.64684165", "0.64066994", "0.6318732", "0.6201095", "0.6164195", "0.61489815", "0.61489815", "0.61223865", "0.5833207", "0.5804468", "0.57763153", "0.5715334", "0.5711318", "0.5656053", "0.5640145", "0.5631336", "0.5564341", "0.55610424", "0.5543732", "0.55362123", "0.5524492", "0.55223405", "0.5495305", "0.5493495", "0.5491678", "0.54712486", "0.54704833", "0.54612064", "0.54600847", "0.54600847", "0.5459734", "0.54005426", "0.5383528", "0.5379842", "0.53733236", "0.5354614", "0.53440076", "0.5326388", "0.532611", "0.53226495", "0.5319755", "0.531657", "0.5304517", "0.5295033", "0.52833694", "0.5277991", "0.5268192", "0.5265643", "0.5257427", "0.5255112", "0.52542764", "0.5244925", "0.5244262", "0.5227227", "0.5225777", "0.52200234", "0.5219106", "0.5209098", "0.52089363", "0.5199122", "0.51951337", "0.5194475", "0.5191909", "0.5189851", "0.5185427", "0.5173184", "0.5170328", "0.51662844", "0.51640564", "0.51637375", "0.51594317", "0.5153604", "0.5153421", "0.5149193", "0.51488686", "0.5133628", "0.5133628", "0.5125883", "0.51099044", "0.51099044", "0.51099044", "0.5106028", "0.5105704", "0.50969857", "0.50958073", "0.5095787", "0.5095329", "0.50914085", "0.50907964", "0.5090386", "0.50843704", "0.5079536", "0.507859", "0.5076956", "0.5075205", "0.5074763", "0.5074475", "0.5073985", "0.5072306", "0.50663507" ]
0.0
-1
Notify a namespace. Namespaces are notified after the startElement event, and before any children for the element. The namespaces that are reported are only required to include those that are different from the parent element; however, duplicates may be reported. A namespace must not conflict with any namespaces already used for element or attribute names.
public void namespace(NamespaceBinding nsBinding, int properties) throws XPathException { if (depthOfHole == 0) { nextReceiver.namespace(nsBinding, properties); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setNamespace(java.lang.String namespace);", "abstract XML addNamespace(Namespace ns);", "private void emitNS(Namespace namespace) throws SAXException {\n if (namespace.getPrefix() == null || \n namespace.getNamespaceURI() == null) return;\n handler.startPrefixMapping(namespace.getPrefix(), namespace.getNamespaceURI());\n }", "private String updateNamespaces(final net.simpleframework.lib.org.jsoup.nodes.Element el) {\n\t\t\t// scan the element for namespace declarations\n\t\t\t// like: xmlns=\"blah\" or xmlns:prefix=\"blah\"\n\t\t\tfinal Attributes attributes = el.attributes();\n\t\t\tfor (final Attribute attr : attributes) {\n\t\t\t\tfinal String key = attr.getKey();\n\t\t\t\tString prefix;\n\t\t\t\tif (key.equals(xmlnsKey)) {\n\t\t\t\t\tprefix = \"\";\n\t\t\t\t} else if (key.startsWith(xmlnsPrefix)) {\n\t\t\t\t\tprefix = key.substring(xmlnsPrefix.length());\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tnamespacesStack.peek().put(prefix, attr.getValue());\n\t\t\t}\n\n\t\t\t// get the element prefix if any\n\t\t\tfinal int pos = el.tagName().indexOf(\":\");\n\t\t\treturn pos > 0 ? el.tagName().substring(0, pos) : \"\";\n\t\t}", "void setNamespace(String namespace);", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "void declarePrefix(String prefix, String namespace);", "public Element insertNamespaces(final Element element) throws Exception {\r\n\r\n element.setAttribute(\"xmlns:prefix-container\", Constants.NS_IR_CONTAINER);\r\n //element.setAttribute(\"xmlns:prefix-content-type\", CONTENT_TYPE_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-context\", Constants.NS_IR_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-dc\", Constants.NS_EXTERNAL_DC);\r\n element.setAttribute(\"xmlns:prefix-dcterms\", Constants.NS_EXTERNAL_DC_TERMS);\r\n element.setAttribute(\"xmlns:prefix-grants\", Constants.NS_AA_GRANTS);\r\n //element.setAttribute(\"xmlns:prefix-internal-metadata\", INTERNAL_METADATA_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:prefix-item\", Constants.NS_IR_ITEM);\r\n //element.setAttribute(\"xmlns:prefix-member-list\", MEMBER_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-member-ref-list\", MEMBER_REF_LIST_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadata\", METADATA_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-metadatarecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:escidocMetadataRecords\", METADATARECORDS_NS_URI); TODO: does no longer exist?\r\n element.setAttribute(\"xmlns:escidocComponents\", Constants.NS_IR_COMPONENTS);\r\n element.setAttribute(\"xmlns:prefix-organizational-unit\", Constants.NS_OUM_OU);\r\n //element.setAttribute(\"xmlns:prefix-properties\", PROPERTIES_NS_URI); TODO: does no longer exist?\r\n //element.setAttribute(\"xmlns:prefix-schema\", SCHEMA_NS_URI); TODO: huh???\r\n element.setAttribute(\"xmlns:prefix-staging-file\", Constants.NS_ST_FILE);\r\n element.setAttribute(\"xmlns:prefix-user-account\", Constants.NS_AA_USER_ACCOUNT);\r\n element.setAttribute(\"xmlns:prefix-xacml-context\", Constants.NS_EXTERNAL_XACML_CONTEXT);\r\n element.setAttribute(\"xmlns:prefix-xacml-policy\", Constants.NS_EXTERNAL_XACML_POLICY);\r\n element.setAttribute(\"xmlns:prefix-xlink\", Constants.NS_EXTERNAL_XLINK);\r\n element.setAttribute(\"xmlns:prefix-xsi\", Constants.NS_EXTERNAL_XSI);\r\n return element;\r\n }", "public static void ensureNamespaceDeclaration(final Element element, final String prefix, final String namespaceURI) {\n\t\tif(!isNamespaceDefined(element, prefix, namespaceURI)) { //if this namespace isn't declared for this element\n\t\t\tdeclareNamespace(element, prefix, namespaceURI); //declare the namespace\n\t\t}\n\t}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public static void declareNamespaces(final Element declarationElement, final Set<Map.Entry<String, String>> prefixNamespacePairs) {\n\t\tfor(final Map.Entry<String, String> prefixNamespacePair : prefixNamespacePairs) { //look at each name/value pair\n\t\t\tdeclareNamespace(declarationElement, prefixNamespacePair.getKey(), prefixNamespacePair.getValue()); //declare this namespace\n\t\t}\n\t}", "public static void ensureNamespaceDeclarations(final Element element) {\n\t\tensureNamespaceDeclarations(element, null, false); //ensure namespace declarations only for this element and its attributes, adding any declarations to the element itself\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite(\">\");\n\t\t\t}\n\t\t\telementLevel++;\n\t\t\t// nsSupport.pushContext();\n\n\t\t\twrite('<');\n\t\t\twrite(qName);\n\t\t\twriteAttributes(atts);\n\n\t\t\t// declare namespaces specified by the startPrefixMapping methods\n\t\t\tif (!locallyDeclaredPrefix.isEmpty()) {\n\t\t\t\tfor (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) {\n\t\t\t\t\tString p = e.getKey();\n\t\t\t\t\tString u = e.getValue();\n\t\t\t\t\tif (u == null) {\n\t\t\t\t\t\tu = \"\";\n\t\t\t\t\t}\n\t\t\t\t\twrite(' ');\n\t\t\t\t\tif (\"\".equals(p)) {\n\t\t\t\t\t\twrite(\"xmlns=\\\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrite(\"xmlns:\");\n\t\t\t\t\t\twrite(p);\n\t\t\t\t\t\twrite(\"=\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tchar ch[] = u.toCharArray();\n\t\t\t\t\twriteEsc(ch, 0, ch.length, true);\n\t\t\t\t\twrite('\\\"');\n\t\t\t\t}\n\t\t\t\tlocallyDeclaredPrefix.clear(); // clear the contents\n\t\t\t}\n\n\t\t\t// if (elementLevel == 1) {\n\t\t\t// forceNSDecls();\n\t\t\t// }\n\t\t\t// writeNSDecls();\n\t\t\tsuper.startElement(uri, localName, qName, atts);\n\t\t\tstartTagIsClosed = false;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void setNameSpace(String namespace) {\n this.namespace = namespace;\n }", "public static void declareNamespace(final Element declarationElement, final String prefix, String namespaceURI) {\n\t\tif(XMLNS_NAMESPACE_PREFIX.equals(prefix) && XMLNS_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xmlns` prefix\n\t\t\treturn;\n\t\t}\n\t\tif(prefix == null && XMLNS_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xmlns` name\n\t\t\treturn;\n\t\t}\n\t\tif(XML_NAMESPACE_PREFIX.equals(prefix) && XML_NAMESPACE_URI_STRING.equals(namespaceURI)) { //we don't need to define the `xml` prefix\n\t\t\treturn;\n\t\t}\n\t\tif(namespaceURI == null) { //if no namespace URI was given\n\t\t\tnamespaceURI = \"\"; //we'll declare an empty namespace URI\n\t\t}\n\t\tif(prefix != null) { //if we were given a prefix\n\t\t\t//create an attribute in the form `xmlns:prefix=\"namespaceURI\"` TODO fix for attributes that may use the same prefix for different namespace URIs\n\t\t\tdeclarationElement.setAttributeNS(XMLNS_NAMESPACE_URI_STRING, createQualifiedName(XMLNS_NAMESPACE_PREFIX, prefix), namespaceURI);\n\t\t} else { //if we weren't given a prefix\n\t\t\t//create an attribute in the form `xmlns=\"namespaceURI\"` TODO fix for attributes that may use the same prefix for different namespace URIs\n\t\t\tdeclarationElement.setAttributeNS(ATTRIBUTE_XMLNS.getNamespaceString(), ATTRIBUTE_XMLNS.getLocalName(), namespaceURI);\n\t\t}\n\t}", "void visit(Namespace namespace);", "private void printElementNamespace(Element element, Writer out,\r\n NamespaceStack namespaces)\r\n throws IOException {\n Namespace ns = element.getNamespace();\r\n if (ns == Namespace.XML_NAMESPACE) {\r\n return;\r\n }\r\n if ( !((ns == Namespace.NO_NAMESPACE) &&\r\n (namespaces.getURI(\"\") == null))) {\r\n printNamespace(ns, out, namespaces);\r\n }\r\n }", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public void addNamespacePrefix(String namespace, String prefix) {\n namespacePrefixMap.put(namespace, prefix);\n }", "public void endElement(String name, String namespace) throws XMLException {\n\n // -- Do delagation if necessary\n if ((unmarshaller != null) && (depth > 0)) {\n unmarshaller.endElement(name, namespace);\n --depth;\n return;\n }\n // -- check for name mismatches\n if (unmarshaller != null) {\n if (!name.equals(unmarshaller.elementName())) {\n String err = \"missing end element for \";\n err += unmarshaller.elementName();\n throw new SchemaException(err);\n }\n }\n\n // -- have unmarshaller perform any necessary clean up\n unmarshaller.finish();\n\n // -- <any>\n if (SchemaNames.ANY.equals(name)) {\n Wildcard wildcard = ((WildcardUnmarshaller) unmarshaller).getWildcard();\n try {\n _group.addWildcard(wildcard);\n } catch (SchemaException e) {\n throw new IllegalArgumentException(e.getMessage());\n }\n }\n if (SchemaNames.ANNOTATION.equals(name)) {\n Annotation ann = (Annotation) unmarshaller.getObject();\n _group.addAnnotation(ann);\n } else if (SchemaNames.ELEMENT.equals(name)) {\n ElementDecl element = (ElementDecl) unmarshaller.getObject();\n _group.addElementDecl(element);\n } else if (name.equals(SchemaNames.GROUP)) {\n ModelGroup group = (ModelGroup) unmarshaller.getObject();\n _group.addGroup(group);\n } else if ((SchemaNames.isGroupName(name)) && (name != SchemaNames.GROUP)) {\n Group group = ((GroupUnmarshaller) unmarshaller).getGroup();\n _group.addGroup(group);\n }\n\n unmarshaller = null;\n }", "void xsetNamespace(org.apache.xmlbeans.XmlNMTOKEN namespace);", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "public abstract void endElement( String namespaceURI, String sName, String qName );", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "private void handleNamespaceDeclaration() throws IOException {\r\n if (this.tempMapping != null) {\r\n PrefixMapping pm = null;\r\n for (int i = 0; i < tempMapping.size(); i++) {\r\n pm = (PrefixMapping)tempMapping.get(i);\r\n this.writer.write(\" xmlns\");\r\n // specify a prefix if different from \"\"\r\n if (!\"\".equals(pm.prefix)) {\r\n this.writer.write(':');\r\n this.writer.write(pm.prefix);\r\n }\r\n this.writer.write(\"=\\\"\");\r\n this.writer.write(pm.uri);\r\n this.writer.write(\"\\\"\");\r\n }\r\n this.tempMapping = null;\r\n }\r\n }", "public boolean isNamespaceAware () {\n return true;\n }", "public void endElement(String name, String namespace) throws XMLException {\n\n // -- Do delagation if necessary\n if ((unmarshaller != null) && (depth > 0)) {\n unmarshaller.endElement(name, namespace);\n --depth;\n return;\n }\n\n // -- check for name mismatches\n if (unmarshaller != null) {\n if (!name.equals(unmarshaller.elementName())) {\n String err = \"missing end element for \";\n err += unmarshaller.elementName();\n throw new SchemaException(err);\n }\n }\n\n // -- have unmarshaller perform any necessary clean up\n unmarshaller.finish();\n\n // -- <annotation>\n if (name == SchemaNames.ANNOTATION) {\n _schema.addAnnotation((Annotation) unmarshaller.getObject());\n }\n unmarshaller = null;\n }", "public boolean addNamespaceToBPELDoc(String prefix, String namespace, TOSCAPlan buildPlan) {\n\t\tBPELProcessHandler.LOG.debug(\"Adding namespace {} to BuildPlan {}\", namespace,\n\t\t\t\tbuildPlan.getBpelProcessElement().getAttribute(\"name\"));\n\t\tbuildPlan.getBpelProcessElement().setAttributeNS(\"http://www.w3.org/2000/xmlns/\", \"xmlns:\" + prefix, namespace);\n\t\t// TODO make a real check\n\t\treturn true;\n\t}", "@DOMSupport(DomLevel.TWO)\r\n @BrowserSupport({BrowserType.FIREFOX_2P, BrowserType.OPERA_9P})\r\n @Function Element createElementNS(String namespaceURI, String qualifiedName);", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "public void setNameSpacePrefix(String nsPrefix) {\n this.nsPrefix = nsPrefix;\n }", "public final boolean isNamespaceAware() {\n return true;\n }", "public int resolveElem(boolean internNsURIs)\n throws WstxException\n {\n if (mSize == 0) {\n throw new IllegalStateException(\"Calling validate() on empty stack.\");\n }\n NsAttributeCollector ac = mAttrCollector;\n\n // Any namespace declarations?\n {\n int nsCount = ac.getNsCount();\n if (nsCount > 0) {\n String [] nsPrefixes = ac.getNsPrefixes();\n TextBuilder nsURIs = ac.getNsURIs();\n for (int i = 0; i < nsCount; ++i) {\n String nsUri = nsURIs.getEntry(i);\n if (internNsURIs && nsUri.length() > 0) {\n nsUri = sInternCache.intern(nsUri);\n }\n /* 28-Jul-2004, TSa: Now we will have default namespaces\n * in there too; they have empty String as prefix\n */\n String prefix = nsPrefixes[i];\n if (prefix == null) {\n prefix = \"\";\n mElements[mSize-(ENTRY_SIZE - IX_DEFAULT_NS)] = nsUri;\n\n /* 18-Jul-2004, TSa: Need to check that 'xml' and 'xmlns'\n * prefixes are not re-defined.\n * !!! Should probably also check that matching URIs are\n * never bound to other prefixes, since that's what\n * Xerces does?\n */\n } else if (prefix == mPrefixXml) {\n if (!nsUri.equals(XMLConstants.XML_NS_URI)) {\n mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XML,\n nsUri);\n }\n } else if (prefix == mPrefixXmlns) {\n if (!nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {\n mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XMLNS,\n nsUri);\n }\n }\n mNamespaces.addStrings(prefix, nsUri);\n }\n }\n }\n\n // Then, let's set element's namespace, if any:\n String prefix = mElements[mSize-(ENTRY_SIZE - IX_PREFIX)];\n String ns;\n if (prefix == null || prefix.length() == 0) { // use default NS, if any\n ns = mElements[mSize-(ENTRY_SIZE - IX_DEFAULT_NS)];\n } else if (prefix == mPrefixXml) {\n ns = XMLConstants.XML_NS_URI;\n } else {\n // Need to find namespace with the prefix:\n ns = mNamespaces.findLastFromMap(prefix);\n if (ns == null) {\n mReporter.throwParseError(\"Undeclared namespace prefix '\"+prefix+\"'.\");\n }\n }\n mElements[mSize-(ENTRY_SIZE - IX_URI)] = ns;\n\n // And finally, resolve attributes' namespaces too:\n ac.resolveNamespaces(mReporter, mNamespaces);\n \n return CONTENT_ALLOW_MIXED;\n }", "public void setRootElementNS(java.lang.String rootElementNS) {\r\n this.rootElementNS = rootElementNS;\r\n }", "public static void ensureNamespaceDeclarations(final Element element, final Element declarationElement, final boolean deep) {\n\t\tfinal Set<Map.Entry<String, String>> prefixNamespacePairs = getUndefinedNamespaces(element); //get the undeclared namespaces for this element\n\t\tdeclareNamespaces(declarationElement != null ? declarationElement : element, prefixNamespacePairs); //declare the undeclared namespaces, using the declaration element if provided\n\t\tif(deep) { //if we should recursively check the children of this element\n\t\t\tfinal NodeList childElementList = element.getChildNodes(); //get a list of the child nodes\n\t\t\tfor(int i = 0; i < childElementList.getLength(); ++i) { //look at each node\n\t\t\t\tfinal Node node = childElementList.item(i); //get a reference to this node\n\t\t\t\tif(node.getNodeType() == Node.ELEMENT_NODE) { //if this is an element\n\t\t\t\t\tensureNamespaceDeclarations((Element)node, declarationElement, deep); //process the namespaces for this element and its descendants\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setXmlns(String xmlns)\r\n\t{\r\n\t\tthis.xmlns = xmlns;\r\n\t}", "public void start_ns(Object parser, String prefix, String uri) {\n Array.array_push(this.ns_decls, new Array<Object>(new ArrayEntry<Object>(prefix), new ArrayEntry<Object>(uri)));\r\n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "java.lang.String getNamespace();", "public Node setNamedItemNS(Node arg)\n throws DOMException {\n\n \tif (isReadOnly()) {\n throw\n new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,\n \"DOM001 Modification not allowed\");\n }\n \n \tif(arg.getOwnerDocument() != ownerNode.ownerDocument()) {\n throw new DOMExceptionImpl(DOMException.WRONG_DOCUMENT_ERR,\n \"DOM005 Wrong document\");\n }\n\n NodeImpl argn = (NodeImpl)arg;\n \tif (argn.isOwned()) {\n throw new DOMExceptionImpl(DOMException.INUSE_ATTRIBUTE_ERR,\n \"DOM009 Attribute already in use\");\n }\n\n // set owner\n argn.ownerNode = ownerNode;\n argn.isOwned(true);\n\n \tint i = findNamePoint(argn.getNamespaceURI(), argn.getLocalName());\n \tNodeImpl previous = null;\n \tif (i >= 0) {\n previous = (NodeImpl) nodes.elementAt(i);\n nodes.setElementAt(arg,i);\n previous.ownerNode = ownerNode.ownerDocument();\n previous.isOwned(false);\n // make sure it won't be mistaken with defaults in case it's reused\n previous.isSpecified(true);\n \t} else {\n \t // If we can't find by namespaceURI, localName, then we find by\n \t // nodeName so we know where to insert.\n \t i = findNamePoint(arg.getNodeName(),0);\n if (i >=0) {\n previous = (NodeImpl) nodes.elementAt(i);\n nodes.insertElementAt(arg,i);\n } else {\n i = -1 - i; // Insert point (may be end of list)\n if (null == nodes) {\n nodes = new Vector(5, 10);\n }\n nodes.insertElementAt(arg, i);\n }\n }\n // \tchanged(true);\n\n \t// Only NamedNodeMaps containing attributes (those which are\n \t// bound to an element) need report MutationEvents\n if (NodeImpl.MUTATIONEVENTS\n && ownerNode.ownerDocument().mutationEvents)\n {\n // MUTATION POST-EVENTS:\n ownerNode.dispatchAggregateEvents(\n (AttrImpl)arg,\n previous==null ? null : previous.getNodeValue()\n );\n }\n \treturn previous;\n\n }", "void registerNamespaceToGlobalScope(String namespace) {\n providesObjectChildren.put(namespace, new LinkedHashSet<String>());\n if (isJsLibrary) {\n maybeAddExport(NodeUtil.newQName(compiler, namespace));\n }\n fileToModule.put(file, this);\n namespaceToModule.put(namespace, this);\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n\n return prefix;\n }", "protected boolean isMatchingNamespace(String rootElementNamespace)\n {\n if (namespacePattern != null)\n {\n return namespacePattern.matcher(rootElementNamespace == null ? \"\" : rootElementNamespace).matches();\n }\n else\n {\n return namespace == null ? rootElementNamespace == null : namespace.equals(rootElementNamespace);\n }\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "@Test\n\tpublic void testAxiomPrefixRenaming() throws Exception {\n\t\ttestContextPrefixRenaming(IAxiom.ELEMENT_TYPE);\n\t}", "public void startElement(String name, String namespace, AttributeSet atts, Namespaces nsDecls)\n throws XMLException {\n // -- Do delagation if necessary\n if (unmarshaller != null) {\n unmarshaller.startElement(name, namespace, atts, nsDecls);\n ++depth;\n return;\n }\n\n if (SchemaNames.ANNOTATION.equals(name)) {\n if (foundElement || foundGroup || foundModelGroup)\n error(\"An annotation may only appear as the first child \" + \"of an element definition.\");\n\n\n if (foundAnnotation)\n error(\"Only one (1) 'annotation' is allowed as a child of \" + \"element definitions.\");\n\n foundAnnotation = true;\n unmarshaller = new AnnotationUnmarshaller(getSchemaContext(), atts);\n } else if (SchemaNames.ELEMENT.equals(name)) {\n foundElement = true;\n unmarshaller = new ElementUnmarshaller(getSchemaContext(), _schema, atts);\n }\n // --group\n else if (name.equals(SchemaNames.GROUP)) {\n foundModelGroup = true;\n unmarshaller = new ModelGroupUnmarshaller(getSchemaContext(), _schema, atts);\n }\n\n // --all, sequence, choice\n else if ((SchemaNames.isGroupName(name)) && (name != SchemaNames.GROUP)) {\n foundGroup = true;\n if (SchemaNames.ALL.equals(name))\n foundAll = true;\n unmarshaller = new GroupUnmarshaller(getSchemaContext(), _schema, name, atts);\n }\n // --any\n else if (SchemaNames.ANY.equals(name)) {\n if (foundAll)\n error(\"<any> can not appear as a child of a <all> element\");\n unmarshaller = new WildcardUnmarshaller(getSchemaContext(), _group, _schema, name, atts);\n }\n\n else {\n StringBuffer err = new StringBuffer(\"illegal element <\");\n err.append(name);\n err.append(\"> found in <group>.\");\n throw new SchemaException(err.toString());\n }\n\n }", "public void setNamespace(final String namespaceValue) {\n this.namespace = namespaceValue;\n }", "private void internalAddNamespace(NamespaceDefinition def) {\n String uri = def.getUri();\n String prefix = def.getPrefix();\n def.setIndex(m_container.getBindingRoot().\n getNamespaceUriIndex(uri, prefix));\n m_namespaces.add(def);\n m_uriMap.put(uri, def);\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\n if (prefix == null) {\n prefix = generatePrefix(namespace);\n while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\n }\n xmlWriter.writeNamespace(prefix, namespace);\n xmlWriter.setPrefix(prefix, namespace);\n }\n return prefix;\n }", "public boolean isNamespaceAware() {\n\t\ttry {\n\t\t\treturn parserImpl.getFeature(Constants.SAX_FEATURE_PREFIX\n\t\t\t\t\t\t\t\t\t\t + Constants.NAMESPACES_FEATURE);\n\t\t}\n\t\t catch (SAXException x) {\n\t\t\tthrow new IllegalStateException(x.getMessage());\n\t\t}\n\t}", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();\r\n while (true) {\r\n java.lang.String uri = nsContext.getNamespaceURI(prefix);\r\n if (uri == null || uri.length() == 0) {\r\n break;\r\n }\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }", "private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {\r\n java.lang.String prefix = xmlWriter.getPrefix(namespace);\r\n if (prefix == null) {\r\n prefix = generatePrefix(namespace);\r\n javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();\r\n while (true) {\r\n java.lang.String uri = nsContext.getNamespaceURI(prefix);\r\n if (uri == null || uri.length() == 0) {\r\n break;\r\n }\r\n prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();\r\n }\r\n xmlWriter.writeNamespace(prefix, namespace);\r\n xmlWriter.setPrefix(prefix, namespace);\r\n }\r\n return prefix;\r\n }" ]
[ "0.5960618", "0.5951807", "0.5831461", "0.5654378", "0.564697", "0.56038177", "0.55819327", "0.55818784", "0.55561125", "0.5395295", "0.5395295", "0.53897667", "0.53621256", "0.53559494", "0.5347548", "0.5346204", "0.5300705", "0.52980006", "0.529481", "0.5195637", "0.51859313", "0.51732826", "0.5149363", "0.51475114", "0.51161736", "0.50904053", "0.50880504", "0.50829446", "0.50709957", "0.50673366", "0.5062069", "0.5047315", "0.50363", "0.5012373", "0.5003571", "0.50009245", "0.49882728", "0.49872756", "0.4985608", "0.49573937", "0.49319518", "0.4907269", "0.489309", "0.48861772", "0.48577994", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.485393", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48478785", "0.48431396", "0.48422787", "0.4840252", "0.4837852", "0.48269156", "0.48189315", "0.48094678", "0.48065883", "0.480528", "0.480528" ]
0.5119602
24
Notify an attribute. Attributes are notified after the startElement event, and before any children. Namespaces and attributes may be intermingled.
public void attribute(int nameCode, CharSequence value) throws XPathException { if (depthOfHole == 0) { nextReceiver.attribute(nameCode, value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void attributeAdded(Component component, String attr, String newValue);", "@Override\n public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException {\n\n }", "XomNode appendAttribute(Attribute attribute) throws XmlBuilderException;", "public final native void attributeFollows(String name, Element newNode, Element oldNode) /*-{ attributeFollows(name, newNode, oldNode); }-*/;", "@Override\n public void addAttribute(ConfigurationNode attr)\n {\n attributes.addNode(attr);\n attr.setAttribute(true);\n attr.setParentNode(this);\n }", "public void setAttribute(final String attribute) {\n this.attribute = attribute;\n }", "XMLAttribute addAttribute(String namespace, String name, String value);", "public void attributeChanged(Component component, String attr, String newValue, String oldValue);", "@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}", "public void setAttribute(Attribute attribute) \n throws AttributeNotFoundException,\n InvalidAttributeValueException,\n MBeanException, \n ReflectionException {\n if (attribute == null) {\n throw new RuntimeOperationsException(new IllegalArgumentException(\"Attribute cannot be null\"), \n \"Cannot invoke a setter of \" + dClassName + \" with null attribute\");\n }\n String name = attribute.getName();\n if (name == null) {\n throw new RuntimeOperationsException(new IllegalArgumentException(\"Attribute name cannot be null\"), \n \"Cannot invoke the setter of \" + dClassName + \" with null attribute name\");\n }\n\n name = RunTimeSingleton.decode(name, \"US-ASCII\"); // HtmlAdapter made from info/admin -> info%2Fadmin\n // \"logging/org.xmlBlaster.engine.RequestBroker\"\n if (name.startsWith(\"logging/\"))\n name = name.substring(8); // \"org.xmlBlaster.engine.RequestBroker\"\n\n String value = (String)attribute.getValue();\n log.debug(\"Setting log level of name=\" + name + \" to '\" + value + \"'\");\n\n try {\n Level level = Level.toLevel(value);\n this.glob.changeLogLevel(name, level);\n }\n catch (ServiceManagerException e) {\n throw(new AttributeNotFoundException(\"Cannot set log level attribute '\"+ name +\"':\" + e.getMessage()));\n }\n catch (Throwable e) {\n throw(new AttributeNotFoundException(\"Cannot set log level attribute '\"+ name +\"':\" + e.toString()));\n }\n }", "protected void fireAttributeChanged(VAttribute attr)\n\t{\n\t\tResourceEvent event=ResourceEvent.createAttributesChangedEvent(getVRL(),\n\t\t\t\tnew VAttribute[]{attr}); \n\t\tthis.vrsContext.getResourceEventNotifier().fire(event); \n\t}", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\r\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName, attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace, attName, attValue);\r\n }\r\n }", "@Override\n\t\tprotected void setAttributeValue(String value) {\n\t\t\ttry {\n\t\t\t\tchanging = true;\n\t\t\t\telement.setAttributeNS(namespaceURI, localName, value);\n\t\t\t} finally {\n\t\t\t\tchanging = false;\n\t\t\t}\n\t\t}", "private void writeAttribute(java.lang.String namespace, java.lang.String attName, java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName, attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace, attName, attValue);\n }\n }", "AdditionalAttributes setAttribute(String name, Object value, boolean force);", "private void writeAttribute(java.lang.String namespace, java.lang.String attName,\n java.lang.String attValue, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName, attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace, attName, attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\"))\r\n {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n }\r\n else\r\n {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "void setProperty(String attribute, String value);", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\r\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\r\n if (namespace.equals(\"\")) {\r\n xmlWriter.writeAttribute(attName,attValue);\r\n } else {\r\n registerPrefix(xmlWriter, namespace);\r\n xmlWriter.writeAttribute(namespace,attName,attValue);\r\n }\r\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\"))\n {\n xmlWriter.writeAttribute(attName,attValue);\n }\n else\n {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "public void gxlAttributeChanged(GXLAttributeModificationEvent e) {\n\t}", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }", "private void writeAttribute(java.lang.String namespace,java.lang.String attName,\n java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{\n if (namespace.equals(\"\")) {\n xmlWriter.writeAttribute(attName,attValue);\n } else {\n registerPrefix(xmlWriter, namespace);\n xmlWriter.writeAttribute(namespace,attName,attValue);\n }\n }" ]
[ "0.5639551", "0.5568343", "0.54679304", "0.5424787", "0.54193026", "0.5410082", "0.53903294", "0.5381177", "0.536694", "0.5366002", "0.5356253", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53507537", "0.53459346", "0.53164214", "0.53083783", "0.53080153", "0.5286229", "0.52854013", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.5283359", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52833354", "0.52814466", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113", "0.5269113" ]
0.0
-1
Notify the start of the content, that is, the completion of all attributes and namespaces. Note that the initial receiver of output from XSLT instructions will not receive this event, it has to detect it itself. Note that this event is reported for every element even if it has no attributes, no namespaces, and no content.
public void startContent() throws XPathException { if (depthOfHole == 0) { nextReceiver.startContent(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "public void onLoadingStart() {\n\t\tsession.getUiElements().setLogText(\"Loading attribute definitions started.\");\n\t\tevents.onLoadingStart();\n\t}", "void startDocument()\n throws SAXException\n {\n contentHandler.setDocumentLocator(this);\n contentHandler.startDocument();\n attributesList.clear();\n }", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "public void startContent() throws XPathException {\n if (activeDepth > 0) {\n super.startContent();\n } else if (matched) {\n activeDepth = 1;\n super.startContent();\n }\n }", "public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}", "public void startDocument() throws SAXException {\n\t\tthis.idMap = new HashMap<Integer, ArrayList<String>>();\n\t\tthis.string = new StringBuilder();\n\t\tthis.ids = new ArrayList<ArrayList<String>>();\n\t\tthis.children = new HashMap<Integer, ArrayList<Integer>>();\n\t\tthis.root = 0;\n\t\tthis.edges = new HashMap<Integer, Integer>();\n\t}", "private void ensureInitialization() throws SAXException {\n if (this.startDocumentReceived == false) {\n this.startDocument();\n }\n }", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "public void startDocument() throws SAXException {\n \n }", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "public void startDocument() throws SAXException {\n this.startDocumentReceived = true;\n\n // Reset any previously set result.\n setResult(null);\n\n // Create the actual JDOM document builder and register it as\n // ContentHandler on the superclass (XMLFilterImpl): this\n // implementation will take care of propagating the LexicalHandler\n // events.\n this.saxHandler = new FragmentHandler(getFactory());\n super.setContentHandler(this.saxHandler);\n\n // And propagate event.\n super.startDocument();\n }", "public void markContentBegin() {\n this.ris.markContentBegin();\n }", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\t//\r\n\t\t//\t\t\t}\r\n\t\t//\t\t\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "@Override\r\n public void startDocument() throws SAXException {\n }", "public void startCDATA() throws SAXException {\n this.ensureInitialization();\n this.saxHandler.startCDATA();\n }", "@Override\n public void startDocument() throws SAXException {\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "public void startDocument() {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\t_attributes.clear();\n\t\t\t_root = null;\n\t\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override \n\t public void startDocument() throws SAXException {\n\t\t _data = new ArrayList<AlarmItemContent>();\n\t\t position = -1;\n\t }", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "@Override\n public void startDocument() throws SAXException {\n System.out.println(\"Start parsing document...\");\n nameList = new ArrayList<String>();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) {\n\t\tchars = new StringBuffer();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tbuilder = new StringBuilder();\n\t}", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "void start(Element e, Attributes attributes) {\n this.current = e;\n\n if (e.startElementListener != null) {\n e.startElementListener.start(attributes);\n }\n\n if (e.endTextElementListener != null) {\n this.bodyBuilder = new StringBuilder();\n }\n\n e.resetRequiredChildren();\n e.visited = true;\n }", "protected void startOutput() throws JspException, SAXException {\n if (uriExpr != null)\n uri = evalString(\"uri\", uriExpr);\n String prefix = null;\n if (nameExpr != null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1) {\n prefix = qname.substring(0, colonIndex);\n name = qname.substring(colonIndex + 1);\n } else\n name = qname;\n }\n if (attrExpr != null) {\n Object attrList = eval(\"attr\", attrExpr, Object.class);\n if (attrList instanceof AttributesImpl)\n attr = (AttributesImpl) attrList;\n else {\n attr = new AttributesImpl();\n StringTokenizer tokenizer\n = new StringTokenizer(attrList.toString());\n while (tokenizer.hasMoreTokens()) {\n String expr = tokenizer.nextToken();\n int dotIndex = expr.indexOf('.');\n String attrName = expr;\n if (dotIndex != -1)\n attrName = expr.substring(dotIndex + 1);\n expr = \"${\" + expr + \"}\";\n String attrValue = evalString(\"attr\", expr);\n attr.addAttribute(null, attrName, attrName,\n \"CDATA\", attrValue);\n }\n }\n }\n if (emptyExpr != null)\n empty = evalBoolean(\"empty\", emptyExpr);\n int nsIndex = -1;\n String oldUri = null;\n if (uri != null) {\n String qns = prefix != null ? \"xmlns:\" + prefix : \"xmlns\";\n String ns = prefix != null ? prefix : \"xmlns\";\n nsIndex = attr.getIndex(qns);\n if (nsIndex != -1) {\n oldUri = attr.getValue(nsIndex);\n attr.setValue(nsIndex, uri);\n } else {\n attr.addAttribute(null, ns, qns, \"CDATA\", uri);\n nsIndex = attr.getIndex(qns);\n }\n }\n if (attr == null)\n attr = new AttributesImpl();\n serializer.getHandler().startElement(uri, name, qname, attr);\n if (nsIndex != -1)\n if (oldUri != null)\n attr.setValue(nsIndex, oldUri);\n else\n attr.removeAttribute(nsIndex);\n if (!empty) {\n // workaround: force the serializer to close the start tag\n emptyComment();\n }\n }", "@Override\n\tprotected void start () {\n\t\tsuper.start();\t\t\n\t\tncName = mNode.getAttribute( AT_LINK_NAME );\n\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }", "@Override\n\t\t\t\tpublic void startDocument() throws SAXException {\n\t\t\t\t\tsuper.startDocument();\n\t\t\t\t\tbuilder = new StringBuilder();\n\t\t\t\t}", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite(\">\");\n\t\t\t}\n\t\t\telementLevel++;\n\t\t\t// nsSupport.pushContext();\n\n\t\t\twrite('<');\n\t\t\twrite(qName);\n\t\t\twriteAttributes(atts);\n\n\t\t\t// declare namespaces specified by the startPrefixMapping methods\n\t\t\tif (!locallyDeclaredPrefix.isEmpty()) {\n\t\t\t\tfor (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) {\n\t\t\t\t\tString p = e.getKey();\n\t\t\t\t\tString u = e.getValue();\n\t\t\t\t\tif (u == null) {\n\t\t\t\t\t\tu = \"\";\n\t\t\t\t\t}\n\t\t\t\t\twrite(' ');\n\t\t\t\t\tif (\"\".equals(p)) {\n\t\t\t\t\t\twrite(\"xmlns=\\\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrite(\"xmlns:\");\n\t\t\t\t\t\twrite(p);\n\t\t\t\t\t\twrite(\"=\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tchar ch[] = u.toCharArray();\n\t\t\t\t\twriteEsc(ch, 0, ch.length, true);\n\t\t\t\t\twrite('\\\"');\n\t\t\t\t}\n\t\t\t\tlocallyDeclaredPrefix.clear(); // clear the contents\n\t\t\t}\n\n\t\t\t// if (elementLevel == 1) {\n\t\t\t// forceNSDecls();\n\t\t\t// }\n\t\t\t// writeNSDecls();\n\t\t\tsuper.startElement(uri, localName, qName, atts);\n\t\t\tstartTagIsClosed = false;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "void startAll(GroupSG group) throws SAXException;", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "@Override\n public void startElement(String aUri, String aLocalName, String aName,\n Attributes aAttributes)\n throws SAXException\n {\n if (!inTextElement && TAG_TEI_DOC.equals(aName)) {\n if (useXmlId) {\n documentId = aAttributes.getValue(\"xml:id\");\n }\n else if (useFilenameId) {\n documentId = FilenameUtils.getName(currentResource.getPath()) + \"#\"\n + currentTeiElementNumber;\n }\n else {\n documentId = currentResource.getPath() + \"#\" + currentTeiElementNumber;\n }\n }\n else if (!inTextElement && TAG_TITLE.equals(aName)) {\n captureText = true;\n }\n else if (TAG_TEXT.equals(aName)) {\n captureText = true;\n inTextElement = true;\n }\n else if (inTextElement && (TAG_SUNIT.equals(aName) || \n (utterancesAsSentences && TAG_U.equals(aName)))) {\n sentenceStart = getBuffer().length();\n }\n else if (inTextElement && TAG_PARAGRAPH.equals(aName)) {\n paragraphStart = getBuffer().length();\n }\n else if (readNamedEntity && inTextElement && TAG_RS.equals(aName)) {\n NamedEntity ne = new NamedEntity(getJCas());\n ne.setBegin(getBuffer().length());\n ne.setValue(aAttributes.getValue(ATTR_TYPE));\n namedEntities.push(ne);\n }\n else if (readConstituent && inTextElement && TAG_PHRASE.equals(aName)) {\n if (constituents.isEmpty()) {\n ROOT root = new ROOT(getJCas());\n root.setConstituentType(\"ROOT\");\n constituents.push(new ConstituentWrapper(root));\n }\n \n Constituent constituent = new Constituent(getJCas());\n constituent.setConstituentType(aAttributes.getValue(ATTR_TYPE));\n constituent.setSyntacticFunction(aAttributes.getValue(ATTR_FUNCTION));\n constituents.push(new ConstituentWrapper(constituent));\n }\n else if (inTextElement\n && (TAG_WORD.equals(aName) || TAG_CHARACTER.equals(aName) || TAG_MULTIWORD\n .equals(aName))) {\n tokenStart = getBuffer().length();\n if (StringUtils.isNotEmpty(aAttributes.getValue(ATTR_POS))) {\n posTag = aAttributes.getValue(ATTR_POS);\n }\n else {\n posTag = aAttributes.getValue(ATTR_TYPE);\n }\n lemma = aAttributes.getValue(ATTR_LEMMA);\n }\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tcityNameList = new ArrayList<String>();\n\t\tcityCodeList = new ArrayList<String>();\n\t}", "public void startDocument() throws SAXException {\n super.startDocument();\n mThumbnailList = new ArrayList<ThumbnailMode>();\n }", "public void startDocument() {\n _root = null;\n _target = null;\n _prefixMapping = null;\n _parentStack = new Stack<>();\n }", "@Override\n public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n\n elementOn = true;\n\n if (localName.equals(\"begin\"))\n {\n data = new CallMTDGetterSetter();\n } else if (localName.equals(\"OHC_CALL_REPORT\")) {\n /**\n * We can get the values of attributes for eg. if the CD tag had an attribute( <CD attr= \"band\">Akon</CD> )\n * we can get the value \"band\". Below is an example of how to achieve this.\n *\n * String attributeValue = attributes.getValue(\"attr\");\n * data.setAttribute(attributeValue);\n *\n * */\n }\n }", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "@Override\r\n public void completeElementContent() {\r\n numBytes = 0;\r\n String theElementValue = this.getText();\r\n this.mySequenceFragment = theElementValue;\r\n myByteSpecifierSequence = new ArrayList<ByteSeqSpecifier>();\r\n StringBuffer allSpecifiers = new StringBuffer(theElementValue);\r\n while (allSpecifiers.length() > 0) {\r\n try {\r\n ByteSeqSpecifier bss = new ByteSeqSpecifier(allSpecifiers);\r\n myByteSpecifierSequence.add(bss);\r\n numBytes += bss.getNumBytes();\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n }", "public void startDocument ()\n throws SAXException\n {\n // no op\n }", "public void startDocument() throws SAXException {\n\t\ttry {\n\t\t\tlogger.info(\"Parsing XML buddies\");\n\t\t} catch (Exception e) {\n\t\t\tbuddies = null;\n\t\t\tthrow new SAXException(\"XMLBuddyParser error\", e);\n\t\t}\n\t}", "public void startElement(String localName) throws SAXException {\n\t\tstartElement(\"\", localName, \"\", EMPTY_ATTS);\n\t}", "private void readToStartFragment() throws XMLStreamException {\r\n\t\twhile (true) {\r\n\t\t\tXMLEvent nextEvent = eventReader.nextEvent();\r\n\t\t\tif (nextEvent.isStartElement()\r\n\t\t\t\t\t&& ((StartElement) nextEvent).getName().getLocalPart().equals(fragmentRootElementName)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "public void testMarkFragmentProcessedImmediatelyAfterMarkFragmentStart() throws Exception {\n\t\tmoveCursorBeforeFragmentStart();\n\n\t\tfragmentReader.markStartFragment();\n\t\tfragmentReader.markFragmentProcessed();\n\t\t\n\t\tfragmentReader.nextEvent(); // skip whitespace\n\t\t// the next element after fragment end is <misc2/>\n\t\tXMLEvent misc2 = fragmentReader.nextEvent(); \n\t\tassertTrue(EventHelper.startElementName(misc2).equals(\"misc2\"));\n\t}", "public void start() {\n \tupdateHeader();\n }", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "@Override\n public void writeStartDocument()\n throws XMLStreamException\n {\n if (mEncoding == null) {\n mEncoding = WstxOutputProperties.DEFAULT_OUTPUT_ENCODING;\n }\n writeStartDocument(mEncoding, WstxOutputProperties.DEFAULT_XML_VERSION);\n }", "@Override\n\tpublic void done() {\n\n\t\tswitch (state) {\n\t\tcase WAITING_FOR_TEXT_NODE:\n\t\t\t// Not seen a <text> node ? Just forward everything delayed.\n\t\t\tpassAllDelayed();\n\t\t\tbreak;\n\n\t\tcase WAITING_FOR_ROOT_NODE:\n\t\t\t// Not seen a root node ? Just forward everything delayed.\n\t\t\tpass(startOfText);\n\t\t\tpassAllDelayed();\n\t\t\tbreak;\n\n\t\tcase PASS_THROUGH:\n\t\tdefault:\n\t\t}\n\n\t\tsuper.done();\n\t}", "@Override\n\t\t\tpublic void contectStarted() {\n\n\t\t\t}", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "public void processStartChildElement(String uri, String localName, String qName, Attributes attributes)\n {\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "void startSequence(GroupSG group) throws SAXException;", "protected void notifyStart(\n )\n {\n for(IListener listener : listeners)\n {listener.onStart(this);}\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}", "public void fireDocumentInit() {\n\t\tsuper.fireDocumentInit();\n\t\ttheStructures.fireDocumentInit();\n\t}", "private void beforeAttributeNameState() throws SAXException, IOException {\n while (beforeAttributeNameStateImpl()) {\n // Spin.\n }\n }", "public void start() {\n\n System.out.println(\"Esto no debe salir por consola al sobreescribirlo\");\n\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"文档解析完成\");\n\t}", "public void onBegin() {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) {\n // Using qualified name because we are not using xmlns prefixes here.\n if (qName.equals(\"title\")) {\n title = true;\n }\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}", "public void flushEvent()\n throws SAXException;", "@Override\r\n\tpublic void tellStarting() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t\t// Not used here\r\n\t}", "public void startElement( String uri, String localName, String qName, Attributes attributes )\n throws SAXException\n {\n if( inProlog ) {\n endProlog( uri, localName, qName, attributes );\n }\n\n super.startElement( uri, localName, qName, attributes );\n }", "@Override\r\n public void endDocument() throws SAXException {\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n//\t\ttag=localName;\n//\t\t\tif(localName.equals(\"nombre\")){\n//\t\t\t\tSystem.out.print(\"AUTOR :\");\n//\t\t\t}\n//\t\t\tif(localName.equals(\"descripcion\")){\n//\t\t\t\tSystem.out.print(\"Descripcion:\");\n//\t\t\t}\n\t\t\tswitch(localName){\n\t\t\tcase \"autor\":\n\t\t\t\tautor=new Autor(\"\",attributes.getValue(\"url\"),\"\");\n\t\t\t\tbreak;\n\t\t\tcase \"frase\":\n\t\t\t\tfrase=new Frase(\"\",\"\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(localName.equals(\"autor\")){\n\t\t\t\t\n\t\t\t\t//url=attributes.getValue(\"url\");\n\t\t\t}\n\t\t\t//System.out.println(\"Start \"+localName);\n\t}", "@Override\n public void endDocument() throws SAXException {\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes attributes) {\n chars = new StringBuilder();\n }", "@Override\n\tpublic void startElement(final String uri, final String localName, final String qName,\n\t\t\tfinal Attributes attributes) throws SAXException {\n\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\n\t\tmatrixExistsAtDepth[tagDepth] = false;\n\t\tmCurrentElement = localName;\n\t\tmProperties.svgStyle = new SvgStyle(mStyleParseStack.peek());\n\n\t\tif (mPrivateDataNamespace != null && qName.startsWith(mPrivateDataNamespace)) {\n\t\t\tmPrivateDataCurrentKey = localName;\n\t\t}\n\t\telse {\n\t\t\tmPrivateDataCurrentKey = null;\n\t\t}\n\n\t\tif (localName.equalsIgnoreCase(STARTTAG_SVG)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tsvg();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_G)) {\n\t\t\tparseAttributes(attributes);\n\t\t\taddBeginGroup(mProperties.id);\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_PATH)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpath();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RECT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\trect();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tline();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_POLYGON)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tpolygon();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_CIRCLE)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tcircle();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TEXT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttext_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_TSPAN)) {\n\t\t\tparseAttributes(attributes);\n\t\t\ttspan_element();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_LINEARGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tlinearGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_RADIALGRADIENT)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tradialGradient();\n\t\t}\n\t\telse if (localName.equalsIgnoreCase(STARTTAG_STOP)) {\n\t\t\tparseAttributes(attributes);\n\t\t\tgradientStop();\n\t\t}\n\n\t\tmStyleParseStack.add(mProperties.svgStyle);\n\t\ttagDepth++;\n\t}", "public void xmlImportFinished(Node node, CoXmlContext context) throws CoXmlReadException {\n\t}", "private void reportDocumentStarted(Attributes attributes) {\n\t\tString subcorpus = getAttValue(attributes, \"subcorpus\");\n\t\tString id = getAttValue(attributes, \"id\");\n\t\tString bronentitel = getAttValue(attributes, \"bronentitel\");\n\t\tString auteur = getAttValue(attributes, \"auteur\", getAttValue(attributes, \"auteurwebtekst\"));\n\t\tcurrentDocumentName = subcorpus + \" \" + id + \" (\\\"\" + bronentitel + \"\\\", \" + auteur + \")\";\n\t\tindexer.getListener().documentStarted(currentDocumentName);\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\tif (localName.equals(\"Document\")) {\n\t\t\tthis.in_documenttag = true;\n\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\tthis.in_placemarktag = true;\n\t\t\tif ( atts.getLength() > 0 && null != atts.getValue(\"id\") ) {\n\t\t\t\tdpm.setId( atts.getValue(\"id\") );\n\t\t\t}\n\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\tif (this.in_foldertag) {\n\t\t\t\t// put the previous folder on the stack - hopefully it has a frickin name already!\n\t\t\t\tfolderStack.add(folderStack.size(), folder);\n\t\t\t\tfolder = new Folder(); // takes place of outer/trail folder\n\t\t\t}\n\t\t\tthis.in_foldertag = true;\n\t\t} else if (localName.equals(\"description\")) {\n\t\t\tthis.in_descriptiontag = true;\n\t\t} else if (localName.equals(\"name\")) {\n\t\t\tif (in_placemarktag) {\n\t\t\t\tthis.in_placemarknametag = true;\n\t\t\t} else if (in_foldertag) {\n\t\t\t\tthis.in_foldernametag = true;\n\t\t\t} else if (in_documenttag) {\n\t\t\t\tthis.in_documentnametag = true;\n\t\t\t}\n\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\tthis.in_coordinatestag = true;\n\t\t} else if (localName.equals(\"Address\")) {\n\t\t\tthis.in_addresstag = true;\n\t\t} else {\n\n\t\t}\n\t}", "public void startElement(String uri, String localName,String qName,\n Attributes attributes) throws SAXException {\n\n if(qName.equalsIgnoreCase(\"sce:PLPExtract\") | (qName.equalsIgnoreCase(\"sce:Payload\"))\n | (qName.equalsIgnoreCase(\"sce:Header\"))) {\n return;\n }\n\n builder.append(\"<\").append(qName).append(\">\");\n\n if (qName.equalsIgnoreCase(\"sce:mRID\")) {\n mRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:aliasName\")) {\n aliasName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:name\")) {\n name = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:grandFatherFlag\")) {\n grandFather = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:type\")) {\n pType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:value\")) {\n value = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:baseKind\")) {\n baseKind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:classification\")) {\n classification = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:unit\")) {\n unit = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:speciesType\")) {\n speciesT = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:rSMVal\")) {\n rSMVal = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:specialProjectName\")) {\n specialProj = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:currentRating\")) {\n cRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:inServiceRating\")) {\n iRating = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highWindFlag\")) {\n highWind = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:highFireFlag\")) {\n highFire = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:srsName\")) {\n srsName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:xPosition\")) {\n xPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:yPosition\")) {\n yPos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:description\")) {\n desc = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:street\")) {\n street = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:city\")) {\n city = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:mapRefNumber\")) {\n mapRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:installationDate\")) {\n installDate = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:symbolRef\")) {\n symbolRef = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:orientation\")) {\n orientation = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:substationMRID\")) {\n substationMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:owner\")) {\n owner = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ownerType\")) {\n ownerType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:ratedVoltage\")) {\n ratedVoltage = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:pos\")) {\n pos = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:bundleType\")) {\n bundleType = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitName\")) {\n circuitName = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:circuitSection\")) {\n circuitSection = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:material\")) {\n material = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:size\")) {\n size = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:quantity\")) {\n quantity = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:phase\")) {\n phase = true;\n }\n\n if (qName.equalsIgnoreCase(\"gml:posList\")) {\n posList = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:no_of_wires\")) {\n no_of_wires = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:commIndicator\")) {\n commIndicator = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:structureID\")) {\n structureID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:strucRefMRID\")) {\n strucRefMRID = true;\n }\n\n if (qName.equalsIgnoreCase(\"sce:serviceType\")) {\n serviceType = true;\n }\n\n }", "public void endDocument()\n throws SAXException {\n try { \n resource.setContent(newContent.toString());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }" ]
[ "0.71910566", "0.6121953", "0.609153", "0.5992236", "0.5934238", "0.5873892", "0.5814945", "0.5800353", "0.5740324", "0.57257277", "0.5706173", "0.56947345", "0.5672548", "0.5672548", "0.5672548", "0.5654781", "0.5641436", "0.5634116", "0.5629872", "0.5629038", "0.562608", "0.5621321", "0.5613706", "0.5602846", "0.56014645", "0.5595779", "0.55854636", "0.55738425", "0.55543375", "0.5550091", "0.5550091", "0.55347395", "0.5532042", "0.5403052", "0.53918934", "0.53872687", "0.53797853", "0.5358643", "0.53557247", "0.5353317", "0.5351522", "0.5337766", "0.53366584", "0.5332183", "0.5317621", "0.53138167", "0.5306946", "0.5306018", "0.5301404", "0.52970326", "0.52807564", "0.5276585", "0.52655697", "0.525933", "0.5257646", "0.5244601", "0.5202287", "0.5179571", "0.5159969", "0.51594776", "0.5155442", "0.51122814", "0.50965667", "0.50934285", "0.5086906", "0.50732476", "0.5070913", "0.5062389", "0.50590855", "0.5053733", "0.50483036", "0.5047474", "0.50436157", "0.5040334", "0.50353956", "0.5002904", "0.5000283", "0.4990496", "0.49864426", "0.49809918", "0.49809813", "0.49604407", "0.49589664", "0.4954077", "0.4953947", "0.49362013", "0.49288353", "0.4921602", "0.49174473", "0.49131796", "0.49096957", "0.49004918", "0.48972082", "0.48899564", "0.48884076", "0.48884076", "0.48884076", "0.48857275", "0.4870807", "0.48595756" ]
0.620784
1
Evaluate a usewhen attribute
public Expression prepareUseWhen(String expression, UseWhenStaticContext staticContext, SourceLocator sourceLocator) throws XPathException { // TODO: The following doesn't take account of xml:base attributes staticContext.setBaseURI(sourceLocator.getSystemId()); staticContext.setDefaultElementNamespace(NamespaceConstant.NULL); for (int i=defaultNamespaceStack.size()-1; i>=0; i--) { String uri = (String)defaultNamespaceStack.get(i); if (uri != null) { staticContext.setDefaultElementNamespace(uri); break; } } Expression expr = ExpressionTool.make(expression, staticContext, staticContext, 0, Token.EOF, sourceLocator); expr.setContainer(staticContext); return expr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface When {\r\n \t/** Returns the condition. In a \"when x then a\" clause\r\n * the condition is \"x\".\r\n \t */\r\n public Object getCondition();\r\n /** Returns the value. In a \"when x then a\" clause\r\n * the condition is \"a\".\r\n */\r\n public Object getValue();\r\n }", "public void addWhen(Object pCondition, Object pValue);", "public Predicate<T> getWhen() {\r\n\t\treturn when;\r\n\t}", "public SaleClassifyGoodExample when(boolean condition, IExampleWhen then) {\n if (condition) {\n then.example(this);\n }\n return this;\n }", "boolean isSatisfiable(ConditionContext context);", "public void setWhen(long when) {\n this.when = when;\n }", "@When(\"Try to Analysis\")\npublic void tryanalysis(){\n}", "void activate(ConditionContext context);", "@Then(\"conditions for alarm are displaying\")\n public void conditions_for_alarm_are_displaying() {\n }", "public SaleClassifyGoodExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {\n if (condition) {\n then.example(this);\n } else {\n otherwise.example(this);\n }\n return this;\n }", "public void addWhen(When pWhen);", "@Override\n\tpublic void visit(WhenClause arg0) {\n\t\t\n\t}", "public LitemallTypeRoleExample when(boolean condition, IExampleWhen then) {\n if (condition) {\n then.example(this);\n }\n return this;\n }", "public void learnValue(final Calendar when, final double val);", "public LitemallOrderExample when(boolean condition, IExampleWhen then) {\n if (condition) {\n then.example(this);\n }\n return this;\n }", "@Override\n\tpublic void visit(WhenClause arg0) {\n\n\t}", "public final void mT__76() throws RecognitionException {\r\n try {\r\n int _type = T__76;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:73:7: ( 'when' )\r\n // ../org.openmodelica.modelicaml.editor.xtext.modification.ui/src-gen/org/openmodelica/modelicaml/editor/xtext/modification/ui/contentassist/antlr/internal/InternalModification.g:73:9: 'when'\r\n {\r\n match(\"when\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "String getCondition();", "EventUses createEventUses();", "public long getWhen() {\n return when;\n }", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "public LitemallTypeRoleExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {\n if (condition) {\n then.example(this);\n } else {\n otherwise.example(this);\n }\n return this;\n }", "SqlCaseWhen createSqlCaseWhen();", "@When(\"Try to Access & exfiltrate data within the victim's security zone\")\npublic void tryaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "boolean hasUses();", "public void setWhenGiven(org.hl7.fhir.Period whenGiven)\n {\n generatedSetterHelperImpl(whenGiven, WHENGIVEN$8, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public double evaluate(Context context);", "@Given(\"prepare to Access & exfiltrate data within the victim's security zone\")\npublic void preaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "public Object getCondition();", "public interface Case {\r\n\t/** Interface of a single \"when x then a\" clause.\r\n\t */\r\n public interface When {\r\n \t/** Returns the condition. In a \"when x then a\" clause\r\n * the condition is \"x\".\r\n \t */\r\n public Object getCondition();\r\n /** Returns the value. In a \"when x then a\" clause\r\n * the condition is \"a\".\r\n */\r\n public Object getValue();\r\n }\r\n\r\n /** Sets the value being checked.\r\n */\r\n public void setCheckedValue(Object pValue);\r\n /** Returns the value being checked.\r\n */\r\n public Object getCheckedValue();\r\n /** Adds a new clause \"when pCondition then pValue\".\r\n */\r\n public void addWhen(Object pCondition, Object pValue);\r\n /** Adds a new when clause.\r\n */\r\n public void addWhen(When pWhen);\r\n /** Sets the value for the \"else\" clause.\r\n */\r\n public void setElseValue(Object pValue);\r\n /** Returns the value for the \"else\" clause.\r\n */\r\n public Object getElseValue();\r\n /** Returns the case clauses type.\r\n */\r\n public Column.Type getType();\r\n /** Returns the array of \"when\" clauses.\r\n */\r\n public When[] getWhens();\r\n}", "private static void useSupplier(Supplier<Integer> expression){}", "Evaluator getRequiresEvaluator()\n{\n return new Requires();\n}", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "private static Object readAttributeUsingPattern(final MBeanServerConnection mbeanServer, Map<String, ?> context,\n final ObjectInstance discoveredObject, final String attributeName,\n boolean optional) throws StatsCollectionFailedException {\n try {\n // for complex attributes, special logic\n return Eval.evaluate(mbeanServer, context, discoveredObject, attributeName, optional);\n } catch (Exception e) {\n LOG.error(\"Failed to fetch data for, objectName: \" + discoveredObject.getObjectName() + \", attributeName: \" +\n attributeName + \", error: \" + e.getMessage());\n throw new StatsCollectionFailedException(\"Failed to fetch data for, objectName: \" +\n discoveredObject.getObjectName() + \", attributeName: \"\n + attributeName, e);\n }\n }", "public LitemallOrderExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {\n if (condition) {\n then.example(this);\n } else {\n otherwise.example(this);\n }\n return this;\n }", "java.lang.String getCondition();", "@Override\n\tpublic int evaluate(Map<ResourceType, Integer> requirements) {\n\t\treturn this.constant;\n\t}", "protected abstract SoyValue compute();", "WhenList createWhenList();", "@When(\"Try to Attempt well-known or guessable resource locations\")\npublic void tryattemptwellknownorguessableresourcelocations(){\n}", "public UseCaseExecution(UseCase<UseCaseResponse<T>> useCase) {\n this.useCase = useCase;\n }", "public static EstimatingTechnique get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tEstimatingTechnique result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Statement getThenStm();", "io.grpc.user.task.PriceCondition getCondition();", "public TCpyBankCreditExample when(boolean condition, IExampleWhen then) {\n if (condition) {\n then.example(this);\n }\n return this;\n }", "public void setUsageWeighted(boolean aUsageWeighted) {\n usageWeighted = aUsageWeighted; \n }", "public abstract String use();", "public Rule incUsing()\n \t{\n \t\treturn enforcedSequence(\n \t\t\t\tKW_USING,\n \t\t\t\toptional(ffi()),\n \t\t\t\toptional(id()), // Not optional, but we want a valid ast for completion if missing\n \t\t\t\tzeroOrMore(sequence(DOT, id())),// not enforced to allow completion\n \t\t\t\toptional(sequence(SP_COLCOL, id())),// not enforced to allow completion\n \t\t\t\toptional(usingAs()),\n \t\t\t\toptional(eos()));\n \t}", "@Then(\"Assert the success of Access & exfiltrate data within the victim's security zone\")\npublic void assaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "public CodeableConcept use() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_USE);\n }", "public boolean definesTargetAttribute(String name);", "public Date getWhen();", "public Resource used(Resource activity, Resource entity) {\n return createStatement(activity.getURI(),\n ProvOntology.getUsedStartingPointPropertyFullURI(), entity.getURI());\n }", "@JsonIgnore\n public boolean isOndemandSet() {\n return isSet.contains(\"ondemand\");\n }", "void bind_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, RakudoObject value);", "@When(\"Try to Attempt sending crafted records to DNS cache\")\npublic void tryattemptsendingcraftedrecordstodnscache(){\n}", "@When(\"user calls {string} with {string} http request\")\n public void user_calls_with_http_request(String resource, String method) {\n System.out.println(\"When\");\n\n APIResourcesEnum apiresource=APIResourcesEnum.valueOf(resource);\n System.out.println(apiresource.getResource());\n\n\n if(method.equalsIgnoreCase(method))\n response=reqSpec.when().post(apiresource.getResource());\n else if(method.equalsIgnoreCase(method))\n response= reqSpec.when().get(apiresource.getResource());\n\n\n // throw new io.cucumber.java.PendingException();\n }", "public synchronized long getWhen() {\n return when;\n }", "UsabilityRequirement createUsabilityRequirement();", "public final void mT__155() throws RecognitionException {\n try {\n int _type = T__155;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:153:8: ( 'when' )\n // InternalMyDsl.g:153:10: 'when'\n {\n match(\"when\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public interface UseExpression {\n public boolean release(Hero hero, Monster monster, MainGameActivity context, Skill skill);\n}", "void fulfill( AvailabilityRequirement requirement );", "public boolean getUseTimings()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USETIMINGS$22);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(USETIMINGS$22);\n }\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "private Expression transform(Expression exp)\n {\n return UseContracts.execute(exp, fun, callers);\n }", "@Given(\"prepare to Analysis\")\npublic void preanalysis(){\n}", "protected Object subEval(EvalContext ctx, boolean forValue) {\n T.fail(\"A DelayedExpr isn't eval-able\");\n return null; //make compiler happy\n }", "public boolean isMet();", "public org.hl7.fhir.Period getWhenGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Period target = null;\n target = (org.hl7.fhir.Period)get_store().find_element_user(WHENGIVEN$8, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "@When(\"User clicks rate\")\n\tpublic void user_clicks_rate() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "public boolean isFormulaUsed() {\n return getBooleanProperty(\"IsFormulaUsed\");\n }", "ConditionFactory getConditionFactory();", "@Then(\"Assert the success of Attempt well-known or guessable resource locations\")\npublic void assattemptwellknownorguessableresourcelocations(){\n}", "boolean populateValue(Metric metric) throws MetricException;", "private Object readAttributeUsingPattern(MBeanServerConnection mbeanServer, Map<String, ?> context,\n ObjectInstance observation) throws StatsCollectionFailedException {\n return readAttributeUsingPattern(mbeanServer, context, observation, getAttributeName(), isOptional());\n }", "boolean isMet();", "@When(\"^the user retrieves \\\"([^\\\"]*)\\\" by \\\"([^\\\"]*)\\\"$\")\npublic void the_user_retrieves_by(String arg1, String arg2) throws Throwable {\n throw new PendingException();\n}", "@Override\n public void setVisibleWhen(MExpression arg0)\n {\n \n }", "@Given(\"prepare to Attempt well-known or guessable resource locations\")\npublic void preattemptwellknownorguessableresourcelocations(){\n}", "public void setUseTimings(boolean useTimings)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USETIMINGS$22);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(USETIMINGS$22);\n }\n target.setBooleanValue(useTimings);\n }\n }", "public double predict(final Calendar when);", "public T caseWhenStatement(WhenStatement object) {\n\t\treturn null;\n\t}", "public TCpyBankCreditExample when(boolean condition, IExampleWhen then, IExampleWhen otherwise) {\n if (condition) {\n then.example(this);\n } else {\n otherwise.example(this);\n }\n return this;\n }", "public interface AttributeFun {\n}", "public void use(Context context)\n {\n useImplementation.use(context);\n }", "public void employeeAttendanceUsingCase() {\n\t\tswitch (randomCheck) {\n\t\tcase 1:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcheckAttendance();\n\t\t\tcalculatingDailyWage();\n\t\t}\n\t}", "java.lang.String getHowToUse();", "java.lang.String getHowToUse();", "public boolean containAttribute(String name);", "@Then(\"causes are displaying\")\n public void causes_are_displaying() {\n }", "public interface IUseCase {\n\n void execute();\n}", "ResourceRequirement getRequirementFor(AResourceType type);", "public interface AttrValue {\n\n /**\n * 执行属性规则\n *\n * @return 返回Map以attrName为Key属性值正确的格式为value\n */\n Object getAttrValue(Map<String, Object> attrValueContext, String empId) throws Exception;\n\n /**\n * 获取属性的排序\n *\n * @return 排序值越小越靠前\n */\n int getOrder();\n\n}", "@Then(\"Assert the success of Analysis\")\npublic void assanalysis(){\n}", "public interface CheckSystemHealthUseCase extends UseCase {\n void execute(final Callback callback, boolean showLoader);\n\n interface Callback {\n void onError(AppErrors error);\n\n\n void onSystemHealth(SystemHealth health);\n }\n}", "boolean isTargetStatistic();", "public void setThenStm(Statement thenStm);", "Object getAttribute(int attribute);" ]
[ "0.5473915", "0.5104786", "0.50544494", "0.49978736", "0.48645696", "0.4862133", "0.48111165", "0.4730599", "0.4719357", "0.46849436", "0.46846905", "0.46799564", "0.46738032", "0.46685958", "0.46396855", "0.46328995", "0.45842463", "0.4524507", "0.4473879", "0.44710547", "0.44546488", "0.4442659", "0.44354323", "0.44345385", "0.44334084", "0.44258893", "0.44201034", "0.43950748", "0.4387096", "0.43626672", "0.43570346", "0.43303078", "0.4324402", "0.4324402", "0.4324402", "0.4324402", "0.43194142", "0.43062487", "0.42934227", "0.4271824", "0.42611197", "0.4259667", "0.42556286", "0.42501336", "0.4234248", "0.4224634", "0.42227858", "0.42206982", "0.41946614", "0.41894436", "0.4160498", "0.4159159", "0.4153069", "0.41524175", "0.4140682", "0.41401303", "0.41297463", "0.41213936", "0.41180918", "0.41158038", "0.41133678", "0.41087696", "0.4108623", "0.41080153", "0.40962657", "0.40818283", "0.4080726", "0.40636274", "0.405761", "0.40543136", "0.40533027", "0.4051143", "0.40480655", "0.40470394", "0.40430242", "0.40345627", "0.40342188", "0.4032386", "0.40296525", "0.40266874", "0.40246418", "0.40185416", "0.40115023", "0.4009603", "0.40059063", "0.40058085", "0.40009102", "0.39874882", "0.39868975", "0.39868975", "0.39825824", "0.39770535", "0.3970087", "0.3965808", "0.3963945", "0.39639366", "0.39622623", "0.39604673", "0.39553148", "0.3953936" ]
0.4535452
17
Get the Password for the specified User.
public String getPassword(final String username) { final Login login = this.getLogin(username); if (login != null) { return login.getPassword(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getUserPassword(String user) {\r\n return userInfo.get(user);\r\n }", "public String getUserPassword() {\n return sp.getString(USER_PASSWORD, null);\n }", "public String getUserPassword() {\r\n return userPassword;\r\n }", "public String getUserPassword() {\n\t\treturn userPassword;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}", "private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public java.lang.String getPassword();", "void retrievePassWord(User user);", "public String getPassword() throws Exception\r\n\t{\r\n\t\tString SQL_USER = \"SELECT password FROM user WHERE id=?;\";\t\t\r\n\t\tString returnValue = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\t\t\tstatement.setInt(1, userId);\r\n\t\t\tResultSet result = statement.executeQuery();\r\n\r\n\t\t\t// If this returns true, then the user already exists.\r\n\t\t\tif (!result.next())\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception(\"No student found! (getPassword)\");\r\n\t\t\t}\r\n\r\n\t\t\t// Return the successfully user.\r\n\t\t\treturnValue = result.getString(\"password\");\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in getPassword()\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "String getUserPassword();", "@Override\n\tpublic String getUsePwdByUserId(String userId) {\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"userId\", userId);\n\t\tString sql = \"select *from tp_users where userId = :userId\";\n\t\tList<Map<String, Object>> list = joaSimpleDao.queryForList(sql, map);\n\t\treturn list.get(0).get(\"userPwd\").toString();\n\t}", "public String getUserPwd() {\n return userPwd;\n }", "public String getPassword(String userEmail) {\r\n // If given email is an existing client, get a Client object associated with\r\n // it from storage\r\n if (getClient(userEmail) != null) {\r\n return sqlExecutor.selectRecords(\"clients\", \"email\", userEmail).getString(7);\r\n } else {\r\n // If client does not exist\r\n return null;\r\n }\r\n }", "public String getPassword() {\n return (String) getObject(\"password\");\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public String getPassword(String username) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n UserProfile user = getUserProfile(username); // a little hacky but it works\n int userID = user.getID();\n Criteria crit = session.createCriteria(UserPassword.class);\n crit.add(Restrictions.eq(\"user.id\", userID));\n List<UserPassword> passList = crit.list();\n \n if (passList.isEmpty()){\n session.close();\n throw new DAOException( \n String.format(\"getPassword: No password for account with username '%s'\",\n username));\n } \n \n UserPassword uPass = passList.get(0);\n session.evict(uPass);\n session.close();\n return uPass.getPass();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }", "public static String getPassword(int userId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountUserId(userId);\n // if it is a valid user id, establish a connection\n if (cdt1) {\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n String hashPassword = DatabaseSelector.getPassword(userId, connection);\n connection.close();\n return hashPassword;\n }\n return null;\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "public UTF8String getUserPass() {\n return this.userPass;\n }", "public String getPassword() {\n Object ref = password_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPassword() {\n Object ref = password_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n password_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }", "public String getPassword();", "public String getPassword();", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\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 passwd_ = s;\n }\n return s;\n }\n }", "static String retrievePassword(String username) {\r\n User lostUser = accounts.get(username);\r\n return lostUser.getPassword();\r\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "public String getUserPass() {\n\t\treturn passText.getText().toString();\n\t}", "public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n passwd_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public PasswordCredential getPasswordCredential() {\n return passCred;\n }", "public String getPassword() {\n\t\treturn String.valueOf(password.getPassword());\n\t}", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public String getPassword(String userId, String email) {\n\t\t\n\t\tConnection con = getConnection();\n\t\tMemberDAO memberDAO = MemberDAO.getInstance();\n\t\tmemberDAO.setConnection(con);\n\t\t\n\t\tString pass=memberDAO.selectMemberPass(userId,email);\n\t\t\n\t\tclose(con);\n\t\t\n\t\treturn pass;\n\t}", "public String getPassword() {\n return instance.getPassword();\n }", "public String getPassword() {\n return instance.getPassword();\n }", "@Override\r\n\tpublic User getUseByUsernameAndPassword(User user) {\n\t\tString sql = \"select id,username,password,email from user where username=? and password=?\";\r\n\t\t\r\n\t\treturn this.queryOne(sql,user.getUsername(),user.getPassword());\r\n\t}", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final String getPassword() {\n return properties.get(PASSWORD_PROPERTY);\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswdBytes() {\n java.lang.Object ref = passwd_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n passwd_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static User.UserType isPasswordCorrect(User user) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n String query = \"SELECT * FROM auttc_users.users \"\n + \"WHERE username = ?\";\n \n try {\n ps = connection.prepareStatement(query);\n ps.setString(1, user.getUsername());\n rs = ps.executeQuery();\n \n String dbPassword;\n while (rs.next()) {\n dbPassword = rs.getString(\"password\");\n if (dbPassword.equals(user.getPassword())) {\n System.out.println(rs.getInt(\"admin\"));\n if (0 == rs.getInt(\"admin\")) \n {\n return User.UserType.USER;\n } else {\n \n return User.UserType.ADMIN;\n }\n }\n }\n return User.UserType.NONE;\n \n } catch (SQLException e) {\n System.out.println(e);\n return User.UserType.NONE;\n } finally {\n DBUtil.closeResultSet(rs);\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "com.google.protobuf.ByteString\n getPasswordBytes();", "public com.google.protobuf.ByteString\n getPasswdBytes() {\n java.lang.Object ref = passwd_;\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 passwd_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n Object ref = password_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPassword()\n \t{\n \t\treturn password;\n \t}", "@Override\n @SuppressWarnings(\"unchecked\")\n public String getPassword(int userID) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserPassword.class);\n //UserProfile user = getUserProfile(userID);\n crit.add(Restrictions.eq(\"user.ID\", userID));\n List<UserPassword> passList = crit.list();\n \n if (passList.isEmpty()){\n session.close();\n throw new DAOException( \n \"getPassword: No password for account with ID \" + userID);\n } \n \n UserPassword uPass = passList.get(0);\n session.evict(uPass);\n session.close();\n return uPass.getPass();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n java.lang.Object ref = password_;\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 password_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPassword() {\n return mPassword;\n }", "com.google.protobuf.ByteString\n getPasswdBytes();", "public String getPassword() {\n\treturn strPasswd;\n }", "public String getPassword() {\r\n\t\treturn mPassword;\r\n\t}", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public com.google.protobuf.ByteString\n getPasswordBytes() {\n return instance.getPasswordBytes();\n }", "public java.lang.String getPwd() {\n java.lang.Object ref = pwd_;\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 pwd_ = s;\n return s;\n }\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public java.lang.String getPassword() {\r\n return password;\r\n }", "public String getPassword()\n {\n return _password;\n }" ]
[ "0.7778568", "0.73542356", "0.7080851", "0.7045912", "0.7037724", "0.69499284", "0.6906488", "0.67771405", "0.67771405", "0.67771405", "0.67771405", "0.67771405", "0.67771405", "0.67771405", "0.66603696", "0.6629141", "0.66082585", "0.6574305", "0.656453", "0.6556471", "0.6483686", "0.6469503", "0.64134336", "0.64016503", "0.64016503", "0.638428", "0.638428", "0.638428", "0.6379886", "0.6367685", "0.6367685", "0.6367685", "0.6367278", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63661104", "0.63637924", "0.6354267", "0.6349261", "0.6349261", "0.63462317", "0.63461715", "0.6329284", "0.6329284", "0.6296891", "0.62679046", "0.6261773", "0.62459433", "0.6239785", "0.62252736", "0.62245744", "0.61845875", "0.61845875", "0.61845875", "0.61845875", "0.61845875", "0.61845875", "0.61845875", "0.61814654", "0.61813545", "0.61813545", "0.61790913", "0.6174691", "0.617262", "0.61591923", "0.6154255", "0.6154255", "0.6154255", "0.6154255", "0.6154255", "0.61535984", "0.6153381", "0.6152987", "0.61402583", "0.6134356", "0.6134356", "0.6125724", "0.6125428", "0.61253315", "0.6122234", "0.6115355", "0.6115355", "0.6115355", "0.6115355", "0.6115355", "0.6114065", "0.61116374", "0.60911304", "0.60822606", "0.60803443", "0.60803443", "0.6059941", "0.6051453", "0.6051453", "0.60472894" ]
0.0
-1
Gets the Email address for the specified User.
public String getEmailForUser(final String username) { final Login login = this.getLogin(username); if (login != null) { return login.getEmail().getEMailAddress(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getEmailAddress(final IUser iUser) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<String>() {\r\n public String call() {\r\n try {\r\n return iUser.getEMailAddress();\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 static String getUserEmail ( final User user ) {\n if ( user == null ) {\n return null;\n }\n\n final Patient pat = Patient.getPatient( user.getUsername() );\n final Personnel per = Personnel.getByName( user.getUsername() );\n if ( null != pat ) {\n return pat.getEmail();\n }\n if ( null != per ) {\n return per.getEmail();\n }\n\n return null;\n }", "private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}", "public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUserEmail() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }", "public String getUserEmail() {\n return sharedPreferences.getString(PREFERENCE_USER_EMAIL, \"\");\n }", "public java.lang.String getUserEmail() {\r\n return userEmail;\r\n }", "public com.google.protobuf.ByteString\n getUserEmailBytes() {\n java.lang.Object ref = userEmail_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n userEmail_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "java.lang.String getUserEmail();", "public com.google.protobuf.ByteString\n getUserEmailBytes() {\n java.lang.Object ref = userEmail_;\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 userEmail_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getEmailAddress();", "public String getEmail() {\n return userItem.getEmail();\n }", "public String getUserEmail() {\r\n return userEmail;\r\n }", "public String getUserEmail() {\r\n return userEmail;\r\n }", "public String getUserEmail() {\n return userEmail;\n }", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "public static synchronized String getEmailByUserID(int user_ID){\n\t\t\n\t\t\tString email = \"\";\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select Email From credential Where User_ID = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1, user_ID);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\temail = rs.getString(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn email;\n\t\t\t\n\t}", "public static String getEmailFromUsername(String username)\r\n\t{\r\n\t\treturn usernameToEmail.get(username);\r\n\t}", "@AutoEscape\n\tpublic String getEmail_address();", "public java.lang.String getEmailAddress() {\n return EmailAddress;\n }", "String getUserMail();", "@Override\n public String getEmailAddress() {\n\n if(this.emailAddress == null){\n\n this.emailAddress = TestDatabase.getInstance().getClientField(token, id, \"emailAddress\");\n }\n\n return emailAddress;\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }", "public String getUserEmail(String userId)\n {\n return null;\n }", "public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}", "public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }", "public static String getUserEmail() {\r\n return null;\r\n }", "public java.lang.String getEmailAddress()\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tint length = emailAddress.length();\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t\tresult = emailAddress;\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\t//char asterisk = emailAddress.charAt(i);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn result;\r\n\t\t\t\r\n\t}", "@JsonIgnore\r\n public String getEmailAddress() {\r\n return OptionalNullable.getFrom(emailAddress);\r\n }", "public String getFromEmailAddress() {\n return getValue(\"eurekaclinical.userservice.email.from\");\n }", "public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}", "public static String getEmailAddress(final ITask iTask) {\r\n if (iTask.getActivator().getSecurityContext() != null\r\n && iTask.getActivator().getSecurityContext().getUsers() != null\r\n && iTask.getActivator().getSecurityContext().getUsers().size() > 0) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<String>() {\r\n public String call() {\r\n try {\r\n String st = iTask.getActivator().getMemberName();\r\n List<IUser> l = iTask.getActivator().getSecurityContext().getUsers();\r\n for (IUser user : l) {\r\n if (st.equals(user.getMemberName())) {\r\n return user.getEMailAddress();\r\n }\r\n }\r\n return st;\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 } else {\r\n return null;\r\n }\r\n }", "public String getUserEmailAdress() throws Exception\r\n {\n return null;\r\n }", "public String getEmailAddress() {\r\n\t\treturn emailAddress;\r\n\t}", "public String getEmailAddress();", "public String getEmailAddressOfCustomer()\n\t{\n\t\treturn getEmailAddressOfCustomer( getSession().getSessionContext() );\n\t}", "com.google.protobuf.ByteString\n getUserEmailBytes();", "public String getEmailAddress() {\r\n return emailAddress;\r\n }", "public String getEmailAddress() {\n return EmailAddress.commaSeperateList(this.emailAddressList);\n }", "public String getEmailAddressOfCustomer(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAILADDRESSOFCUSTOMER);\n\t}", "public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }", "public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}", "public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}", "public static String getCurrUserEmail() {\n String userEmail;\n try {\n userEmail = FirebaseAuth.getInstance().getCurrentUser().getEmail();\n } catch (Exception e) {\n userEmail = null;\n }\n return userEmail;\n }", "public String getEmailAddress() {\n return this.emailAddress;\n }", "public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }", "public final String getEmail() {\n return email;\n }", "public String getEmail()\n {\n return emailAddress;\n }", "public String getEmailAddress() {\r\n return email;\r\n }", "String getUserMainEmail( int nUserId );", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "public java.lang.String getEMail () {\r\n\t\treturn eMail;\r\n\t}", "public final String getEmail() {\n\t\treturn email;\n\t}", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return email;\n }", "public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}", "public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}", "public String getEmailAddress() {\n return (String)getAttributeInternal(EMAILADDRESS);\n }", "public String getEmailAddress() {\n return (String)getAttributeInternal(EMAILADDRESS);\n }", "private EmailAddress getEmail(final String mail) {\r\n\t\treturn (EmailAddress) this.getSingleResult(this.em.createNativeQuery(\"select * from emailaddress WHERE eMailAddress ='\" + mail + \"'\",\r\n\t\t\t\tEmailAddress.class));\r\n\t}", "public java.lang.String getEmail() {\n return localEmail;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public String getGmail() {\n\t\treturn user.getAuthEmail();\n\t}", "public static String getRecipientEmail() {\n return recipientEmail;\n }", "private String getEmailAddressForResource(long resourceId)\r\n throws LateDeliverablesProcessingException {\r\n Resource resource;\r\n\r\n try {\r\n resource = resourceManager.getResource(resourceId);\r\n } catch (ResourcePersistenceException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to get resource.\", e);\r\n }\r\n\r\n if (resource == null) {\r\n throw new LateDeliverablesProcessingException(\"Resource with id[\" + resourceId\r\n + \"] not exist.\");\r\n }\r\n\r\n long userId = resource.getUserId();\r\n\r\n ExternalUser user;\r\n\r\n try {\r\n user = userRetrieval.retrieveUser(userId);\r\n } catch (RetrievalException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to retrieve external user for id : \"\r\n + userId, e);\r\n }\r\n\r\n if (user == null) {\r\n throw new LateDeliverablesProcessingException(\"External user with id[\" + userId\r\n + \"] not exist.\");\r\n }\r\n\r\n String email = user.getEmail();\r\n\r\n if (email == null) {\r\n throw new LateDeliverablesProcessingException(\"email address of resource is null.\");\r\n }\r\n\r\n return email;\r\n }", "public java.lang.String getEmail () {\n\t\treturn email;\n\t}", "public InternetAddress getNotificationEmailAddress();", "public java.lang.String getEmail() {\r\n return email;\r\n }", "public String getEmail() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tStr_email = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Email Id NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn Str_email;\r\n\t\t}", "public java.lang.Object getRecipientEmailAddress() {\n return recipientEmailAddress;\n }", "public java.lang.String getEmail() {\n\t\treturn email;\n\t}", "public String returnEmail() {\n\t\treturn this.registration_email.getAttribute(\"value\");\r\n\t}", "public String getEmail() {\n\t\treturn Email;\n\t}", "public String getEmail()\n\t{\n\t\treturn this._email;\n\t}" ]
[ "0.7931351", "0.76202774", "0.7607178", "0.7415217", "0.7389014", "0.70532787", "0.697489", "0.696721", "0.6911454", "0.69070995", "0.6878502", "0.67368394", "0.6684417", "0.6649115", "0.6649115", "0.66140723", "0.6574819", "0.6574819", "0.6574819", "0.6574819", "0.6574819", "0.6574819", "0.6548934", "0.6487539", "0.6323", "0.6300391", "0.62613225", "0.6231204", "0.62267035", "0.62267035", "0.62134904", "0.6207933", "0.6207933", "0.6207933", "0.6198709", "0.61941004", "0.6176648", "0.6170652", "0.6159839", "0.61468065", "0.61373156", "0.6137029", "0.6134516", "0.6129829", "0.6129299", "0.61098", "0.6088692", "0.6086235", "0.6058222", "0.6044936", "0.6042352", "0.60398006", "0.6034423", "0.6027889", "0.6020708", "0.6020708", "0.6020708", "0.6020708", "0.6020708", "0.6019535", "0.6010269", "0.6010269", "0.6007422", "0.59833634", "0.59824157", "0.59799826", "0.59788406", "0.5967387", "0.59602267", "0.59559405", "0.59559405", "0.59559405", "0.59559405", "0.59559405", "0.59475887", "0.594291", "0.5926852", "0.5913972", "0.5901362", "0.5901362", "0.5891243", "0.5891243", "0.588338", "0.5875025", "0.58723724", "0.58723724", "0.58723724", "0.58723724", "0.5869515", "0.5868999", "0.5857575", "0.58490586", "0.58385074", "0.5829548", "0.5805279", "0.5797783", "0.5772702", "0.57690233", "0.57689995", "0.5768243" ]
0.6776902
11
Create a new User with the specified Details.
public Login createUser(final String username, final String password, final String eMailAddress) { Login login = this.getLogin(username); if (login == null) { this.em.getTransaction().begin(); EmailAddress email = this.getEmail(eMailAddress); if (email == null) { email = new EmailAddress(); email.setEMailAddress(eMailAddress); this.em.persist(email); } login = new Login(); login.setPassword(password); login.setUser(username); login.setEmail(email); this.em.persist(login); this.em.getTransaction().commit(); } return login; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserCreateResponse createUser(UserCreateRequest request);", "public void createUser(User user);", "User createUser(UserCreationModel user);", "@RequestMapping(value=\"/user\",method=RequestMethod.POST)\n\tpublic @ResponseBody ResponseEntity<User> createUser(@RequestBody User userDetails) throws Exception{\n\t\tUser user=null;\n\t\n\t\t//for checking update user \n\t\tuser=userDAO.findOne(userDetails.getId());\n\t\tif (user==null){\n\t\t\t//insert new user \n\t\t\ttry{\n\t\t\t\tuser=new User(userDetails.getEmail(),userDetails.getName(),userDetails.getContact(),userDetails.getIsActive(), new Date(),new Date());\n\t\t\t\tuserDAO.save(user);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tthrow new Exception(\"Exception in saving user details...\",e);\n\t\t\t\t}\n\t\t}else{ \n\t\t\t\tuserDetails.setCreationTime(user.getCreationTime());\n\t\t\t\tuserDetails.setLastModifiedTime(new Date());\n\t\t\t\tuserDAO.save(userDetails);\n\t\t\t}\n\t\t\n\t\t\treturn new ResponseEntity<User>(user, HttpStatus.OK);\n\t}", "public void createUser(User user) {\n\n\t}", "CreateUserResult createUser(CreateUserRequest createUserRequest);", "@PostMapping(\"/user/new/\")\n\tpublic userprofiles createUser(@RequestParam String firstname, @RequestParam String lastname, @RequestParam String username, @RequestParam String password, @RequestParam String pic) {\n\t\treturn this.newUser(firstname, lastname, username, password, pic);\n\t}", "User createUser(User user);", "public void createUser(SignUpDto signupdto) {\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setId(signupdto.getId());\r\n\t\tuser.setPw(signupdto.getPw());\r\n\t\tuser.setNickname(signupdto.getNickname());\r\n\t\t\r\n\t\tuserRepository.save(user);\t\r\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "User create(User user);", "User createUser();", "private void createUser(String Address, String Phone_number,String needy) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(userId)) {\n userId = mFirebaseDatabase.push().getKey();\n }\n\n com.glitch.annapurna.needy user = new needy(Address,Phone_number,needy);\n\n mFirebaseDatabase.child(userId).setValue(user);\n\n addUserChangeListener();\n }", "public void creatUser(String name, String phone, String email, String password);", "@RequestMapping(value=\"\", method=RequestMethod.POST, consumes=MediaType.MULTIPART_FORM_DATA_VALUE, produces = \"application/json\")\n\tpublic @ResponseBody Object createUser(@RequestParam String userName, @RequestParam String userPassword, @RequestParam String userFirstName, \n\t\t\t@RequestParam String userLastName, @RequestParam String userPicURL,@RequestParam String userEmail, @RequestParam String userEmployer,\n\t\t\t@RequestParam String userDesignation, @RequestParam String userCity, @RequestParam String userState, @RequestParam(required=false) String programId, \n\t\t\t@RequestParam long updatedBy, @RequestParam String userExpertise, @RequestParam String userRoleDescription,\n\t\t\t@RequestParam String userPermissionCode, @RequestParam String userPermissionDescription, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn userService.createUser(userName, userPassword, userFirstName, userLastName, userPicURL, userEmail, userEmployer, userDesignation, userCity, userState, programId, updatedBy, userExpertise, userRoleDescription, userPermissionCode, userPermissionDescription, request, response);\n\t}", "public static User createUser(Integer userId, String firstName, String lastName,\r\n\t\t\tString email, String userName, String companyName) {\r\n\t\tUser user = new User();\r\n\t\tif (userId != null) {\r\n\t\t\tuser.setUserId(userId);\r\n\t\t}\r\n\t\tuser.setFirstName(firstName);\r\n\t\tuser.setLastName(lastName);\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setUserName(userName);\r\n\t\tuser.setCompanyName(companyName); \r\n\t\treturn user;\r\n\t}", "@ApiImplicitParams(\n @ApiImplicitParam(name = \"authorization\", value = \"${userController.authorizationHeader.description}\", paramType = \"header\"))\n @PostMapping(consumes = {MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE},\n produces = {MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE})\n public UserRest createUser(@RequestBody UserDetailsRequestModel userDetails) throws UserServiceException {\n UserRest returnValue;\n if (userDetails.getFirstName().isEmpty())\n throw new UserServiceException(ErrorMessages.MISSING_REQUIRED_FIELD.getErrorMessage());\n// UserDto userDto = new UserDto();\n// BeanUtils.copyProperties(userDetails, userDto);\n\n //Model mapper is used to do a DEEP COPY - when we have lists as objects. BeanUtils doesnt do a deep copy.\n ModelMapper modelMapper = new ModelMapper();\n UserDto userDto = modelMapper.map(userDetails, UserDto.class);\n\n UserDto createdUser = userService.createUser(userDto);\n// BeanUtils.copyProperties(createdUser, returnValue);\n returnValue = modelMapper.map(createdUser, UserRest.class);\n return returnValue;\n }", "User create(final User user) throws DatabaseException;", "void createUser(User newUser, String token) throws AuthenticationException, InvalidUserException, UserAlreadyExistsException;", "void createUser(CreateUserDto createUserDto);", "@RequestMapping(method = RequestMethod.POST, headers = \"Content-Type=application/json\")\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic @ResponseBody\n\tResult createUser(@RequestBody Map<String, String> userInfo) {\n\t\tif (userInfo == null || !userInfo.containsKey(\"email\")\n\t\t\t\t|| !userInfo.containsKey(\"password\")) {\n\t\t\treturn new Result().setErrCode(ErrorCode.INVALID_DATA).setErrMsg(\n\t\t\t\t\t\"Invalid regiestration information.\");\n\t\t}\n\t\tWlsUser user = new WlsUser();\n\t\tuser.setEmail(userInfo.get(\"email\"));\n\t\tuser.setPassword(userInfo.get(\"password\"));\n\t\tuser.setFullName(userInfo.get(\"fullName\"));\n\t\tuser.setMobilePhone(userInfo.get(\"mobilePhone\"));\n\t\tuser.setQq(userInfo.get(\"qq\"));\n\t\tuser.setCityCode(userInfo.get(\"area\"));\n\t\tuser.setIndustry(userInfo.get(\"industry\"));\n\t\tuser.setStatus(UserStatusEnum.PENDING_STATUS_AUDIT.value());\n\t\tuser.setUserType(UserType.USER.toString());\n\t\tResult result = new Result();\n\t\ttry {\n\t\t\tuserService.createUser(user);\n\t\t} catch (ServiceException e) {\n\t\t\tresult.setSuccess(false).setErrMsg(e.getMessage());\n\t\t\treturn result;\n\t\t}\n\t\treturn result.setData(user);\n\t}", "private void createUser(final String email, final String password) {\n\n }", "public void createUserInFirebase(String name, String email, String Uid) {\n User user = new User();\n user.setName(name);\n user.setEmail(email);\n mDatabase.child(\"users\").child(Uid).setValue(user);\n }", "private User createUser(String username, String name, String email, String password) {\n UserDTO userDTO = new UserDTO();\n userDTO.setEmail(email);\n userDTO.setName(name);\n userDTO.setPassword(password);\n userDTO.setUsername(username);\n\n userService.registerUser(userDTO);\n\n User user = userService.getUserByEmail(email);\n return user;\n }", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }", "UserModel createUserModel(UserModel userModel);", "@PostMapping\n @ResponseStatus(HttpStatus.CREATED)\n public UserResponse createUser(@Valid @RequestBody CreateUserRequest createUser) {\n return userMapper.toUserResponse(\n userService.createUser(\n userMapper.toDto(createUser)\n )\n );\n }", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private User createWithParameters(Map<String, String> userParameters) {\n User user = new User();\n String passHashed = BCrypt.hashpw(userParameters.get(PASSWORD_PARAMETER_NAME), BCrypt.gensalt());\n user.setUsername(userParameters.get(USERNAME_PARAMETER_NAME));\n user.setPassword(passHashed);\n user.setFirstName(userParameters.get(FIRST_NAME_PARAMETER_NAME));\n user.setLastName(userParameters.get(LAST_NAME_PARAMETER_NAME));\n user.setEmail(userParameters.get(EMAIL_PARAMETER_NAME));\n user.setPhone(userParameters.get(PHONE_PARAMETER_NAME));\n user.setAddress(userParameters.get(ADDRESS_PARAMETER_NAME));\n user.setAccount(BigDecimal.ZERO);\n user.setInitDate(LocalDate.now());\n user.setBlockedUntil(LocalDate.now());\n user.setRole(User.Role.USER);\n return user;\n }", "public boolean createUser(UserProfile userProfile) {\n\t\tmongoTemplate.insert(userProfile, \"UserProfile_Details\");\n\t\treturn true;\n\t}", "boolean create(User user) throws Exception;", "@RequestMapping(method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE)\n public void registerNewUser(@RequestBody @Valid UserDetails user){\n userRepository.save(user);\n }", "@Test\n\tpublic void newUser() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\n\t\tassertThat(user).isNotNull();\n\t\tassertThat(user).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t}", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "public void createUser(String firstName, String emailAddress) {\n\n this.firstName = firstName;\n this.emailAddress = emailAddress;\n\n }", "public UserEntity create(String userId) throws CreateException;", "public User createUser() {\n printer.println(\"Welcome! Enter you name and surname:\");\n printer.println(\"Name:\");\n String name = input.nextString();\n printer.println(\"Surname:\");\n String surname = input.nextString();\n return new User(name, surname);\n }", "@POST\n\t@Path(\"/newUser\")\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic Response createUser(User user) {\n\t\tuserDao.createUser(user);\n\n\t\treturn Response.status(201)\n\t\t\t\t.entity(\"A new user has been created\").build();\n\t}", "int createUser(User data) throws Exception;", "public void createUser(VUser vUser) {\n\t\tUser user = new User();\n\n\t\tboolean match = Pattern.matches(Constants.REGEX_EMAIL, vUser.getEmail());\n\t\tif (!match) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"El email tiene formato incorrecto.\");\n\t\t}\n\n\t\tif (repo.getUserByEmail(vUser.getEmail()) != null) {\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Ya hay un usuario con ese email.\");\n\t\t}\n\n\t\tuser.setEmail(vUser.getEmail());\n\t\tuser.setFullName(vUser.getFullName());\n\t\t\n\t\tif(vUser.getFullName() == null || vUser.getFullName().isEmpty()) {\n\t\t\tuser.setFullName(vUser.getEmail());\n\t\t}\n\n\t\t// TODO: hashear password\n\t\tuser.setPasswordHash(vUser.getPassword());\n\n\t\tuser.setRoles(vUser.getRoles());\n\t\tuser.setUserType(vUser.getUserType());\n\n\t\trepo.createUser(user);\n\t}", "@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<?> create(@Validated({UserReqDTO.New.class}) @RequestBody UserReqDTO userDTO) {\n log.info(\"Create user {}\", userDTO);\n return new ResponseEntity<>(service.create(userDTO), HttpStatus.CREATED);\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"administrators\")\n Call<Void> createUser(\n @retrofit2.http.Body UserBody userBody\n );", "Utilizator createUser(String username, String password, String nume,\n\t\t\tString prenume, String tip, String aux);", "public UserProfile createUserProfile(String username, UserProfile newProfile);", "@Override\n\tpublic ApplicationResponse createUser(UserRequest request) {\n\t\tUserEntity entity = repository.save(modeltoentity.apply(request));\n\t\tif (entity != null) {\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(entity));\n\t\t}\n\t\treturn new ApplicationResponse(false, \"Failure\", enitytomodel.apply(entity));\n\t}", "public static void createUser(String name, Record record) {\n\t\tEntity user = getUser(name);\n\t\tif(user == null) {\n\t\t\tuser = new Entity(\"User\", name);\n\t\t\tuser.setProperty(\"record\", record);\n\t\t}\n\t\tUtil.persistEntity(user);\n\t}", "public User(String uId, String email, String password) \n\t{\n\t\tthis.userId = uId;\n\t\tthis.accDetails = AccountDetails.create(uId,email,password);\n this.credit = Credit.create(uId);\n }", "@POST\n public User create(User user) {\n SecurityUtils.getSubject().checkPermission(\"User:Edit\");\n\n userFacade.create(user);\n return user;\n }", "@Transactional\n public QaUserDetailsDto createUserDetails(QaUserDetailsDto userDetailsDto) {\n try {\n return getUser(userDetailsDto)\n .map(u -> getExistingUser(userDetailsDto, u))\n .orElseGet(() -> createNewUser(userDetailsDto));\n }\n catch (Exception e) {\n throw new QaPortalMultiStepCommitException(new QaMultiStepCommitContext(this.getClass().getName(),\n userDetailsDto,\n QaUserDetailsDto.class,\n 1), e.getMessage());\n }\n }", "public CreateUser(UserRepository userRepo, String username,\n\t\t\tString password, String email, String fullname) {\n\t\tthis.userRepository = userRepo;\n\t\tthis.username = username;\n\t\tthis.password = password;\n\t\tthis.email = email;\n\t\tthis.fullname = fullname;\n\t}", "private User createUser(org.picketlink.idm.model.User picketLinkUser) {\n User user = new User(picketLinkUser.getLoginName());\n user.setFullName(picketLinkUser.getFirstName() + \" \" + picketLinkUser.getLastName());\n user.setShortName(picketLinkUser.getLastName());\n return user;\n }", "public void addUser(String id, String display_name, String phone, String national_number, String country_prefix, String created_at) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(User.KEY_UID, id); // FirstName //values.put(User.KEY_FIRSTNAME, id); // FirstName\r\n values.put(\"display_name\", display_name); // LastName\r\n values.put(\"phone\", phone); // Email\r\n values.put(\"national_number\", national_number); // UserName\r\n values.put(\"country_prefix\", country_prefix); // Email\r\n values.put(User.KEY_CREATED_AT, created_at); // Created At\r\n\r\n // Inserting Row\r\n db.insert(User.TABLE_USER_NAME, null, values);\r\n db.close(); // Closing database connection\r\n }", "public void newUser(User user);", "private Appuser newUser() {\n //TODO: get logged user from security context\n String createdBy = \"REST\";\n Appuser au = new Appuser();\n Userdetails ud = new Userdetails();\n boolean idOK = false;\n Long id = 0L;\n while (!idOK) {\n id = EntityIdGenerator.random();\n idOK = !userRepository.exists(id);\n }\n //notNull\n ud.setNotes(\"none\");\n au.setPasswdHash(\"*\");\n au.setCreatedBy(createdBy);\n au.setUserId(id);\n ud.setUserId(id);\n au.setUserdetails(ud);\n return au;\n }", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@PostMapping(\"/account/create\")\n @PreAuthorize(\"hasRole('USER') or hasRole('ADMIN')\")\n\tpublic ResponseEntity createAccount(\n\t \t @AuthenticationPrincipal UserDetailsImpl userDetail\n\t ){\n\t\t\tAccount account = new Account(userDetail.getId());\n\t\t\t// save the account to the database\n\t\t\tAccount createdAccount = accountRepository.save(account);\n\t \t // response\n\t return ResponseEntity.ok(\n\t \t\tcreatedAccount\n\t );\n\t }", "public static void createUser(String fname, String lname, String username, String password) {\n\t\tUser newUser = new User(fname, lname, username, password);\t\n\t}", "public void createUser(User u) {\n\n em.persist(u);\n\n String content = \"new user: \" + u.getName() + \" => \" + u.getPassword();\n\n MailMessage mailMessage = new MailMessage();\n\n mailMessage.addRecipient(\"[email protected]\");\n mailMessage.setContent(content);\n mailMessage.setSubject(\"new user: \" + u.getName());\n mailer.sendAsyncMail(mailMessage);\n\n mailer.sendSyncMail(mailMessage);\n\n }", "@PostMapping\n public User create(@RequestBody final User user) {\n return userService.create(user);\n }", "public User createCustomer(UserDTO userDTO) {\n\n\t\tOptional<User> userOptional = verifyUserExists(null, userDTO.getMobileNo(), userDTO.getEmail());\n\t\tif (userOptional.isPresent()) {\n\t\t\tthrow new DuplicateUserException(\"User already exists\");\n\t\t}\n\t\tUser newUser = new User();\n\t\tAuthority authority = authorityRepository\n\t\t\t\t.findOne(AuthoritiesConstants.CUSTOMER);\n\t\tSet<Authority> authorities = new HashSet<>();\n\t\tString activationKey = RandomUtil.generateOTP();\n\t\tString password = userDTO.getPassword();\n\t\tif (StringUtils.isEmpty(password)) {\n\t\t\tpassword = activationKey;\n\t\t}\n\t\tString encryptedPassword = passwordEncoder.encode(password);\n\t\tnewUser.setLogin(userDTO.getMobileNo());\n\t\t// new user gets initially a generated password\n\t\tnewUser.setPassword(encryptedPassword);\n\t\tnewUser.setFirstName(userDTO.getFirstName());\n\t\tnewUser.setLastName(userDTO.getLastName());\n\t\tnewUser.setEmail(userDTO.getEmail());\n\t\tnewUser.setMobileNo(userDTO.getMobileNo());\n\t\tnewUser.setLangKey(\"en\");\n\t\tnewUser.setAddress(userDTO.getAddress());\n\t\tnewUser.setLandmark(userDTO.getLandmark());\n\t\tnewUser.setMobileNo(userDTO.getMobileNo());\n\t\t// new user is not active\n\t\tnewUser.setActivated(true);\n\t\tnewUser.setResetDate(DateTime.now());\n\t\tnewUser.setResetKey(userDTO.getMobileNo());\n\t\t\n\t\t// new user gets registration key\n\t\tnewUser.setActivationKey(activationKey);\n\t\tauthorities.add(authority);\n\t\tnewUser.setAuthorities(authorities);\n\t\tuserRepository.save(newUser);\n\t\tlog.debug(\"Created Information for User: {}\", newUser);\n\t\treturn newUser;\n\t}", "@PostMapping(\"/users\")\n public UsersResponse createNewUser(@RequestBody NewUserRequest request) {\n User user = new User();\n user.setName(request.getName());\n user.setAge(request.getAge());\n user = userRepository.save(user);\n return new UsersResponse(user.getId(), user.getName() + user.getAge());\n }", "public RecordObject createUser(String token, Object record) throws RestResponseException;", "public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }", "private void createUserDetails(User user) {\n userContactService.addUserContact(CreateUserContactRequest.builder()\n .displayName(user.getDisplayName())\n .realName(user.getRealName())\n .mobileNo(user.getMobileNo())\n .countryCode(user.getCountryCode())\n .userId(user.getId())\n .lastSeenDate(LocalDateTime.now())\n .userIds(Collections.singletonList(user.getId()))\n .build());\n\n settingsService.addSettings(CreateSettingsRequest.builder()\n .userId(user.getId())\n .allowNotifications(true)\n .build());\n }", "public void createUser() throws ServletException, IOException {\n\t\tString fullname = request.getParameter(\"fullname\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString email = request.getParameter(\"email\");\n\t\tUsers getUserByEmail = productDao.findUsersByEmail(email);\n\t\t\n\t\tif(getUserByEmail != null) {\n\t\t\tString errorMessage = \"we already have this email in database\";\n\t\t\trequest.setAttribute(\"message\", errorMessage);\n\t\t\t\n\t\t\tString messagePage = \"message.jsp\";\n\t\t\tRequestDispatcher requestDispatcher = request.getRequestDispatcher(messagePage);\n\t\t\trequestDispatcher.forward(request, response);\n\t\t}\n\t\t// create a new instance of users class;\n\t\telse {\n\t\t\tUsers user = new Users();\n\t\t\tuser.setPassword(password);\n\t\t\tuser.setFullName(fullname);\n\t\t\tuser.setEmail(email);\n\t\t\tproductDao.Create(user);\n\t\t\tlistAll(\"the user was created\");\n\t\t}\n\n\t\t\n\t}", "@PostMapping(value=\"\", produces = \"application/json\")\n public UserDTO createUser(@RequestBody UserDTO user){\n return this.userService.insertUser(user);\n }", "@POST(\"/users\")\n Call<User> createUser(\n @Body User user\n );", "public UserAuthToken createUser(CreateUserRequest request);", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Test\n\tpublic void test_create_new_user_success(){\n\t\tUser user = new User(null, \"create_user\", \"[email protected]\", \"12345678\");\n\t\tResponseEntity<User> response = template.postForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, user, User.class);\n\t\tUser newUser = response.getBody();\n\t\tassertThat(newUser.getName(), is(\"create_user\"));\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.CREATED));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}", "private void createUser(String username) {\n if (TextUtils.isEmpty(username)) {\n Toast.makeText(this, \"Username Field Required!\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n FirebaseUser current_user = FirebaseAuth.getInstance().getCurrentUser();\n String userID = current_user.getUid();\n User user = new User(et_username.getText().toString(), et_gender.getText().toString(), \"Newbie\", \"Online\", \"Active\", userID, \"default_url\");\n mRef.child(mAuth.getCurrentUser().getUid()).setValue(user);\n }\n }", "@Override\n\tpublic User createNewUser(Account account) {\n\t\treturn new User(account);\n\t\t\n\t}", "int newUser(String username, String password, Time creationTime);", "public SignUpModel createUser(SignUpModel user) {\n\t\tSignUpModel result = signUpRepo.save(user);\n\t\treturn result;\n\t}", "@Override\n\tpublic int create(Users user) {\n\t\tSystem.out.println(\"service:creating new user...\");\n\t\treturn userDAO.create(user);\n\t}", "UserDto create(UserRegistrationDto user);", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "public void create(String userName, String password, String userFullname,\r\n\t\t\tString userSex, int userTel, String role);", "public CreateNewUserDetails(String sLogin, String sFirstName, \r\n\t\t\tString sLastName, String sPassword, String sEmail)\r\n\t{\r\n\t\t// No language assume English user\r\n\t\tset(sLogin, sFirstName, sLastName, sPassword, sEmail, \"\", \"\", \"\", true);\r\n\t}", "@POST\n @Path(\"/create\")\n @Consumes(MediaType.APPLICATION_JSON)\n public Response createUser(ProfileJson json) throws ProfileDaoException {\n Profile profile = json.asProfile();\n profile.setPassword(BCrypt.hashpw(profile.getPassword(), BCrypt.gensalt()));\n //add checking if profile doesn't exit\n api.saveProfile(profile, datastore);\n return Response\n .created(null)\n .build();\n }", "@Override\n\tpublic String DBcreateUser(String userJson) {\n\t\tUser newUser = (User) jsonToUserPOJO(userJson);\n\t\tString id = userRepository.create(newUser);\n\t\treturn id;\n\t}", "@PostMapping(\"/users\")\n\tpublic ResponseEntity<UserDTO> creareUser(@RequestBody(required = true) @Valid UserDTO user) {\n\t\tuser = userService.createUser(user);\n\t\treturn new ResponseEntity<>(user, HttpStatus.CREATED);\n\t}", "@Override\n\tpublic User Create(User t) {\n\t\tsessionFactory.getCurrentSession().save(t);\n\t\t\n\t\treturn t;\n\t}", "@RequestMapping(value = \"create\", method = RequestMethod.POST)\n\tpublic String create(@ModelAttribute(\"usermodel\") User user, Errors errors)\n\t\t\tthrows NoSuchAlgorithmException, IOException {\n\t\tuser.setId(0);\n\t\tvalidator.validate(user, errors);\n\t\tif (errors.hasErrors()) {\n\t\t\treturn VIEW_DEFAULT;\n\t\t}\n\t\tuser.setCreated(new Date());\n\t\tString password = user.getPassword();\n\t\tStandardPasswordEncoder encoder = new StandardPasswordEncoder();\n String encodedPassword = encoder.encode(password);\n user.setPassword(encodedPassword);\n String uuid = UUID.randomUUID().toString();\n user.setUuid(uuid);\n user.setStatus(EnumStatus.INACTIVE.toString());\n // if there is the inactive user, update it with new data\n User userDb = userRepository.findInactiveByEmail(user.getEmail());\n if (userDb != null) {\n \tuser.setId(userDb.getId());\n }\n userRepository.save(user);\n\n // send registration email\n sendRegistrationEmail(user.getEmail(), uuid);\n\n\t\treturn VIEW_EMAIL_SENT;\n\t}", "public iUser createUser(int id) {\n iUser user = null;\n String username = getUsername();\n String password = getPassword();\n\n boolean confirmed = confirmed(id, username);\n if (confirmed) {\n user = registerOptions(username, password, id);\n }\n return user;\n }", "@RequestMapping(value = \"/join\", method = RequestMethod.POST)\n public String createUser(@RequestBody UserDto userDto, Model model) {\n if (userDto == null) {\n return \"user1\";\n }\n User user = new User();\n user.setEmail(userDto.getEmail());\n user.setPass(userDto.getPass());\n userService.createUser(user);\n model.addAttribute(\"email\", user.getEmail());\n model.addAttribute(\"pass\", user.getPass());\n return \"one_product\";\n }", "private void createNewUser(final User unmanagedUser) {\n Realm realm = (mRealm == null) ? Realm.getDefaultInstance() : mRealm;\n //create by administrator\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n User u2 = realm.createObject(User.class, PrimaryKeyFactory.getInstance().nextKey(User.class));\n u2.setLoggedIn(false);\n u2.setUserId(unmanagedUser.getUserId());\n\n String password = unmanagedUser.getPassword();\n if (password == null) {\n password = \"\";\n }\n u2.setPassword(password);\n\n u2.setUserName(unmanagedUser.getUserName());\n u2.setStartDate(unmanagedUser.getStartDate());\n u2.setEndDate(unmanagedUser.getEndDate());\n u2.setCreated(new Date());\n u2.setActive(unmanagedUser.getActive());\n u2.setSpecial(false);\n u2.setPermission(unmanagedUser.getPermission());\n u2.setEnabled(unmanagedUser.getEnabled());\n }\n });\n\n if (mRealm == null)\n realm.close();\n }", "public void create() throws DuplicateException, InvalidUserDataException, \n NoSuchAlgorithmException, SQLException {\n\tUserDA.create(this);\n }", "public void createUserAccount(UserAccount account);", "@Override\n\tpublic String createUser(User users) {\n\t\tuserRepository.save(users);\n\t\treturn \"Save Successful\";\n\t}", "@PostMapping(\"/users\")\n\tpublic ResponseEntity<Object> createUser(@Valid @RequestBody User user) {\n\t\tUser createUser = userService.save(user);\n\n\t\t// Return Created User URI e.g. users/6\n\t\t// It Will return the status code of 201 created\n\t\tURI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\").buildAndExpand(createUser.getId())\n\t\t\t\t.toUri();\n\t\treturn ResponseEntity.created(uri).build();\n\n\t}", "public void createUser(String email, String password) {\n\n if (!validateForm()) {\n return;\n }\n\n signupBtn.setEnabled(false);\n startLoadAnim(getString(R.string.registering_user));\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, R.string.registration_failed, Toast.LENGTH_SHORT).show();\n signupBtn.setEnabled(true);\n stopLoadAnim();\n }\n }\n });\n }", "void save(UserDetails userDetails);", "User registration(User user);", "@Test\n public void createUserTestTest()\n {\n HashMap<String, Object> values = new HashMap<String, Object>();\n values.put(\"age\", \"22\");\n values.put(\"dob\", new Date());\n values.put(\"firstName\", \"CreateFName\");\n values.put(\"lastName\", \"CreateLName\");\n values.put(\"middleName\", \"CreateMName\");\n values.put(\"pasword\", \"user\");\n values.put(\"address\", \"CreateAddress\");\n values.put(\"areacode\", \"CreateAddressLine\");\n values.put(\"city\", \"CreateCity\");\n values.put(\"country\", \"CreateCountry\");\n values.put(\"road\", \"CreateRoad\");\n values.put(\"suberb\", \"CreateSuberb\");\n values.put(\"cell\", \"CreateCell\");\n values.put(\"email\", \"user\");\n values.put(\"homeTell\", \"CreateHomeTell\");\n values.put(\"workTell\", \"CreateWorkTell\");\n createUser.createNewUser(values);\n\n Useraccount useraccount = useraccountCrudService.findById(ObjectId.getCurrentUserAccountId());\n Assert.assertNotNull(useraccount);\n\n Garage garage = garageCrudService.findById(ObjectId.getCurrentGarageId());\n Assert.assertNotNull(garage);\n\n Saleshistory saleshistory = saleshistoryCrudService.findById(ObjectId.getCurrentSalesHistoryId());\n Assert.assertNotNull(saleshistory);\n }", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "@Override\n public void createUser(User user) {\n run(()->{this.userDAO.save(user);});\n\n }", "public User toUser(CreateUserVO createUserVO) {\n User user = new User();\n user.setFirstName(createUserVO.getFirstName());\n user.setLastName(createUserVO.getLastName());\n user.setUsername(createUserVO.getUsername());\n return user;\n }", "public void createUser(String username, String password, String role) {\r\n Optional<User> user = userRepo.findByName(username);\r\n if (!user.isPresent()) {\r\n User newUser = new User();\r\n newUser.setName(username);\r\n newUser.setPassword(password);\r\n newUser.setRole(role);\r\n userRepo.save(newUser);\r\n }\r\n }", "@Test\n void createUserReturnsNull() {\n Address address = new Address(\"Earth\", \"Belgium\", \"City\", \"Street\", 0);\n User user = new User(\"Mira\", \"Vogelsang\", \"0412345678\", \"maarten@maarten\", \"pass\", address);\n\n assertNull(controller.createUser(user));\n }" ]
[ "0.7293201", "0.7277909", "0.72533864", "0.7251478", "0.72207373", "0.72053385", "0.720273", "0.70521086", "0.69825715", "0.6944219", "0.6906152", "0.69029266", "0.67160296", "0.66906106", "0.66837496", "0.6654111", "0.66440207", "0.6629886", "0.6617595", "0.6603193", "0.65658134", "0.6553177", "0.6545699", "0.65446806", "0.65386736", "0.6535872", "0.6535176", "0.652779", "0.6515558", "0.6475273", "0.6474032", "0.6473952", "0.645337", "0.6451512", "0.6449505", "0.6447608", "0.6439678", "0.64200664", "0.6419852", "0.64171606", "0.6414113", "0.6402096", "0.63963234", "0.63942957", "0.6380219", "0.6378762", "0.63666344", "0.6364927", "0.63637465", "0.6358186", "0.6354504", "0.6352035", "0.63434696", "0.6341129", "0.63367206", "0.63254654", "0.63239664", "0.6323675", "0.63222826", "0.6310492", "0.63102657", "0.6299235", "0.6290989", "0.6287041", "0.6280142", "0.62778646", "0.6275907", "0.6266254", "0.6261244", "0.624908", "0.6243505", "0.62403744", "0.62388295", "0.62333065", "0.62278867", "0.6214226", "0.62077576", "0.6202467", "0.61941224", "0.6193439", "0.6188275", "0.6186713", "0.6185136", "0.618291", "0.6181153", "0.61803657", "0.6171414", "0.61636364", "0.6160592", "0.6160368", "0.6159529", "0.61585355", "0.61516523", "0.6136997", "0.61233073", "0.61225575", "0.61186665", "0.61152774", "0.6106101", "0.6104633", "0.61023694" ]
0.0
-1
Removes the User Login.
public boolean removeLogin(final String username) { final Login login = this.getLogin(username); return this.removeFromDB(login); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(getActivity(), LoginActivity.class);\n startActivity(intent);\n getActivity().finish();\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\t\tdb.deleteUsers();\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(MainActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(Activity_Main.this, Activity_Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(EscolhaProjeto.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "public void removeCurrentUser() {\n currentUser.logout();\n currentUser = null;\n indicateUserLoginStatusChanged();\n }", "public void Logout(){\n preferences.edit().remove(userRef).apply();\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }", "public void logoutUser() {\n editor.remove(Is_Login).commit();\n editor.remove(Key_Name).commit();\n editor.remove(Key_Email).commit();\n editor.remove(KEY_CUSTOMERGROUP_ID).commit();\n // editor.clear();\n // editor.commit();\n // After logout redirect user to Loing Activity\n\n }", "public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}", "@Override\n\tpublic void deleteUser() {\n\t\tLog.d(\"HFModuleManager\", \"deleteUser\");\n\t}", "@Override\n\tpublic void logout()\n\t{\n\t\tthis.user = null;\n\t}", "public void deleteUserCredentials(String login) throws SQLException;", "public void logout() {\n\t\tthis.setCurrentUser(null);\n\t\tthis.setUserLoggedIn(false);\t\t\n\t}", "public void removeUsuarioLogin(Usuario usuario) {\r\n\t\tlistaDeUsuarios.remove(usuario);\r\n\t}", "public void deleteUser(String login) {\n userRepository.findOneByLogin(login).ifPresent(user -> {\n userRepository.delete(user);\n log.debug(\"Deleted User: {}\", user);\n });\n }", "private static void removeExpiredLoginUser() {\n\t\tList<String> expiredLoginName=clearExpiredPassport();\r\n\t\t/*暂时不修改数据库状态。*/\r\n\t\t//this.contactUserHessianService.editContactUserToOffline(expiredLoginName);\r\n\t}", "public void deleteUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk deleteUser\");\r\n\t}", "public void removeUser(String login) {\n try (PreparedStatement pst = this.conn.prepareStatement(\"DELETE FROM users WHERE login = ?\")) {\n pst.setString(1, login);\n pst.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void logoutCurrentUser() {\n mAuth.signOut();\n this.loggedInUser = null;\n }", "public void deleteLogin(String user_id, String login_id) throws IOException {\n\t\t\n\t\tBasicDBObject document = new BasicDBObject();\n\t\tdocument.put(\"login_id\", login_id);\n\t\tcoll3.remove(document);\n\t\t\n\t\t\t\t\n\t}", "@Override\n\tpublic void logOutUser() {\n\t\t\n\t}", "public static void deleteLogin(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(Utils.SHARED_PREFERENCES_FILE, Context.MODE_PRIVATE).edit();\n editor.putBoolean(LOGIN_SAVED_KEY, false);\n editor.apply();\n loggedIn = false;\n }", "private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }", "public void removeUser(){\n googleId_ = User.getDeletedUserGoogleID();\n this.addToDB(DBUtility.get().getDb_());\n }", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "public void removeUser(User user) throws UserManagementException;", "public void logoutCurrentUser() {\n currentUser = null;\n }", "public static void deleteUser() {\n REGISTRATIONS.clear();\n ALL_EVENTS.clear();\n MainActivity.getPreferences().edit()\n .putString(FACEBOOK_ID.get(), null)\n .putString(USERNAME.get(), null)\n .putString(LAST_NAME.get(), null)\n .putString(FIRST_NAME.get(), null)\n .putString(GENDER.get(), null)\n .putString(BIRTHDAY.get(), null)\n .putString(EMAIL.get(), null)\n .putStringSet(LOCATIONS_INTEREST.get(), null)\n .apply();\n }", "protected void userLoggedOut() {\n\t\tRuvego.userLoggedOut();\n\t\tResultsActivityMenu.userLoggedOut();\n\t\tHistory.newItem(\"homePage\");\n\t}", "protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}", "@Override\n\tpublic User deleteUser(Account account) {\n\t\treturn usersHashtable.remove(account);\n\t\t\n\t}", "public void logout(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", 0);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.clear();\n preferencesEditor.commit();\n // take user back to login screen\n Intent logoutIntent = new Intent(mContext, LoginActivity.class);\n logoutIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(logoutIntent);\n }", "void removeUser(Long id);", "public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\n\t\t}", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n\n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n }\n\n }", "public void removeUser(String username);", "public static void remove() {\n\t\tTUser_CACHE.remove();\n\t}", "public void logOut() {\n sp.edit().clear().commit();\n }", "public void userLoggedOut(User user) \n\t\t{\n\t\t\tLog.i(\"OpenFeint\", \"User logged out\");\n\t\t\tMainActivity.this.userLoggedOut();\t\n\t\t}", "private void removeUser(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\ttry {\n\t\t\tPrintWriter out = res.getWriter();\n\t\t\tPreferenceDB.removePreferencesUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tif (UserDB.getnameOfUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER))) == null)\n\t\t\t\tout.print(\"ok\");\n\t\t\tUserDB.removeUser(Long.parseLong(req.getParameter(Constants.USER_IDENTIFIER)));\n\t\t\tout.print(\"ok\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tres.setStatus(HttpServletResponse.SC_BAD_REQUEST);\n\t\t}\n\t}", "public void clearLoginInfo(){\n ProfileSharedPreferencesRepository.getInstance(application).clearLoginInfo();\n }", "@Override\n\tpublic void logout() {\n\t\tsessionService.setCurrentUserId(null);\n\t}", "public static void deleteUser() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.deleteUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void deleteUser(User user, String token) throws AuthenticationException;", "private void clearUser() { user_ = null;\n \n }", "public static void signOut(String name, Session user) {\n playerList.remove(name);\n user.removeAttribute(\"player\");\n }", "public void logOut() {\r\n\t\tthis.modoAdmin = false;\r\n\t\tthis.usuarioConectado = null;\r\n\t}", "void removeUser(String uid);", "public void logOut() {\n\t\tToken.getIstance().setHashPassword(null);\n\t}", "public boolean logoutUser(Context context){\n DatabaseHandler db = new DatabaseHandler(context);\n db.resetTables();\n return true;\n }", "private void logout() {\n\t\tParseUser.logOut();\n\n\t\t// Go to the login view\n\t\tstartLoginActivity();\n\t}", "public boolean logoutUser(Context context){\n\t\tDatabaseHandler db = new DatabaseHandler(context);\n\t\tdb.resetTables();\n\t\treturn true;\n\t}", "public void remove() {\n session.removeAttribute(\"remoteUser\");\n session.removeAttribute(\"authCode\");\n setRemoteUser(\"\");\n setAuthCode(AuthSource.DENIED);\n }", "@Override\r\n\tpublic int deleteUser(Users user) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic Boolean deleteUser(User user) {\n\t\treturn null;\n\t}", "public static void Logout(){\n\t\tloginSystem();\r\n\t\t\r\n\t}", "public void logout() {\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(AppConfig.SHARED_PREF_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.clear();\n editor.apply();\n mCtx.startActivity(new Intent(mCtx, LoginActivity.class));\n }", "public void Logout() {\n \t\t\t\n \t\t}", "public void logout() {\n\n if (WarehouseHelper.warehouse_reserv_context.getUser().getId() != null) {\n //Save authentication line in HisLogin table\n /*\n HisLogin his_login = new HisLogin(\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n WarehouseHelper.warehouse_reserv_context.getUser().getId(),\n String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName()\n + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + WarehouseHelper.warehouse_reserv_context.getUser().getLogin(),\n GlobalVars.APP_HOSTNAME, GlobalMethods.getStrTimeStamp()));\n his_login.setCreateId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n his_login.setWriteId(WarehouseHelper.warehouse_reserv_context.getUser().getId());\n \n \n String str = String.format(Helper.INFO0012_LOGOUT_SUCCESS,\n WarehouseHelper.warehouse_reserv_context.getUser().getFirstName() + \" \" + WarehouseHelper.warehouse_reserv_context.getUser().getLastName()\n + \" / \" + PackagingVars.context.getUser().getLogin(), GlobalVars.APP_HOSTNAME,\n GlobalMethods.getStrTimeStamp());\n his_login.setMessage(str);\n\n str = \"\";\n his_login.create(his_login);\n */\n //Reset the state\n state = new S001_ReservPalletNumberScan();\n\n this.clearContextSessionVals();\n\n connectedUserName_label.setText(\"\");\n\n this.setVisible(false);\n }\n\n }", "@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}", "@Override\n\tpublic int delUser(Integer id)throws Exception {\n\t\treturn userMapper.delUser(id);\n\t}", "private void logout()\r\n {\r\n LogoutRequest request = new LogoutRequest();\r\n request.setUsername(username);\r\n this.sendRequest(request);\r\n }", "@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}", "public void clearUserSession() {\n editor.clear();\r\n editor.commit();\r\n }", "@Override\r\n\tpublic void del(int uid) {\n\t\tuserDao.del(uid);\r\n\t}", "private void logout(){\r\n\t\ttry {\r\n\t\t\tserver.rmvClient(user);\r\n\t\t} catch (RemoteException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}", "public void logout(){\n\t\t\n\t\tcurrentUser.logout();\n\t\tcurrentUser = null;\n\t\tchangeViewPort(new GUI_Logout(\"\", \"\", this));\n\t}", "@Override\n\tpublic void logout(user theUser) {\n\t}", "@SuppressWarnings(\"serial\")\n\tpublic void delUser(final String name) throws Exception{\n\t\tUserRegistry ur = UserRegistry.findOrCreate(doc);\n\t\tUsers users = Users.findOrCreate(ur);\n\t\tusers.deleteChildren(User.TAG,new HashMap<String,String>(){{\n\t\t\tput(\"name\",name);\n\t\t}});\n\t\tdelAllMember(name);\n\t}", "public void logout () {\n\t\tif (isLoggedIn()) {\n\t\t\tGPPSignIn.sharedInstance().signOut();\n\t\t\tGPGManager.sharedInstance().signOut();\n\t\t}\n\t}", "public void onSignOut() {\n SharedPreferences userPrefs = PreferenceManager.getDefaultSharedPreferences(\n TBLoaderAppContext.getInstance());\n SharedPreferences.Editor editor = userPrefs.edit();\n editor.clear().apply();\n mTbSrnHelper = null;\n mUserPrograms = null;\n }", "public Boolean DeleteUser(User user){\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic void userLogout(String login) {\n\r\n\t}", "public void clearUserTable() {\n\t\tSQLDelete deleteStatament = new SQLDelete();\n\t\tdeleteStatament.clearUserTable();\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n UsersManager.getInstance().saveCurrentUser();\n }", "private void Logout() {\n\n\t\tPreferenceUtil.getInstance(mContext).saveBoolean(\"exitApp\", true);\n\t\tPreferenceUtil.getInstance(mContext).clear();\n\t\tPreferenceUtil.getInstance(mContext).destroy();\n\n\t\tZganLoginService.toClearZganDB();\n\n\t\tstopService(new Intent(mContext, ZganPushService.class));\n\n\t\tsetContentView(R.layout.nullxml);\n\t\tfinish();\n\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\n\t\tSystem.exit(0);\n\t}", "private void logout(){\n ParseUser.logOut();\n removeUserFromPrefs();\n Intent intent = LandingActivity.intent_factory(this);\n startActivity(intent);\n }", "@Override\r\n\tpublic boolean deleteUser() {\n\t\treturn false;\r\n\t}", "public int Delete_User(String name) {\n\t\treturn 0;\r\n\t}", "public void removeUser(String username) {\n userList.remove(username);\n }", "public void deleteUser(int id){\r\n\t\tconfigDao.deleteUserById(id);\r\n\t}", "public void deleteUser(String name);", "public void removeUser(Client user) {\n usersConnected.remove(user.getName());\n }", "public boolean signOut(String username);", "public String deleteUser(){\n\t\tusersservice.delete(usersId);\n\t\treturn \"Success\";\n\t}", "public void logout(String username)throws java.rmi.RemoteException\n\t\t\t\t{\n\t\t\n\t\t\t\t// remove user from list of logged in users\n\t\t\t\tloggedIn.remove(username);\n\t\t\t\t// Display list of logged in users on Server console window\n\t\t\t\tSystem.out.println(loggedIn.toString());\n\t\t\t\t\n\t\t\t\t//Confirmation message.\n\t\t\t\tmessage = \"Logging out \"+ username;\n\t\t\t\tJOptionPane.showMessageDialog(null,message);\n\t\t\n\t\t\t\t}", "public void delete(){\n // clear the table\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(SportPartnerDBContract.LoginDB.TABLE_NAME, null, null);\n }", "@Override\r\n\tpublic boolean delUser(user user) {\n\t\tif(userdao.deleteByPrimaryKey(user.gettUserid())==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "public void deleteUser(String username) {\n profile.deleteUser(username);\n }", "public static void deleteUserData(final Context context) {\n log.info(\"Usuario Eliminado\");\n inicializaPreferencias(context);\n sharedPreferencesEdit.remove(Constantes.USER);\n sharedPreferencesEdit.commit();\n }", "public void deleteUser(int id) {\n\t\tuserRepository.delete(id);\r\n\t}", "@Override\n public boolean deleteUser(User user) {\n return false;\n }", "@Override\r\n public void clientRemoveUser(User user) throws RemoteException, SQLException\r\n {\r\n gameListClientModel.clientRemoveUser(user);\r\n }", "private void logout() {\n //set offline flag\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\n new PostNoSqlDataBase(this).offline(uid);\n\n //logout\n // FirebaseAuth mAuth = FirebaseAuth.getInstance();\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n mGoogleSignInClient.signOut();\n FirebaseAuth.getInstance().signOut();\n //go to the main activity\n startActivity(new Intent(this, SignUpActivity.class));\n finish();\n }", "public void removeUserUI() throws IOException {\n System.out.println(\"Remove user: id\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\" \");\n Long id = Long.parseLong(a[0]);\n try\n {\n User user = service.removeUser(id);\n if (user != null)\n System.out.println(\"Deleted \" + user.toString());\n else\n System.out.println(\"There was no user with this ID!\");\n }\n catch(IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public Key<User> logout(User user) {\n\t\treturn null;\n\t}", "public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}" ]
[ "0.7940448", "0.7878204", "0.78675175", "0.77729475", "0.777228", "0.76794684", "0.7633124", "0.7294208", "0.7244626", "0.71232283", "0.7087659", "0.70829046", "0.70610243", "0.6963236", "0.6955674", "0.6902211", "0.68552977", "0.6831034", "0.681415", "0.68130755", "0.6765597", "0.67499727", "0.67154485", "0.67110634", "0.6699434", "0.66528535", "0.6646025", "0.66434157", "0.6615421", "0.66101956", "0.6605814", "0.6588165", "0.65835464", "0.65672475", "0.6545255", "0.65252644", "0.6513289", "0.6509271", "0.6500802", "0.64889234", "0.6487182", "0.6483504", "0.64472866", "0.6433485", "0.6430528", "0.6425504", "0.6414524", "0.63842595", "0.63565683", "0.6352583", "0.6337615", "0.6333887", "0.63335437", "0.63285744", "0.6325902", "0.6290729", "0.6290353", "0.628711", "0.6276111", "0.6272006", "0.62674105", "0.6262596", "0.6260368", "0.6242724", "0.62323993", "0.6213589", "0.6211309", "0.62025666", "0.6196762", "0.6194533", "0.6190517", "0.6183393", "0.61830837", "0.6171847", "0.61694187", "0.6168618", "0.6153598", "0.61505866", "0.6142795", "0.6139617", "0.613788", "0.6136671", "0.6136199", "0.6127075", "0.6122331", "0.61200774", "0.6118819", "0.61173755", "0.6114139", "0.6108392", "0.6099819", "0.60984087", "0.60951257", "0.6088117", "0.6081426", "0.6079702", "0.60762537", "0.60705495", "0.606871", "0.6062564", "0.6059348" ]
0.0
-1
Changes the login password.
public boolean changePassword(final Login login, final String password) { if (login != null) { this.em.getTransaction().begin(); login.setPassword(password); this.em.persist(login); this.em.getTransaction().commit(); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPassword(java.lang.String newPassword);", "public void setPassword(String pass);", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(String password);", "void setPassword(Password newPassword, String plainPassword) throws NoUserSelectedException;", "public void changePassword(String passwordChange){\n\t this.password = passwordChange;\n\t}", "public void updatePassword(String account, String password);", "public void setPassword(String newPassword) {\n this.password = newPassword;\n \n //make the changes in the database\n db.updateUserProperty(username, Property.PASSWORD, newPassword);\n }", "@Override\n\tpublic void changePassword(LoginForm login) {\n\t\tuserRepository.changePassword(encoder.encode(login.getPassword()), login.getUsername());\n\n\t}", "public void setPassword(String password)\r\n/* 26: */ {\r\n/* 27:42 */ this.password = password;\r\n/* 28: */ }", "@Override\r\n\tpublic void modifyPassword(String username, String password, String confirmPassword, String oldPassword) {\n\t}", "public void setPassword(String pw)\n {\n this.password = pw;\n }", "void setPassword(String ps) {\n this.password = ps;\n }", "public void update() {\n user.setNewPassword(newPassword.getText().toString());\n user.setPassword(password.getText().toString());\n reauthenticate();\n }", "public void setUserPassword(String newPassword) {\n profile.setPassword(currentUser, newPassword);\n }", "public void changePassword(String password) {\n userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin()).ifPresent(user -> {\n String encryptedPassword = passwordEncoder.encode(password);\n user.setPassword(encryptedPassword);\n log.debug(\"Changed password for User: {}\", user);\n });\n }", "public void setPassword(String password)\n {\n _password = password;\n }", "public void setLoginPassword(String loginPassword) {\r\n this.loginPassword = loginPassword;\r\n }", "@Override\n\tpublic void setPassword(String password) {\n\n\t}", "void changePassword(String userName, @Nullable String oldPassword, @Nullable String newPassword) throws PasswordNotMatchException;", "public void setPassword(String password)\n {\n _password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n saveProperties();\n }", "@Override\r\n public void changePassword(String password) {\r\n this.studente.setPassword(password);\r\n this.studenteFacade.edit(this.studente);\r\n }", "public void setPassword(String pw) {\n password = pw.toCharArray();\n cleared = false;\n }", "public void setPassword(String password){\r\n this.password = password;\r\n }", "public void setPassword(final String password){\n mPassword = password;\n }", "public void setPassword(String p)\n\t{\n\t\tpassword = p;\n\t}", "public void setPassword(String password){\n this.password = encryptPassword(password);\n checkRep();\n }", "public void set_pass(String password)\n {\n pass=password;\n }", "@Override\n\tpublic boolean setNewPassword(BigInteger tUserFId,String password) {\n\t\tint res = accountManageDao.updateApplyPwdWithMainUser(tUserFId,password);\n\t\treturn res>0?true:false;\n\t}", "public void setPassword(String p) {\n\t\tpassword = p;\n\t}", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\n this.password = password;\r\n }", "public void setPassword(String password)\n {\n this.password = password;\n }", "public void setPassword(String password)\n {\n this.password = password;\n }", "public void setPassWord(String password) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putString(\"PASSWORD\", password);\n\t\teditor.commit();\n\t}", "public void setPassword(String password)\n \t{\n \t\tthis.password = password;\n \t}", "public void setPassword( String password )\r\n {\r\n this.password = password;\r\n }", "public void setUserPassword(String login, String oldPassword, String newPassword) throws EOSForbiddenException,\n\t\t\tEOSUnauthorizedException, EOSValidationException;", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(String password) {\r\n this.password = password;\r\n }", "public void setPassword(int password) {\n this.password = password;\n }", "public void setPassword(String password)\n {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String paramPasswd) {\n\tstrPasswd = paramPasswd;\n }", "public void setPassword(String password) {\n\tthis.password = password;\n}", "public void setPassword(String password) {\n this.password.set(password);\n }", "public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }", "public void setPassword(java.lang.String password) {\r\n this.password = password;\r\n }", "public void set_password(String password)\r\n\t{\r\n\t\tthis.password = password;\r\n\t}", "public void setPassword(String new_password) throws DataFault {\n\t\t\t\t setPassword(Hash.getDefault(getContext()), new_password);\n\t\t\t }", "public void setPassword (java.lang.String password) {\r\n\t\tthis.password = password;\r\n\t}", "public void setAccountPassword(String value) {\n this.accountPassword = value;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword(String password) {\n this.password = password;\n }", "public void setPassword2(String password2);", "public void changePassword(String account_name, String newPassword){\n //hashe the password\n newPassword = hashPassword(newPassword);\n try {\n statement = connection.createStatement();\n statement.executeUpdate(\"UPDATE members SET password='\"+newPassword+\"' WHERE\" +\n \" name='\"+account_name+\"'\");\n }catch (SQLException ex){ex.printStackTrace();}\n }", "public void setPassword(java.lang.String param) {\n localPasswordTracker = true;\n\n this.localPassword = param;\n }", "public void changePassword(String username, String newPassword, String oldPassword) {\n\t\tm_tcpSession.write(\"c\" + username + \",\" + (getPasswordHash(username, newPassword)) + \",\" + (getPasswordHash(username, oldPassword)));\n\t}", "public void setPassword(String password) throws SQLException\r\n\t{\r\n\t\tif (password == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tString SQL_USER = \"UPDATE user SET password =? WHERE id=?;\";\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Prepare the statement\r\n\t\t\tPreparedStatement statement = this.getConn().prepareStatement(SQL_USER);\r\n\r\n\t\t\t//Bind the variables\r\n\t\t\tstatement.setString(1, password);\r\n\t\t\tstatement.setInt(2, userId);\r\n\r\n\t\t\t//Execute the update\r\n\t\t\tstatement.executeUpdate();\r\n\r\n\t\t} catch (SQLException e)\r\n\t\t{\r\n\t\t\tGWT.log(\"Error in SQL: Student->setPassword(String \"+ password+ \")\", e);\r\n\t\t\tthis.getConn().rollback();\r\n\t\t\tthrow e;\t\r\n\t\t}\r\n\t\t\r\n\t\t//commit change\r\n\t\tDatabase.get().commit();\r\n\t}", "void updateUserPassword(User user);", "@Override\r\n\tpublic void changePassword() throws NoSuchAlgorithmException\r\n\t{\r\n\t\tSystem.out.print(\"Enter user ID you wish to change: \");\r\n\t\tString idInput = scan.next();\r\n\t\tboolean isUnique = isUniqueID(idInput);\r\n\t\tif (isUnique == false)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Enter password for \" + idInput + \": \");\r\n\t\t\tString oldPassInput = scan.next();\r\n\t\t\tString oldHash = hashFunction(oldPassInput + database.get(idInput));\r\n\t\t\tboolean isValidated = validatePassword(oldHash);\r\n\t\t\tif (isValidated == true)\r\n\t\t\t{\r\n\t\t\t\thm.remove(oldHash);\r\n\t\t\t\tSystem.out.print(\"Enter new password for \" + idInput + \": \");\r\n\t\t\t\tmakePassword(idInput, scan.next());\r\n\t\t\t\tSystem.out.println(\"The password for \" + idInput + \" was successfully changed.\");\r\n\t\t\t}\r\n\t\t\telse if (isValidated == false)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The ID or password you entered does not exist in the database.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (isUnique == true)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"Enter password for \" + idInput + \": \");\r\n\t\t\tscan.next();\r\n\t\t\tSystem.out.println(\"Authentication fail\");\r\n\t\t\tSystem.out.println(\"The ID or password you entered does not exist in the database.\");\r\n\t\t}\r\n\t}", "public void setPassword(String password) {\n String oPassword = getPassword();\n this.password = password;\n\n \n try {\n MessageDigest md = MessageDigest.getInstance( \"MD5\" );\n md.update(this.password.getBytes());\n \n BigInteger hash = new BigInteger( 1, md.digest() );\n this.hashPassword = hash.toString(16);\n } catch (NoSuchAlgorithmException ns) {\n ns.printStackTrace();\n }\n\n firePropertyChange(PROPNAME_PASSWORD, oPassword, this.password);\n }", "public void setPassword(java.lang.String password) {\n this.password = password;\n }" ]
[ "0.8416757", "0.79155153", "0.78958", "0.78958", "0.78958", "0.7848897", "0.77934706", "0.7700778", "0.7693338", "0.7689644", "0.76506895", "0.75897413", "0.75887775", "0.75677687", "0.7566675", "0.7541383", "0.7499407", "0.7452246", "0.74507535", "0.74431515", "0.7437936", "0.74099606", "0.73816687", "0.7369829", "0.7358757", "0.73469603", "0.7334175", "0.733033", "0.73122686", "0.73088837", "0.72994536", "0.72870094", "0.72794735", "0.72794735", "0.7253497", "0.72384685", "0.72384685", "0.7234558", "0.7233314", "0.7228277", "0.7213731", "0.721275", "0.721275", "0.721275", "0.721275", "0.721275", "0.721275", "0.72119594", "0.7210324", "0.72061694", "0.72061694", "0.72016054", "0.718577", "0.7183834", "0.7153411", "0.7153411", "0.7123787", "0.7109041", "0.7108628", "0.7108189", "0.7107909", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7106079", "0.7105958", "0.7105099", "0.7095872", "0.7095346", "0.70839083", "0.70838255", "0.7076642", "0.70511687", "0.7046939" ]
0.0
-1
Gets existing Email address.
private EmailAddress getEmail(final String mail) { return (EmailAddress) this.getSingleResult(this.em.createNativeQuery("select * from emailaddress WHERE eMailAddress ='" + mail + "'", EmailAddress.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getEmailAddress();", "@Override\n public String getEmailAddress() {\n\n if(this.emailAddress == null){\n\n this.emailAddress = TestDatabase.getInstance().getClientField(token, id, \"emailAddress\");\n }\n\n return emailAddress;\n }", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "public java.lang.String getEmailAddress() {\n return EmailAddress;\n }", "public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }", "public static String getExistingEmail() throws Exception {\n return executeQuery(\"SELECT * FROM players;\", \"us_email\");\n }", "public java.lang.CharSequence getEmailAddress() {\n return email_address;\n }", "public String getEmail() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tStr_email = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Email Id NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn Str_email;\r\n\t\t}", "public Email getEmail()\r\n {\r\n /**\r\n * Ya hemos leido. Se devuelve una nueva instancia en cada envio de mail para evitar problemas de sincronizacion.\r\n */\r\n return createEmailInstance();\r\n }", "@AutoEscape\n\tpublic String getEmail_address();", "private String getUserEmailAddress() {\n\t\tUser user = UserDirectoryService.getCurrentUser();\n\t\tString emailAddress = user.getEmail();\n\n\t\treturn emailAddress;\n\t}", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }", "@JsonIgnore\r\n public String getEmailAddress() {\r\n return OptionalNullable.getFrom(emailAddress);\r\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String getEmail() {\n return email;\n }", "public String getEmailAddress() {\r\n return emailAddress;\r\n }", "public String getEmail()\n {\n return emailAddress;\n }", "public String getEmailAddress() {\r\n return email;\r\n }", "public java.lang.String getEmail() {\n\t\t\t\tjava.lang.Object ref = email_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\temail_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}", "public String getEmail() {\n return sp.getString(USER_EMAIL, null);\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "public java.lang.String getEmail() {\n\t\t\tjava.lang.Object ref = email_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\temail_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}", "public String getEmailAddress()\r\n {\r\n return emailAddress;\r\n }", "public String getEmailAddress() {\r\n\t\treturn emailAddress;\r\n\t}", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public final String getEmail() {\n\t\treturn email;\n\t}", "public String getEmailAddress() {\n return email;\n }", "public String getEmailAddress();", "public String getEmailAddress(){\r\n\t\treturn emailAddress;\r\n\t}", "public java.lang.String getEmail() {\r\n return email;\r\n }", "public java.lang.String getEmailAddress()\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tint length = emailAddress.length();\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t\tresult = emailAddress;\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\t//char asterisk = emailAddress.charAt(i);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn result;\r\n\t\t\t\r\n\t}", "@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }", "public String getEmailAddress() {\n return emailAddress;\n }", "java.lang.String getUserEmail();", "public String getEmailAddress() {\n return this.emailAddress;\n }", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "public String getEmail()\n\t{\n\t\treturn this._email;\n\t}", "public String returnEmail() {\n\t\treturn this.registration_email.getAttribute(\"value\");\r\n\t}", "public java.lang.String getEmail () {\n\t\treturn email;\n\t}", "public java.lang.String getEmail() {\n\t\treturn email;\n\t}", "public static String getRecipientEmail() {\n return recipientEmail;\n }", "public EmailType getEmailAddress() {\n return _emailAddress;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\r\n\t\treturn email;\r\n\t}", "public String getEmail() {\r\n\t\treturn email;\r\n\t}", "public String getEmail() {\r\n\t\treturn email;\r\n\t}", "public String getEmail()\n\t{\n\t\treturn this.email;\n\t}", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Email getEmail() {\r\n return email;\r\n }", "public String getEmail() {\n\t\treturn Email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String getEmail() {\n\t\treturn email;\n\t}", "public String adcionarEmail() {\n\t\tpessoa.adicionaEmail(email);\n\t\tthis.email = new Email();\n\t\treturn null;\n\t}", "public String getUserEmailAdress() throws Exception\r\n {\n return null;\r\n }", "public String getEmail() {\n return _email;\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }", "public java.lang.String getEmail() {\n return localEmail;\n }", "public String getEmailAddress() {\n return (String)getAttributeInternal(EMAILADDRESS);\n }", "public String getEmailAddress() {\n return (String)getAttributeInternal(EMAILADDRESS);\n }" ]
[ "0.75731987", "0.74436414", "0.73706967", "0.73706967", "0.73706967", "0.73706967", "0.73706967", "0.73706967", "0.71586204", "0.7150981", "0.7104957", "0.71021837", "0.7084952", "0.7074569", "0.7065647", "0.70646036", "0.7026576", "0.7026576", "0.7026576", "0.7022", "0.70210147", "0.7020002", "0.7020002", "0.70186794", "0.7010872", "0.6983088", "0.69823426", "0.6971108", "0.69577116", "0.6956069", "0.6949325", "0.6949325", "0.6949325", "0.6949325", "0.6949325", "0.694697", "0.694332", "0.6941054", "0.6939251", "0.6939251", "0.6939251", "0.6939251", "0.69340706", "0.69336396", "0.6929", "0.6917301", "0.6915974", "0.6899905", "0.68853664", "0.6878171", "0.6854613", "0.6853465", "0.68374944", "0.68374944", "0.68374944", "0.68374944", "0.68374944", "0.68095154", "0.68093896", "0.6806456", "0.6763401", "0.6696902", "0.6685409", "0.6679215", "0.6676343", "0.6676343", "0.6676343", "0.66707736", "0.6664722", "0.66501343", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6645287", "0.6643386", "0.66244197", "0.66218525", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.6611227", "0.66099244", "0.660788", "0.6606497", "0.6606497" ]
0.70280474
16
if the list isnt full, just add the new rl
public void bindTexture(ResourceLocation rl) { if(this.list.size() >= this.size) { // list is already full // if its already in, remove it (itll be re-added in front) // else remove the last one Iterator<ResourceLocation> it = this.list.iterator(); boolean found = false; while(it.hasNext()) { if(rl.equals(it.next())) { // its already in, remove it it.remove(); found = true; break; } } // wasnt in, remove the last one if(!found) { // size must be >= 1, so this can only be called if the list size is >= size >= 1 this.unbind(this.list.removeLast()); } } // (re-)add it in front this.list.addFirst(rl); this.bind(rl); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void appendInPlace (List l) {\n\t\tif (this.isEmpty()) {\n\t\t\tmyHead = l.myHead;\n\t\t\tmySize = l.mySize;\n\t\t\tmyTail = l.myTail;\n\t\t}\n\t\telse if (l.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\telse {\n\t\t\tmyTail.myNext = l.myHead;\n\t\t\tmyTail = l.myTail;\n\t\t\tmySize += l.mySize;\n\t\t}\n\t}", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "public void offer(int num){\n if(tail == fixedSize - 1) {\n List<Object> newList = new ArrayList<>();\n newList.add(num);\n //save next new list at tail\n tailList.add(newList);\n tailList = (List<Object>) tailList.get(tail);\n tail = 0;\n }else{ //not in last index,then directly add it;\n tailList.add(num);\n }\n count++;\n tail++;\n }", "private void addItems() {\n while (true) {\n ClothingItem item = readItem();\n if (item == null || item.getId() < 0) {\n break;\n }\n try {\n ctrl.addItem(item);\n } catch (ValidatorException e) {\n e.printStackTrace();\n }\n }\n }", "public void addNode() {\n if (nodeCount + 1 > xs.length)\n resize();\n nodeCount++;\n }", "public void addAsPerFilterFirstLoad(List<Job> newJob){\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(newJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }", "public void addToRear(T element){\n LinearNode<T> node = new LinearNode<T>(element);\n // modify both front and rear when appending to an empty list\n if (isEmpty()){\n front = rear = node;\n }else{\n rear.setNext(node);\n rear = node;\n }\n count++;\n }", "private void addToChatList(Chat[] newChats){\n if ( newChats == null || newChats.length == 0 ) {\n return;\n }\n if ( chatList.size() == 0 ) { // no chat history loaded yet\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n headIndex = newChats[0].id; // update the tail index\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else if ( newChats[newChats.length-1].id < chatList.get(0).id ) { // new.tail is prior to current.head\n // prepend the new chats to the head of the current chat\n int selection = lv_chat.getFirstVisiblePosition();\n selection += newChats.length;\n for ( int i = newChats.length-1; i >= 0; i-- ) {\n chatList.push(newChats[i]);\n }\n lv_chat.setSelection(selection);\n adapter.notifyDataSetChanged();\n Log.d(TAG,\"select:\"+selection);\n headIndex = newChats[0].id; // update the headIndex\n } else if ( newChats[0].id > chatList.get(chatList.size()-1).id ) { // new.head is after current.tail\n // append the new chats to the tail of the current chat\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else {\n Log.e(TAG,\"Loaded duplicated chat!\");\n }\n }", "public void add(E item)\n {\n\n Node<E> node = new Node<E>(item);\n // if it is the first item in the list, it sets the current item to the\n // new item\n if (size == 0)\n {\n current = node;\n current.join(current);\n size++;\n return;\n }\n\n Node<E> previous = current.previous();\n previous.split();\n node.join(current);\n previous.join(node);\n current = node;\n\n size++;\n }", "private boolean updateBufferList() {\n while(!data.isEmpty() && availableFirst() == 0) {\n popBuffer();\n }\n return !data.isEmpty();\n }", "private void grow() {\r\n\t\t\r\n\t\t Student [] newList = new Student[sizeOfList(list) + 4];\r\n\t int size = sizeOfList(list);\r\n\t \r\n\t for(int i = 0; i < size; i++) {\r\n\t \t newList[i] = list[i];\r\n\t }\r\n\t list = newList;\r\n\t}", "public synchronized void addItem(ArrayList<Start.Ingredients> obj) {\r\n\t\t// Only add if the table is empty\r\n\t\twhile (!empty && count < 20) {\r\n\t\t\ttry {\r\n\t\t\t\twait();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (count >= 20) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Set the contents and notifyAll()\r\n\t\tcontents = obj;\r\n\t\tempty = false;\r\n\t\tnotifyAll();\r\n\r\n\t}", "public void append(PartialTree tree) {\r\n \tNode ptr = new Node(tree);\r\n \tif (rear == null) {\r\n \t\tptr.next = ptr;\r\n \t} else {\r\n \t\tptr.next = rear.next;\r\n \t\trear.next = ptr;\r\n \t}\r\n \trear = ptr;\r\n \tsize++;\r\n }", "private boolean addRecordsToList(EntityCursor<RepTestData> cursor) \n throws DatabaseException {\n\n if (isReverseRead) {\n RepTestData data = cursor.last(null);\n if (data == null) {\n return true;\n } else {\n list.add(data);\n while ((data = cursor.prev(null)) != null) {\n list.add(data);\n }\n }\n } else {\n RepTestData data = cursor.first(null);\n if (data == null) {\n return true;\n } else {\n list.add(data);\n while ((data = cursor.next(null)) != null) {\n list.add(data);\n }\n }\n }\n\n return false;\n }", "@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 append(IoBuffer buffer) {\n data.offerLast(buffer);\n updateBufferList();\n }", "public void append(Item item) {\n Node newNode = new Node();\n newNode.item = item;\n Node lastNode = findNode(size);\n newNode.next = head;\n lastNode.next = newNode;\n size++;\n }", "public void addAsPerSearch(List<Job> searchedJob) {\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(searchedJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }", "public void add(E e) {\n if (n == list.length) { grow(); }\n list[n++] = e;\n }", "public FplList append(FplList list) {\n\t\tif (list == null || list.isEmpty()) {\n\t\t\treturn this;\n\t\t}\n\t\tif (isEmpty()) {\n\t\t\treturn list;\n\t\t}\n\t\tint totalSize = size() + list.size();\n\t\tint totalBuckets = shape.length + list.shape.length;\n\n\t\tFplValue[] lastBucket = shape[shape.length - 1];\n\t\tFplValue[] listFirstBucket = list.shape[0];\n\n\t\tif (lastBucket.length + listFirstBucket.length <= BASE_SIZE) {\n\t\t\tif (needsReshaping(totalBuckets - 1, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length - 1);\n\t\t\t\tFplValue[] bucket = copyOf(lastBucket, lastBucket.length + listFirstBucket.length);\n\t\t\t\tarraycopy(listFirstBucket, 0, bucket, lastBucket.length, listFirstBucket.length);\n\t\t\t\tbuckets[shape.length - 1] = bucket;\n\t\t\t\tarraycopy(list.shape, 1, buckets, shape.length, list.shape.length - 1);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t} else {\n\t\t\tif (needsReshaping(totalBuckets, totalSize)) {\n\t\t\t\treturn new FplList(mergedShape(shape, list.shape, totalSize));\n\t\t\t} else {\n\t\t\t\tFplValue[][] buckets = copyOf(shape, shape.length + list.shape.length);\n\t\t\t\tarraycopy(list.shape, 0, buckets, shape.length, list.shape.length);\n\t\t\t\treturn new FplList(buckets);\n\t\t\t}\n\t\t}\n\t}", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }", "private static List<Integer> addOne(List<Integer> input) {\n\n\t\tList<Integer> copy = new ArrayList<>();\n\t\tcopy.addAll(input);\n\n\t\tint size = copy.size();\n\t\tcopy.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && copy.get(i)==10; i--) {\n\t\t\tcopy.set(i, 0);\n\t\t\tcopy.set(i-1, copy.get(i-1)+1);\n\t\t}\n\n\t\tif(copy.get(0) == 10) {\n\t\t\tcopy.set(0, 0);\n\t\t\tcopy.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn copy;//this NOT modifies the original input\n\t}", "public void addLast(Item item){\r\n\t\tif (item == null) throw new NullPointerException();\r\n\t\tif (n == list.length){resize(2*list.length);}\r\n\t\tif(isEmpty()){prior=list.length-1;first=0;last=0;latter=0;}\r\n\t\tlist[latter++]=item;\r\n\t\t last=latter-1;\r\n\t\t if(latter==list.length){latter=0;}\r\n\t\t n++;}", "public void add(T e) {\n Entry<T> newNode = new Entry<T>(e, null, null);\n newNode.next = cursor.next;\n newNode.prev = ((Entry<T>) cursor);\n if(cursor != tail) {\n ((Entry<T>) cursor.next).prev = newNode;\n }\n else {\n tail = newNode;\n }\n cursor.next = newNode;\n prev = cursor;\n cursor = cursor.next;\n size++;\n ready = false;\n }", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "public void addLast(T item) {\n if (isFull()) {\n resize(capacity * 2);\n }\n items[nextLast] = item;\n nextLast = plusOne(nextLast);\n size += 1;\n }", "@Override\n public void add(T elem) {\n if(isEmpty()) { //if list is empty\n prepend(elem);//we can reuse prepend() method to add to the front of list\n }\n else {\n \n last.next = new DLNode(elem, last, null); //new element follows the last one, the previous node is the old last one\n last = last.next; //the last node now is the one that follows the old last one\n }\n \n }", "public void add(int item) {\r\n if (!contains(item)) {\r\n items[NumItems++] = item;\r\n } else if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is full\");\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "public void addLast(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (lastCursor == items.length) {\r\n resize(2 * items.length);\r\n }\r\n items[lastCursor++] = item;\r\n }", "public void addLast(Item x) {\n if (size == items.length) {\n resize(size * 2);\n }\n items[size] = x;\n size += 1;\n }", "@Override\n\tpublic void redo() {\n\t\tthis.list.add(shape);\n\n\t}", "private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "@Override\n public boolean add(E e) {\n head++; //Increment the head by one\n if (head == ringArray.length)\n head = 0; //If we get to the end of the ring set the pointer to be 0 again to loop back round\n ringArray[head] = e; //Get the element\n if (elementCount < ringArray.length) //Increase the element count up until the length because at that point the number of elements cant change.\n elementCount++;\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "public void addLast(Item item) {\n if(isEmpty()) addFirst(item); // if DList is empty, call addFront(Item item)\n else {\n // create a new Node: it's next pointer points to the last sentinel node\n Node newNode = new Node();\n newNode.data = item;\n newNode.next = last;\n // copy the node that last was pointing to previously\n Node oldLast = last.prev;\n newNode.prev = oldLast;\n oldLast.next = newNode;\n // take care of the last sentinel node (no need to take of first):\n last.prev = newNode; \t\t\t\n // update size:\n size++;\n }\n }", "void checkLastItem() {\n if (!mItems.isEmpty() && !mItems.get(mItems.size() - 1).equals(ADD_NEW_ENTRY)) {\n // add last item again if missing\n mItems.add(ADD_NEW_ENTRY);\n // need to manually call, since this item is not in Db and hence ignored by DiffUtil\n notifyItemInserted(mItems.size() - 1);\n }\n }", "public void addPack(NBpack pack) throws ListFullException {\n synchronized (control) {\n if (write_point - read_point == COUNT_MAXPACKS) {\n throw new ListFullException();\n }\n if (write_point >= COUNT_MAXPACKS) {\n packs[write_point - COUNT_MAXPACKS] = pack;\n } else {\n packs[write_point] = pack;\n }\n write_point++;\n if (write_point + 1 == COUNT_MAXPACKS * 2) {\n write_point = 0;\n }\n control.notifyAll();\n }\n }", "private ListNode add(ListNode current, T datum) {\n\t\tif (current == null) {\n\t\t\tsize++;\n\t\t\treturn new ListNode(datum);\n\t\t}\n\t\telse {\n\t\t\tcurrent.next = add(current.next, datum);\n\t\t\treturn current;\n\t\t}\n\t}", "public void append(E it) {\r\n\t\ttail = tail.setNext(new Link<E>(it, null));\r\n\t\tcnt++;\r\n\t}", "protected void addToTail(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, null, tail);\n\t\t\n\t\tif(tail != null)\n\t\t\ttail.setNext(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\thead = newElm;\n\t\t\t\n\t\ttail = newElm;\n\t}", "private void grow() {\n OmaLista<OmaPari<K, V>>[] newList = new OmaLista[this.values.length * 2];\n\n for (int i = 0; i < this.values.length; i++) {\n copy(newList, i);\n }\n\n this.values = newList;\n }", "public synchronized void add(Integer item) {\r\n while (true) {\r\n if (buffer.size() == SIZE) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n buffer.add(item);\r\n notifyAll();\r\n return;\r\n }\r\n }", "@Override\n public void updateToNextDoc() {\n if(idx < postingList.size())\n idx += postingList.get(idx+1)+2;\n }", "@Override\n public boolean add(ListNode e) {\n if (this.size() != 0){\n ListNode last = this.getLast();\n last.setNext(e);\n }\n return super.add(e);\n }", "private void update_auxlist(ArrayList<Line> auxlist, Line workingSet) {\n\t\tLine new_working_set = new Line(workingSet);\n\n\t\t// Add the working set copy to the set of maximal lines\n\t\tauxlist.add(new_working_set);\n\t}", "protected void addToHead(T val)\n\t{\n\t\tListElement<T> newElm = new ListElement<T>(val, head);\n\t\t\n\t\tif(head != null)\n\t\t\thead.setPrev(newElm);\n\t\telse\n\t\t\t//If list was empty befor addition\n\t\t\ttail = newElm;\n\t\t\t\n\t\thead = newElm;\n\t}", "public void addAtStart(Item item) { \t\n \tif(head.item == null) {\n \t\thead.item = item;\n\t \t\tif(isEmpty()) {\n\t \t\thead.next = tail;\n\t \t\ttail.next = head;\n\t \t\t} \t\t\n \t} else {\n \t\tNode oldHead;\n \t\toldHead = head;\n \t\thead = new Node();\n \t\thead.item = item;\n \t\thead.next = oldHead;\n \t\ttail.next = head;\n \t}\n \tsize++;\n }", "IList<T> append(IList<T> l);", "void append(int new_data)\n {\n /* 1. allocate node\n * 2. put in the data */\n Node new_node = new Node(new_data);\n\n Node last = head;/* used in step 5*/\n\n /* 3. This new node is going to be the last node, so\n * make next of it as NULL*/\n new_node.setNext(null);\n\n /* 4. If the Linked List is empty, then make the new\n * node as head */\n if(head == null)\n {\n new_node.setPrev(null);\n head = new_node;\n return;\n }\n\n /* 5. Else traverse till the last node */\n while(last.getNext() != null)\n last = last.getNext();\n\n /* 6. Change the next of last node */\n last.setNext(new_node);\n\n /* 7. Make last node as previous of new node */\n new_node.setPrev(last);\n }", "public void addLast(T item) throws Exception {\n\t\tNode nn = new Node();\n\t\tnn.data = item;\n\t\tnn.next = null;\n\n\t\tif (isEmpty()) {\n\n\t\t\t// your ll was already empty and now you are adding an element for the 1st time\n\t\t\t// : spcl case\n\t\t\thead = nn;\n\n\t\t} else {\n\n\t\t\t// linking\n\t\t\tNode last = getNodeAt(size() - 1);\n\t\t\tlast.next = nn;\n\n\t\t}\n\t}", "@Override\n public void addTail (E el){\n if (el == null)\n return;\n\n // it the list is empty\n if (this.size <= 0){\n this.head = new Node2<E>(el);\n this.tail = this.head;\n this.size = 1;\n return;\n }\n\n Node2<E> temp = new Node2<E>(el);\n this.tail.setNext(temp);\n this.tail = temp;\n this.size++;\n }", "@Override\n public void addLast(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n } else {\n array[nextLast] = item;\n nextLast = plusOne(nextLast);\n }\n size += 1;\n }", "void addToHead(int v) {\n if (empty) {\n x = v;\n empty = false;\n }\n else {\n next = new Lista (this);\n x = v;\n }\n }", "public void add(T item) \n\t//PRE: The input parameter item can be any type but must be initialized\n\t//POST: The input parameter item is added to the circular linked list\n\t{\n\t\tNode<T> n = new Node<T>(item);\t//initialize new node for list \n\t\tnewState(n);\t\t\t\t\t\n\t\tif(start == null) //if list is empty\n\t\t{ \n\t\t\tstart = n;\n\t\t\tn.next = start;\n\t\t}\n\t\telse \t\t\t//if the list is not empty\n\t\t{ // find end\n\t\t\tNode tmp = start;\n\t\t\twhile(tmp.next != start) \n\t\t\t{ // scan until loop\n\t\t\t\tnewState(tmp);\n\t\t\t\ttmp = tmp.next;\n\t\t\t}\n\t\t\t// tmp.next == start at this point\n\t\t\tn.next = start;\n\t\t\ttmp.next = n; // complete the loop\n\t\t}\n\t\tlength++;\t//increment length of list\n\t\tnewState(null);\n\t}", "public void append(Integer data) {\n\t\t// Construct a node tmp and make null as the next pointer:Step1\n\t\tListNode tmp = new ListNode(data, null);\n\n\t\tif (!isEmpty()) {\n\t\t\t// make next pointer of tail as tmp :Step2\n\t\t\t tail.next = tmp;// tmp is new tail\n\t\t\t\n\t\t} else {\n\t\t\t// but if list is empty then the temp is the only element \n\t\t\t//and is new tail as wells as head[see next statement executed]\t\n\t\t\tthis.head = tmp;\n\t\t}\n\t\tthis.tail = tmp; // now make tmp the new tail:Step2\n\t\n\t\tlength++;\n\t}", "@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }", "public boolean add (Object o) {return addLast(o);}", "@Override\n public void run() {\n chatListAdapter.add(response);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }", "public void append(int data) {\r\n ListNode temp = head;\r\n while(temp.next !=null) {\r\n temp = temp.next;\r\n }\r\n ListNode new_node = new ListNode(data);\r\n temp.next=new_node;\r\n }", "public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}", "public void addLast(Item x);", "public void reAdd(RCheckout handoff) {\n for(int i = 0; i < checkouts.size(); i++) {\n if(checkouts.get(i) == null) continue;\n\n if(checkouts.get(i).getID() == handoff.getID()) {\n checkouts.remove(i);\n checkouts.add(i, handoff);\n break;\n }\n }\n notifyDataSetChanged();\n }", "public void addFirst(Item item){\r\n\t\t if (item == null) throw new NullPointerException();\r\n\t\t if (n == list.length){resize(2*list.length);}\r\n\t\t if(isEmpty()){prior=0;first=0;last=0;latter=1;}\r\n\t\t list[prior--]=item;\r\n\t\t first = prior+1;\r\n\t\t if(prior==-1){prior=list.length-1;}\r\n\t\t n++;}", "@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }", "public void append(Object element)\n {\n if(head==tail){\n head=tail=new SLListNode(element,null);\n return;\n }\n tail=tail.next=new SLListNode(element,null);\n }", "void append(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (back == null) \n\t\t{\n\t\t\tfront = back = temp; //if the list is empty, then the new node temp becomes the front and back of the list as its the only node within the list\n\t\t\tlength++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tback.next = temp; //the next node after the back node becomes the new node temp since it was inserted into the back of the list\n\t\t\ttemp.prev = back; //the new node temp's previous node becomes the back since temp is now the new back of the list\n\t\t\tback = temp; //the new back of the list now becomes the new node temp\n\t\t\tlength++;\n\t\t}\n\t}", "public void addLast(E item) {\n Node<E> n = new Node<>(item);\n size++;\n if(tail == null) {\n // The list was empty\n head = tail = n;\n } else {\n tail.next = n;\n tail = n;\n }\n }", "@Override\n\tpublic RDFList append( final RDFList list ) throws AccessDeniedException;", "private void autoExpand(long toLength) {\n \t\tlist.ensureCapacity((int) toLength);\n \t\tfor (int i = getLength(); i < toLength; i++) {\n \t\t\tlist.add(getRuby().getNil());\n \t\t}\n \t}", "void append(int new_data) {\n\t\tNode new_node = new Node(new_data);\n\t\tNode last = head;\n\t\tnew_node.next = null;\n\t\tif (head == null) {\n\t\t\tnew_node.prev = null;\n\t\t\thead = new_node;\n\t\t\treturn;\n\t\t}\n\t\twhile (last.next != null)\n\t\t\tlast = last.next;\n\t\tlast.next = new_node;\n\t\tnew_node.prev = last;\n\t}", "public static LinkedList append( LinkedList list, int data)\r\n\t{\r\n\t Node newnode = new Node(data); \r\n\t newnode.next = null; \r\n\t\t\t\t\r\n\t\tif (list.head == null)\r\n\t\t{\r\n\t\t\tlist.head = newnode ;\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t\t\t\r\n\t\t\tNode current = list.head;\r\n\t\t\twhile (current.next != null)\r\n\t\t\t{\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t current.next = newnode;\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "private static void testAdd(ArrayList list, int[] content) {\n System.out.print(\"Adding to the list: \");\n for (int index = 0; index < content[index]; index++) {\n list.addToEnd(content);\n } // end for\n System.out.println();\n displayList(list);\n }", "public String addAddressList(BufferedReader address);", "private ByteBuffer grow(int length) {\n if (!mBuffers.isEmpty()) {\n ByteBuffer b = mBuffers.peekLast();\n if (b.limit() + length < b.capacity()) {\n b.mark();\n b.position(b.limit());\n b.limit(b.limit() + length);\n remaining += length;\n return b.order(order);\n }\n }\n\n ByteBuffer ret = obtain(length);\n ret.mark();\n ret.limit(length);\n add(ret);\n\n return ret.order(order);\n }", "public void add(Item item)\n\t {\n\t Node oldfirst = first;\n\t first = new Node();\n\t first.item = item;\n\t first.next = oldfirst;\n\t N++;\n\t}", "public void addLast(Item item) {\n Node oldLast = last;\n last = new Node(oldLast, item, null);\n if (oldLast == null)\n first = last;\n else\n oldLast.next = last;\n size++;\n }", "public void addToEnd(T obj) {\r\n \t\t// Check obj is not null\r\n \t\tif(obj == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t// Check if items is full\r\n \t\tif(numItems == items.length) {\r\n \t\t\tdoubleArrayLength();\r\n \t\t}\r\n \t\titems[numItems++] = obj;\r\n \t}", "public void addToEnd(String value) {\n ListElement current = new ListElement(value);\n if (count == 0) {\n head = current;\n } else {\n tail.connectNext(current);\n }\n tail = current;\n count++;\n }", "private static final <T> List<T> append(List<T> list, T newElement) {\n List<T> newList = Lists.newArrayListWithCapacity(list.size() + 1);\n newList.addAll(list);\n newList.add(newElement);\n return newList;\n }", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }", "public void addFirst(E item) {\n Node<E> n = new Node<>(item, head);\n size++;\n if(head == null) {\n // The list was empty\n head = tail = n;\n } else {\n head = n;\n }\n }", "public void add(List<?> list) {\n list.clear();\n pool.offer(list);\n }", "private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }", "public AppendEntriesRsp AppendEntries(AppendEntriesReq leader) {\n // return if term < currentTerm\n if (leader.getTerm() < this.persistentState.getCurrentTerm()) {\n return new AppendEntriesRsp(this.persistentState.getCurrentTerm(), false);\n }\n //if term > currentTerm\n if (leader.getTerm() > this.persistentState.getCurrentTerm()) {\n //update currentTerm\n this.persistentState.setCurrentTerm(leader.getTerm());\n //step down if leader or candidate\n if (this.role != Role.FOLLOWER) {\n this.role = Role.FOLLOWER;\n }\n //reset election timeout\n resetElectionTimeout();\n }\n //return failure if log doesn't contain an entry at prevLogIndex whose term matches prevLogTerm\n if (this.persistentState.getEntries().size() <leader.getPrevLogIndex() || leader.getPrevLogTerm() == this.persistentState.getEntries().get(leader.getPrevLogIndex()).getTerm()) {\n return new AppendEntriesRsp(this.persistentState.getCurrentTerm(), false);\n }\n boolean conflictDeleted = false;\n for (int i = 0; i < leader.getEntries().length; i++) {\n Entry newEntry = leader.getEntries()[i];\n int indexOnServer = leader.getPrevLogIndex() + 1 + i;\n //if existing entries conflict with new entries\n if (!conflictDeleted && this.persistentState.getEntries().size() >= indexOnServer && !this.persistentState.getEntries().get(indexOnServer).equals(newEntry)) {\n //delete all existing entries starting with first conflicting entry\n for(int j=indexOnServer;j<this.persistentState.getEntries().size();j++) {\n this.persistentState.getEntries().remove(j);\n }\n conflictDeleted = true;\n }\n //append any new entries not already in the log\n this.persistentState.getEntries().add(newEntry);\n }\n\n //advance state machine with newly committed entries\n // TODO: 2017/3/30\n\n return new AppendEntriesRsp(this.persistentState.getCurrentTerm(), true);\n\n }", "@Test\n public void addToNonEmptyCircularList() {\n CircularDoubleLinkedListHW list= new CircularDoubleLinkedListHW();\n list.add(\"A\");\n list.add(\"C\");\n list.add(\"D\");\n list.add(\"E\");\n list.add(\"F\");\n list.add(\"G\");\n assertEquals(\"[A,C,D,E,F,G,]\", list.toString());\n assertEquals(6, list.size());\n //add to a specific index\n list.add(1, \"B\");\n list.add(5, \"B\");\n assertEquals(\"[A,B,C,D,E,B,F,G,]\", list.toString());\n assertEquals(8, list.size());\n //add to the first index\n list.add(0, \"B\");\n assertEquals(\"[B,A,B,C,D,E,B,F,G,]\", list.toString());\n assertEquals(9, list.size());\n //add to second half\n list.add(7, \"B\");\n assertEquals(\"[B,A,B,C,D,E,B,B,F,G,]\", list.toString());\n assertEquals(10, list.size());\n //add to last index\n list.add(10, \"B\");\n assertEquals(\"[B,A,B,C,D,E,B,B,F,G,B,]\", list.toString());\n assertEquals(11, list.size());\n }", "public void updateList()\r\n\t{\r\n\t\tclientQueue.offer(name);\r\n\t}", "public boolean append(E elem) {\r\n\t\tNode<E> newTail = new Node<E>(elem, tail, null);\r\n\t\tif (size == 0) {\r\n\t\t\ttail = newTail;\r\n\t\t\thead = tail;\r\n\t\t} else if (size == 1) {\r\n\t\t\ttail = newTail;\r\n\t\t\thead.next = tail;\r\n\t\t} else {\r\n\t\t\tNode<E> prevTail = tail;\r\n\t\t\ttail = newTail;\r\n\t\t\tprevTail.next = tail;\r\n\t\t}\r\n\t\tindices.add(tail);\r\n\t\tsize++;\r\n\t\treturn true;\r\n\t}", "@Override\n public ListNode<T> append(T e) {\n \treturn new ListNode<T>(e,this);\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "private void resize() {\n int listSize = numItemInList();\n //debug\n //System.out.println(\"resize: \" + nextindex + \"/\" + list.length + \" items:\" + listSize);\n if (listSize <= list.length / 2) {\n for (int i = 0; i < listSize; i++) {\n list[i] = list[startIndex + i];\n }\n } else {\n Object[] newList = new Object[this.list.length * 2];\n\n// System.arraycopy(this.list, startIndex, newList, 0, this.list.length-startIndex);\n for (int i = 0; i < listSize; i++) {\n newList[i] = list[i + startIndex];\n }\n this.list = newList;\n //debug\n //System.out.println(\"After resize:\" + nextindex + \" / \" + list.length + \" items:\" + numItemInList());\n }\n nextindex = nextindex - startIndex;\n startIndex = 0;\n }", "public void addLast(T item) {\n if (size == 0) {\n array[rear] = item;\n size++;\n return;\n }\n\n this.checkReSizeUp();\n rear++;\n this.updatePointer();\n array[rear] = item;\n size++;\n }", "private Queue<Integer> addToQueue(Queue<Integer> q, int item, int maxLength){\n q.add(item);\n while(q.size() > maxLength){\n q.remove(); //make sure the queue size isn't larger than its supposed to be\n }\n //System.out.println(\"queue_after_added \" + q);\n return q;\n }", "public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }", "@Override\n public void add(T newItem) {\n LinkedElement<T> tmpElement = new LinkedElement<>(newItem);\n\n if (firstElement == null) {\n firstElement = tmpElement;\n size = 1;\n } else {\n LinkedElement<T> currentElement = firstElement;\n while (currentElement.next != null) {\n currentElement = currentElement.next;\n }\n // currentElement is the last element in the list, now. Meaning that currentElement.next is null.\n currentElement.next = tmpElement; // These two are pointing at each other now.\n tmpElement.prev = currentElement;\n size++;\n }\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "private void addItem() {\n\t\tString message = edtMessage.getText().toString();\n\t\t// build the human\n\t\tHuman hum = new Human(message, humans.size());\n\t\t// 1° method\n\t\tarrayAdapter.add(hum);\n\t\t// 2° method\n\t\t// messages.add(message);\n\t\t// arrayAdapter.notifyDataSetChanged();\n\t\t// and flush\n\t\tedtMessage.setText(\"\");\n\t}", "private void Writehistory (List list, savekq savehistory){\n if (kiemtrasopt(list) < 10) {\n list.add(0, savehistory);\n } else {\n list.remove(9);\n list.add(0, savehistory);\n }\n }" ]
[ "0.61429197", "0.5937989", "0.5835769", "0.57074994", "0.56839406", "0.5653489", "0.56395626", "0.5638845", "0.5621099", "0.5617045", "0.5612037", "0.5589091", "0.5572618", "0.5548822", "0.55041987", "0.54952544", "0.548495", "0.54847026", "0.54815", "0.5480201", "0.5476285", "0.5472325", "0.547221", "0.5467337", "0.54570323", "0.54200155", "0.5419814", "0.5409976", "0.539992", "0.53966016", "0.53962845", "0.53956515", "0.539473", "0.5383213", "0.53791237", "0.5359858", "0.5348769", "0.53078663", "0.53071", "0.53055984", "0.5290192", "0.52871156", "0.528621", "0.5279833", "0.5277606", "0.52691907", "0.5268785", "0.5268009", "0.5255376", "0.52540654", "0.5253025", "0.524917", "0.5248066", "0.5247463", "0.5242229", "0.5240202", "0.5237974", "0.52301615", "0.5229356", "0.5226581", "0.5223598", "0.52171904", "0.52167624", "0.52149874", "0.52124685", "0.5210424", "0.519884", "0.5198224", "0.5197858", "0.51949686", "0.5194913", "0.51933175", "0.5190909", "0.519056", "0.51898", "0.5187759", "0.5175163", "0.51729685", "0.5170511", "0.51634413", "0.5163114", "0.5160851", "0.51607484", "0.5158666", "0.5153876", "0.5150803", "0.51501304", "0.51476586", "0.5147208", "0.51457", "0.5144086", "0.5138753", "0.5137385", "0.5132435", "0.5131965", "0.5127996", "0.5127277", "0.51258224", "0.5124106", "0.5116721" ]
0.57217234
3
public static Session mSession; shared methods
public static void setShared(Context context, String name, String value) { SharedPreferences prefs = PreferenceManager .getDefaultSharedPreferences(context); SharedPreferences.Editor editor = prefs.edit(); editor.putString(name, value); editor.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "public static Session getSession() {\n return session;\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "protected Session getSession() { return session; }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public Session getSession() { return session; }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "Session getCurrentSession();", "Session getCurrentSession();", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public Session getSession() {\n return session;\n }", "public Session getSession();", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "Session getSession();", "Session getSession();", "public Session getSession()\n {\n return session;\n }", "protected abstract SESSION getThisAsSession();", "public AbstractSession getSession() {\n return session;\n }", "public Session getSession() {\n return session;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session session() {\n return session;\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "public LocalSession session() { return session; }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "private Session() {\n }", "private Session() {\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "DatabaseSession openSession();", "public void setSession(Session session) { this.session = session; }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public String getSession() {\n return this.session;\n }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "Object getNativeSession();", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "@Override\n\t\tpublic HttpSession getSession() {\n\t\t\treturn null;\n\t\t}", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "com.weizhu.proto.WeizhuProtos.Session getSession();", "public SessionService session() {\n return service;\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "public String getSession() {\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "private Session() {\n userId = -1;\n onUserDeletion = null;\n }", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "public interface Session {\n\n String API_KEY = \"kooloco\";\n String USER_SESSION = \"szg9wyUj6z0hbVDU6nM2vuEmbyigN3PgC5q8EksKTs25\";\n String USER_ID = \"24\";\n String DEVICE_TYPE = \"A\";\n\n String getApiKey();\n\n String getUserSession();\n\n String getUserId();\n\n void setApiKey(String apiKey);\n\n void setUserSession(String userSession);\n\n void setUserId(String userId);\n\n String getDeviceId();\n\n void setUser(User user);\n\n User getUser();\n\n void clearSession();\n\n String getLanguage();\n\n String getCurrency();\n\n String getAppLanguage();\n\n void setCurrency(String currency, String lCurrency);\n\n}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public static MemberSession getMemberSession() {\n//\t\treturn getMemberSessionDo2(GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t//\tGPortalExecutionContext.getRequest().getSessionContext().invalidate();\n\t\treturn getMemberSession(GPortalExecutionContext.getRequest().getSessionContext().getId());\n\t}", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "SessionManagerImpl() {\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public static SessionKeeper getInstance(){\r\n if (sessionKeeperInstance == null) sessionKeeperInstance = new SessionKeeper();\r\n return sessionKeeperInstance;\r\n }", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public PSUserSession getSession();", "public GameSession getGameSession()\n {\n return gameSession;\n }", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }", "@java.lang.Deprecated\n public final com.facebook.Session getSession() {\n /*\n r7 = this;\n r1 = 0;\n r2 = 0;\n L_0x0002:\n r3 = r7.lock;\n monitor-enter(r3);\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n if (r0 == 0) goto L_0x000d;\n L_0x0009:\n r0 = r7.userSetSession;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n L_0x000c:\n return r0;\n L_0x000d:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0015;\n L_0x0011:\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x001c;\n L_0x0015:\n r0 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n goto L_0x000c;\n L_0x0019:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n throw r0;\n L_0x001c:\n r0 = r7.accessToken;\t Catch:{ all -> 0x0019 }\n r4 = r7.session;\t Catch:{ all -> 0x0019 }\n monitor-exit(r3);\t Catch:{ all -> 0x0019 }\n if (r0 != 0) goto L_0x0025;\n L_0x0023:\n r0 = r2;\n goto L_0x000c;\n L_0x0025:\n if (r4 == 0) goto L_0x004e;\n L_0x0027:\n r0 = r4.getPermissions();\n L_0x002b:\n r3 = new com.facebook.Session$Builder;\n r4 = r7.pendingAuthorizationActivity;\n r3.<init>(r4);\n r4 = r7.mAppId;\n r3 = r3.setApplicationId(r4);\n r4 = r7.getTokenCache();\n r3 = r3.setTokenCachingStrategy(r4);\n r3 = r3.build();\n r4 = r3.getState();\n r5 = com.facebook.SessionState.CREATED_TOKEN_LOADED;\n if (r4 == r5) goto L_0x005e;\n L_0x004c:\n r0 = r2;\n goto L_0x000c;\n L_0x004e:\n r0 = r7.pendingAuthorizationPermissions;\n if (r0 == 0) goto L_0x0059;\n L_0x0052:\n r0 = r7.pendingAuthorizationPermissions;\n r0 = java.util.Arrays.asList(r0);\n goto L_0x002b;\n L_0x0059:\n r0 = java.util.Collections.emptyList();\n goto L_0x002b;\n L_0x005e:\n r4 = new com.facebook.Session$OpenRequest;\n r5 = r7.pendingAuthorizationActivity;\n r4.<init>(r5);\n r4 = r4.setPermissions(r0);\n r0 = r0.isEmpty();\n if (r0 != 0) goto L_0x0092;\n L_0x006f:\n r0 = 1;\n L_0x0070:\n r7.openSession(r3, r4, r0);\n r4 = r7.lock;\n monitor-enter(r4);\n r0 = r7.sessionInvalidated;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x007e;\n L_0x007a:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n if (r0 != 0) goto L_0x0097;\n L_0x007e:\n r0 = r7.session;\t Catch:{ all -> 0x0094 }\n r7.session = r3;\t Catch:{ all -> 0x0094 }\n r5 = 0;\n r7.sessionInvalidated = r5;\t Catch:{ all -> 0x0094 }\n r6 = r3;\n r3 = r0;\n r0 = r6;\n L_0x0088:\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n if (r3 == 0) goto L_0x008e;\n L_0x008b:\n r3.close();\n L_0x008e:\n if (r0 == 0) goto L_0x0002;\n L_0x0090:\n goto L_0x000c;\n L_0x0092:\n r0 = r1;\n goto L_0x0070;\n L_0x0094:\n r0 = move-exception;\n monitor-exit(r4);\t Catch:{ all -> 0x0094 }\n throw r0;\n L_0x0097:\n r0 = r2;\n r3 = r2;\n goto L_0x0088;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.android.Facebook.getSession():com.facebook.Session\");\n }", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "public static void loadSession(Session session){\n currentSession = session;\n }", "protected abstract SESSION newSessionObject() throws EX;", "public interface SessionManager {\n void getSession(String request);\n}", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "public IEvolizerSession getEvolizerSession() throws EvolizerException {\n // IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(fDbUrl);\n // return session;\n\n return fSession;\n }", "public static HttpSession getSession(Boolean session) {\r\n\t\treturn (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t}", "public static Session currentSession() throws IllegalStateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n throw new IllegalStateException(\"Thread not registered with a session\");\n }\n \n if(!s.isConnected()){\n s.reconnect();\n }\n\n return s;\n }", "SessionManager get();", "public SessionManager ()\r\n\t{\r\n\t\tactiveSessions = new ArrayList<Session>();\r\n\t}" ]
[ "0.78116316", "0.7752096", "0.77089953", "0.7694417", "0.7624708", "0.75686747", "0.75292903", "0.7449781", "0.7443012", "0.7357273", "0.7357273", "0.7339129", "0.7337273", "0.7318659", "0.7310595", "0.7309475", "0.7303222", "0.7270167", "0.72557354", "0.72557354", "0.72512126", "0.72271264", "0.71710175", "0.7155852", "0.7121442", "0.7121442", "0.7121442", "0.7088372", "0.7063364", "0.70593125", "0.70538336", "0.7052145", "0.69474286", "0.6932696", "0.69270116", "0.69226694", "0.6916284", "0.68875873", "0.68875873", "0.6859748", "0.6856789", "0.6856517", "0.68284345", "0.681987", "0.6792145", "0.6790748", "0.6775085", "0.67468554", "0.6744186", "0.67355716", "0.67197907", "0.67073584", "0.6707176", "0.6705589", "0.669443", "0.66876245", "0.66656226", "0.66624755", "0.6645701", "0.6640846", "0.66382647", "0.66335064", "0.66330236", "0.66071844", "0.6584676", "0.65843034", "0.65765303", "0.65533984", "0.65520096", "0.65322614", "0.6524296", "0.65136486", "0.6513079", "0.6513079", "0.6504065", "0.6494215", "0.6488194", "0.64830136", "0.6471774", "0.64687026", "0.6462327", "0.6453437", "0.6448773", "0.64485866", "0.64424753", "0.6424363", "0.64167094", "0.64143664", "0.64097893", "0.63902134", "0.63736296", "0.6372096", "0.6368617", "0.636818", "0.63573337", "0.6356367", "0.6350036", "0.6341764", "0.63307893", "0.63252443", "0.630687" ]
0.0
-1
For moderate walking: Calories burned = 0.029 x weight (lbs) x time (minutes)
public static float caloriesBurnedForWalking(float weight, long steps) { float caloriesBurned; // caloriesBurned = (float) ((0.029 * kgToLbs(weight)) * (walkingStepsToSecond(steps) / 60)); caloriesBurned = (float) ((0.75 * kgToLbs(weight)) * kmToMiles(steps)); return caloriesBurned; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void caloriesBurned(int weight)\n {\n System.out.println(\"No more losers\");\n }", "int getBurnDuration();", "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}", "float getBlackoutPeriod();", "public void operateTheBoatForAmountOfTime(double time){// pass 1 as a time\n\t\t if(time > 0.0 && time <= 5.0 ){\n \tdouble fuelUsage = EfficiencyOfTheBoatMotor*currentSpeedOfTheBoat*currentSpeedOfTheBoat*time;\n \tfuelUsage = fuelUsage/10000;//since we have hp, and miles we have to divide by 10000 to get result in gallons \n double realTime; \n // Determine if we run out of fuel\n\t if(fuelUsage > amountOfFuelInTheTank){ \n\t realTime = time * (amountOfFuelInTheTank/fuelUsage); \n\t amountOfFuelInTheTank=0.0 ;\n\t }else{\n\t \tamountOfFuelInTheTank-=fuelUsage; \n\t realTime = time;\n\t }\n\t DistanceTraveled +=currentSpeedOfTheBoat * realTime; \n\t }\n\t }", "public void drive(double miles)\n {\n double gallonsBurned = miles / this.fuelEfficiency;\n this.fuelInTank = this.fuelInTank - gallonsBurned;\n }", "public double calculateBMI()\n {\n double bmi = (weight / (height * height)) * 703;\n bmi = Math.round(bmi * 100)/100.0;\n return bmi;\n }", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "interface Weightable {\n Double weight(int elapsed, int duration);\n }", "public double findWeight(){\n int totalCoins = gold + silver + copper + electrum + platinum;\n if((totalCoins % 3) == 0){\n return totalCoins/3;\n }\n return totalCoins * weight;\n }", "public double calcTotalCaloriesBurned() {\n double sum = 0.0;\n for (ExerciseModel exercise : exercises) {\n sum += exercise.getCalories();\n }\n\n return sum;\n }", "protected abstract float _getGrowthChance();", "public int getBodyGrowth(int collectTime, int totalCollected);", "public double getBurntFuelMass();", "public double calculateWIP() {\n\t\tdouble totalDeliveryRate = 0.0;\n\t\tdouble totalLeadTime = 0.0;\n LinkedList<Card> completedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : completedCards) {\n totalLeadTime += (int) DAYS.between(card.getCreationDate(versions), card.getCompletionDate(versions));\n\t\t\ttotalDeliveryRate += card.getStoryPoints();\t\n\n }\n\t\ttotalDeliveryRate = totalDeliveryRate/ (BoardManager.get().getCurrentBoard().getAge()); // avrage of cards delivered per time unit\n\t\ttotalLeadTime = totalLeadTime / completedCards.size(); // avarage time it takes to finish a card\n return Math.round(totalDeliveryRate * totalLeadTime * 100D) / 100D;\n }", "public void tick(){\n oilLevel --;\n maintenance --;\n happiness --;\n health --;\n boredom ++;\n }", "int getMortgageRate();", "@Override\n public double earnings() {\n if (getHours() < 40)\n return getWage() * getHours();\n else\n return 40 * getWage() + ( getHours() - 40 ) * getWage() * 1.5;\n }", "private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }", "@Override\n\tpublic double attack() {\n\t\treturn 12.5;\n\t}", "public void tick() {\r\n\t\thunger += (10 + generateRandom());\r\n\t\tthirst += (10 + generateRandom());\r\n\t\ttemp -= (1 + generateRandom());\r\n\t\tboredom += (1 + generateRandom());\r\n\t\tcageMessiness += (1 + generateRandom());\r\n\t}", "public Double getCalories() {\n return product.getCalories() * weight / 100;\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 }", "private static Double calcBMI(Double kilos, Double ms) {\n double bodyMassIndex;\n bodyMassIndex = kilos / (ms * ms);\n return bodyMassIndex;\n }", "public static double calculateBMR(double currentWeightPassed, int heightPassed, int agePassed, String sexPassed) {\n double weightMetric = currentWeightPassed / 2.2;\n double heightMetric = heightPassed * 2.54;\n if(currentWeightPassed > 0 && heightPassed > 0 && agePassed > 0) {\n if (sexPassed.equals(\"Male\")) {\n return 5 + (10 * weightMetric) + (6.25 * heightMetric) - (5 * agePassed);\n } else {\n return -161 + (10 * weightMetric) + (6.25 * heightMetric) - (5 * agePassed);\n }\n }\n else {\n return 0; //if 0/null notify in fragment?\n }\n }", "float getWetness();", "public double getMonthlyAmount()\n\t{\n\t\treturn amountGoal%timeFrame;\n\t}", "private static void caloriesBurned(String loserName)\n {\n System.out.println(\"Loser \" + loserName + \" did not get weighed\");\n }", "public void calibrated() {\n weaponDamage = weaponDamage + 10;\r\n }", "public double getBMI(){\n bmi = weight * KG_PER_POUND / (height * METERS_PER_INCH *height * METERS_PER_INCH);\n return (bmi);\n}", "public void calcSpeed(){\r\n Random rand = new Random();\r\n tire = rand.nextInt(10)+1;\r\n engine = rand.nextInt(10)+1;\r\n weight = rand.nextInt(10)+1;\r\n speed = ((double)(tire+engine+weight))/3;\r\n\r\n //round speed to 2 decimal places\r\n speed = speed*100;\r\n speed = Math.round(speed);\r\n speed = speed/100;\r\n }", "double getTotalReward();", "private double calculateWeightFromCumulativeLosses(double accumulatedLosses, double numTrains) {\r\n\t\t\r\n\t\tdouble n=Math.sqrt(8*Math.log(2)/numTrains);\r\n\t\t//double n=0.5;\r\n\t\treturn Math.exp(-1*n*accumulatedLosses);\r\n\t}", "static int calcCoolingTime(int temperature, int amount) {\n // the time in melting reipes assumes updating 5 times a second\n // we update 20 times a second, so get roughly a quart of those values\n return IMeltingRecipe.calcTimeForAmount(temperature, amount);\n }", "public double manWeight(double height) {\n return (height - 100) * 1.15;\n }", "public double BMI () {\n\t\treturn ( weight / ( height * height ) ) * 703;\n\t}", "public double getHoldTime();", "private int calculateWeight(int distance, int waitingTime){\r\n int weight = distance;\r\n if(waitingTime != 0){\r\n weight = weight / (3* waitingTime);\r\n }\r\n return weight;\r\n }", "public double calculateVelocity(){\n double storyPoints = 0.0; // number of story points completed in total\n double numWeeks = BoardManager.get().getCurrentBoard().getAge()/7.0;\n LinkedList<Card> allCompletedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : allCompletedCards) {\n storyPoints += card.getStoryPoints();\n }\n if (storyPoints == 0.0){\n return 0.0;\n }\n return Math.round(storyPoints/numWeeks * 100D) / 100D;\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 double calculateNetWage(){\r\n\t return (getGrossWage()-fines);\r\n }", "public void train() {\r\n\t\texp += 2;\r\n\t\tenergy -= 5;\r\n\t\tSystem.out.println(\"Gained 2 experience.\");\t\r\n\t}", "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}", "private float calculateBMI (float weight, float height) {\n height = height/100;\n// System.out.println(height);\n double x = Math.pow(height,2);\n// System.out.println(x);\n double a = weight / x;\n// System.out.print(a);\n return (float) a;\n }", "public double womanWeight(double height) {\n return (height - 110) * 1.15;\n }", "public double calculateBmiDragon(){\n\t\treturn weight/(height*height);\n\t}", "public double getWaist() {\n return waist;\n }", "public double getWaist() {\n return waist;\n }", "public void buyHealth() {\n this.healthMod++;\n heathMax += 70 * healthMod;\n }", "private double calculateMoneyToSpend() {\n\t\tdouble moneyToSpend = getMoney();\n\t\tif(moneyToSpend < 300) {\n\t\t\tmoneyToSpend = 0;//We do not want the player to go below 200E\n\t\t}\n\t\telse if(moneyToSpend < 500) {\n\t\t\tmoneyToSpend *= 0.34;\n\t\t}\n\t\telse if(moneyToSpend < 1000) {\n\t\t\tmoneyToSpend*= 0.4;\n\t\t}\n\t\telse if(moneyToSpend < 1500) {\n\t\t\tmoneyToSpend*= 0.5;\n\t\t}\n\t\telse if(moneyToSpend < 2000) {\n\t\t\tmoneyToSpend*= 0.6;\n\t\t}\n\t\telse {\n\t\t\tmoneyToSpend*= 0.7;\n\t\t}\n\t\treturn moneyToSpend;\n\t}", "public double getCost(int miles, int time) {\n\t\treturn 1.00 + (time / 30 ); \n\t}", "public static int GetMills() {\r\n return (int) System.currentTimeMillis() - StartUpTimeMS;\r\n }", "double fuelneeded(int miles) {\n\t\treturn (double) miles / mpg;\n\t}", "double getThroughput();", "@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}", "public void timePasses() {\r\n\t\tfor(Meter a: appMeters){\r\n\t\t\t//incremnts electric use each timepPasses as the fridge is always on\r\n\t\t\tif (a.getType().equals(\"Electric\")){\r\n\t\t\t\ta.incrementConsumed();\r\n\t\t}\r\n\t}\r\n\t}", "public float getWeightUsed()\r\n {\r\n // implement our own magic formula here ...\r\n return 2.0f;\r\n }", "public void buyHealthGainMultiply() {\n this.healthGainMultiply++;\n }", "public double getWorth() {\r\n\t\treturn worth;\r\n\t}", "public double getCurrentFuel();", "@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatWIT();\n\t\t\t}\n\t\t}", "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "protected double getHPM() {\n\t\t\treturn this.getHealing() / this.getCost();\n\t\t}", "void setBurnDuration(int ticks);", "int getMPPerSecond();", "public void incWalkSpeed(int n)\n{\n walkSpeed = walkSpeed - n;\n}", "public double getWindChill() {\n float tempC;\n float windSpeed;\n double windChill = 0;\n double windChillr = 0;\n\n\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n windSpeed = readings.get(readings.size() - 1).windSpeed;\n windChill = 13.12 + (0.6215 * tempC) - (11.37 * Math.pow(windSpeed, 0.16)) + 0.3965 * 6 * Math.pow(2, 0.16);\n windChillr = Math.round(windChill * 10.0) / 10.0;\n } else {\n\n }\n return windChillr;\n }", "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}", "private double enemyKills()\n {\n return (double)enemyResult.shipsLost();\n }", "private int timeToNextAttack() {\n return ATTACK_SPEED - mAttacker.getSpeed();\n }", "public void buyFuel() {\n this.fuelMod++;\n fuelMax += +750 * fuelMod;\n }", "public void win(int wager){\n bankroll += wager;\n }", "public double calculateRate() {\n\t\tdouble rate = 0;\n\t\tfor (int i = 0; i < upgrades.size(); i++) {\n\t\t\trate += upgrades.get(i).getProduction();\n\t\t}\n\t\tbrain.setRate(rate);\n\t\treturn rate;\n\t}", "public static void empWage()\n {\n int WagePerHrs = 20;\n double DailyEmpWage = 0;\n int IsFullTime = 1;\n int IsPartTime = 2;\n int empHrs;\n final int ranValue = new Random().nextInt(1000)%2;\n switch (ranValue){\n case 1:\n empHrs = 8;\n //System.out.println(\"Full Time hrs:\" +empHrs);\n break;\n case 2:\n empHrs = 4;\n //System.out.println(\"Part Time hrs:\" +empHrs);\n break;\n default:\n empHrs = 0;\n }\n DailyEmpWage = WagePerHrs * empHrs;\n System.out.println(\"Daily Emp Wages is :\" +DailyEmpWage);\n }", "public double progress() {\n if (damage <= 0) {\n return damage;\n }\n double n = noise.nextValue();\n damage = damage + (k * damage * damage) + l + n;\n return damage;\n }", "@Override\n public double getWeight() {\n // For this example just assuming all cars weigh 500kg and people weigh 70kg\n return 500 + (70 * this.getNumPassengers());\n }", "protected int calculateWalk() {\n if (isPrimitive()) {\n double rating = getEngine().getRating();\n rating /= 1.2;\n if (rating % 5 != 0) {\n return (int) (rating - rating % 5 + 5) / (int) weight;\n }\n return (int) (rating / (int) weight);\n\n }\n return getEngine().getRating() / (int) weight;\n }", "public double getChange(Monsters monster) {\n return (player.getSkill() + player.getAttack() + player.getDefence()) / (monster.getSkill() + monster.getDefence() + monster.getAttack());\n }", "public void eventLiving(double[] changes){\n living = (int) Math.floor(living * (1 + (changes[0]/100)));\n living += changes[1];\n \n if(living > 100){\n living = 100;\n }\n \n if(living < 0){\n living = 0;\n }\n }", "@Override\n public double salario() {\n return 2600 * 1.10;\n }", "private void calculateOutputPower() { \n if (this.online == true) {\n this.rms = Math.sqrt(this.rmsSum / 40);\n if (this.inputPower - this.rms >= 0) {\n setOutputPower(this.inputPower - this.rms);\n } else {\n setOutputPower(0);\n }\n }\n channel.updateOutput();\n }", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "int getSoilMoistureLevel(int soilMoistureMM);", "public double getBMI() {\n\t\tdouble heightInFeetDbl = insuredPersonInfoDTO.getFeets() + (insuredPersonInfoDTO.getInches() * 0.08333);\n//\t\tlong heightInFeet = Math.round(heightInFeetDbl);\n\t\t\n\t\t// 1lb = 0.45kg\n\t\tdouble weightInKg = insuredPersonInfoDTO.getWeight() * 0.45;\n\t\t\n\t\t// 1ft = 0.3048 meter\n\t\tdouble heightInMeter = heightInFeetDbl * 0.3048;\n\t\t\n//\t\tlong bmiWeight = Math.round(weightInKg / (heightInMeter * heightInMeter));\n\t\tdouble bmiWeight = weightInKg / (heightInMeter * heightInMeter);\n\t\t\n\t\tif (insuredPersonInfoDTO.getFeets() == 0 || insuredPersonInfoDTO.getWeight() == 0\n\t\t\t\t|| bmiWeight == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\"); \n\t\tString bmiWeightStr = df.format(bmiWeight);\n\n\t\t// storing height in inches at below formula\n\t\tinsuredPersonInfoDTO.setHeight(insuredPersonInfoDTO.getFeets() * 12 + insuredPersonInfoDTO.getInches());\n\t\t\n\t\treturn Double.parseDouble(bmiWeightStr);\n\t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "int getHPPerSecond();", "private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }", "public void bake() {\n System.out.println(\"Baking for 25 min at 350\");\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 }", "@Override\n\tpublic double calcSpendFuel() {\n\t\tdouble result = distance / (literFuel - fuelStart);\n\t\treturn result;\n\t}", "@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}", "public int getWorth() { return 1; }", "@Basic\n\tpublic double getTimeInWater(){\n\t\treturn this.time_in_water;\n\t}", "public int getHealthGain();", "private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}", "public Float rumusBMI(float t, float b){\n return b/((t/100)*(t/100));\n }", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "void gainHealth(int points) {\n this.health += points;\n }", "public double getSaturn()\n {\n double saturn = earthWeight * 1.1;\n return saturn;\n }", "@Override\r\n\tpublic float getEnergyConsumption() {\r\n\t\treturn 2500 - robot.getBatteryLevel();\r\n\t}" ]
[ "0.72555465", "0.6480095", "0.61732", "0.6164795", "0.6155793", "0.6093818", "0.60566866", "0.5991033", "0.5957347", "0.5897633", "0.58722967", "0.5868215", "0.5865676", "0.5865551", "0.58552575", "0.5832105", "0.5803429", "0.5787055", "0.5772592", "0.575299", "0.57523376", "0.57459706", "0.5745712", "0.5737179", "0.5736527", "0.5723842", "0.57121456", "0.570694", "0.5697367", "0.56931937", "0.5691318", "0.5690659", "0.5686753", "0.5682669", "0.5677771", "0.56690985", "0.5661089", "0.5643982", "0.5642402", "0.563611", "0.56316096", "0.56270874", "0.5617923", "0.56178117", "0.5613924", "0.5608612", "0.5607184", "0.5607184", "0.56040156", "0.5600508", "0.55964893", "0.5583959", "0.5580317", "0.55782443", "0.5577185", "0.5570599", "0.55699867", "0.5567919", "0.5564085", "0.555794", "0.5553569", "0.5552726", "0.554862", "0.5548505", "0.55484986", "0.55382067", "0.55347335", "0.55329174", "0.5526368", "0.55257094", "0.55209017", "0.5519434", "0.55155426", "0.5514296", "0.5512386", "0.5511689", "0.5505756", "0.55034983", "0.55025977", "0.5502393", "0.549715", "0.54964715", "0.5493614", "0.5492536", "0.54915017", "0.549005", "0.5479382", "0.5478946", "0.5476768", "0.54749036", "0.54671603", "0.5465006", "0.546287", "0.5461987", "0.54583496", "0.5445281", "0.5445012", "0.54415905", "0.5438532", "0.5437587" ]
0.74671006
0
/ Calculating kilometer to miles using total steps
public static float kmToMiles(long steps){ float miles; float distance = (float) (steps * 78) / (float) 100000; miles = (float) (distance / 1.609344); return miles; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void f_kilometers_to_miles(){\n Scanner keyboard = new Scanner(System.in);\r\n\r\n System.out.println(\"Input the value in km: \");\r\n double km = keyboard.nextDouble();\r\n\r\n while (km < 1){\r\n System.err.println(\"Error: invalid value\");\r\n\r\n System.out.println(\"Input the value in km: \");\r\n km = keyboard.nextDouble();\r\n }\r\n\r\n double miles = km * 0.621371;\r\n\r\n System.out.println(\"The conversion is: \"+ miles+ \" miles\");\r\n\r\n\r\n }", "public static void f_miles_to_kilometers(){\n Scanner keyboard = new Scanner(System.in);\r\n\r\n System.out.println(\"Input the value in miles: \");\r\n double miles = keyboard.nextDouble();\r\n\r\n while (miles < 1){\r\n System.err.println(\"Error: invalid value\");\r\n\r\n System.out.println(\"Input the value in miles: \");\r\n miles = keyboard.nextDouble();\r\n }\r\n\r\n double km = miles * 1.60934;\r\n\r\n System.out.println(\"The conversion is: \"+ km+ \" km\");\r\n\r\n }", "public static long toMilesPerHour(double kilometersPerHour) {\n\t\t\tdouble milesPerHour = 0;\n\t\t\tlong output = 0;\n\t\t\tlong iPart;\n\t\t\tdouble fPart;\n\t\t\tif(kilometersPerHour < 0){\n\t\t\t\toutput = -1;\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(kilometersPerHour > 0){\n\t\t\t\tmilesPerHour = kilometersPerHour * 0.62137;\n\t\t\t\tiPart = (long) milesPerHour;\n\t\t\t\tfPart = milesPerHour - iPart;\n\t\t\t\tif(fPart > 0 && fPart < 0.5) {\n\t\t\t\t\toutput = iPart;\n\t\t\t\t}\n\t\t\t\telse if(fPart > 0.5 && fPart <= 0.99d){\n\t\t\t\t\toutput = iPart+1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(kilometersPerHour + \" \" + output);\n\n\t\t\t\n\t\t\treturn output;\n\t\t}", "public static double milesPerHourToCentiMetresPerSecond(double num) { return (num*44.704); }", "public static double feetToMeters(double foot){\r\n\t\t\r\n\t\tdouble meter = 0.305 * foot;\r\n\t\t\r\n\t\treturn meter;\r\n\t}", "double getDistanceInMiles();", "public static double feetPerSecondToCentiMetresPerSecond(double num) { return (num*30.48); }", "public static double kmtoml(double km) {\n return km / mila;\n\n }", "public static double convertmiTOkm (double mi) {\n\tdouble km=mi*1.60934;\n\treturn km;\n}", "public static double centiToMeter(double num) { return (num/Math.pow(10,2)); }", "double fuelneeded(int miles) {\n\t\treturn (double) miles / mpg;\n\t}", "public static double inchesToMillimeters(double inches) {\n return inches * 25.4;\n }", "private static Double convertToMeters(Double Ins) {\n double meters;\n meters = Ins / 39.37;\n return meters;\n }", "public static double MeterToFeet(double m){\n return m*10.76;\n }", "public static double kiloMetresPerHourToCentiMetresPerSecond(double num) { return (num*27.7778); }", "public static final float inchesToMillimeters(float value) {\n\t return value * 25.4f;\n\t}", "public double fuelneeded (int miles) {\n\t\treturn (double) miles / mpg;\n\t}", "public static double millimetersToInches(double millimeters) {\n return millimeters / 25.4;\n }", "public Float getStartMiles() {\n return startMiles;\n }", "public Kilometers(BigDecimal numUnits) { super(numUnits); }", "public static double squareMetersToSquareMilliMeters(double num){ return (num*Math.pow(10,6)); }", "protected static float toMillimeters(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_CM:\n \t\t\treturn (value * 10);\n \t\tcase CSSPrimitiveValue.CSS_MM:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_IN:\n \t\t\treturn (value * 25.4f);\n \t\tcase CSSPrimitiveValue.CSS_PT:\n \t\t\treturn (value * 25.4f / 72);\n \t\tcase CSSPrimitiveValue.CSS_PC:\n \t\t\treturn (value * 25.4f / 6);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}", "public static final float pointsToMillimeters(float value) {\n\t return inchesToMillimeters(pointsToInches(value));\n\t}", "public static double mileToMeter(final double mile) {\n return mile * METERS_PER_MILE;\n }", "public static final float millimetersToInches(float value) {\n\t return value / 25.4f;\n\t}", "public double getCost(int miles, int time) {\n\t\treturn 1.00 + (time / 30 ); \n\t}", "public static double squareMilesToSquareMilliMeters(double num){ return squareKiloMetersToSquareMilliMeters(squareMilesToSquareKiloMeters(num)); }", "private int convertProgressToMeters(int progress) {\n return progress * METERS_PER_PROGRESS;\n }", "public static double meterToMile(final double meter) {\n return meter / METERS_PER_MILE;\n }", "public static double squareInchesToSquareMilliMeters(double num){ return squareCentimetersToSquareMillimeters(squareInchesToSquareCentiMeters(num)); }", "public static double centiMetresPerSecondToMetrePerSecond(double num) { return (num/100); }", "public double toMetersPerSecond(){\n\t\tdouble mps = mph * 1609.34/3600;\n\t\treturn mps;\n\t}", "public static int toApproximateMeters(int microdegrees, int latitude){\n\t\treturn (int)((long)microdegrees * 11 / LONGITUDINAL_MULTIPLIER[latitude/1000000] );\n\t}", "public static double metresPerSecondToCentiMetresPerSecond(double num) { return (num*100); }", "private KilometersPerHour() {}", "public float centimetresToGridUnits(float cm);", "public static double metersToFeet(double meter){\r\n\t\t\r\n\t\tdouble foot = Math.round((meter / 0.305)*1000.0)/1000.0;\r\n\t\t\r\n\t\treturn foot;\r\n\t}", "public double threatCircle() {\t\r\n\t\tdouble miles = 20.0f * Math.pow(1.8, 2*getMagnitude()-5);\r\n\t\tdouble km = (miles * kmPerMile);\r\n\t\treturn km;\r\n\t}", "public static double squareMillimetersToSquareCentimeters(double num){ return (num/100); }", "private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t\t//I'm just declaring all the variables I need right now so I don't need to later.\r\n\t\tdouble miles;\r\n\t\t\r\n\t\tdouble feet;\r\n\t\t\r\n\t\tdouble inches;\r\n\t\t\r\n\t\tdouble meters; \r\n\t\t\r\n\t\t//Here I am printing the prompt for the user to input values I will need to convert to meters\r\n\t\tSystem.out.println(\"Enter miles:\");\r\n\t\t\t\t\r\n\t\t\tScanner userInput = new Scanner (System.in);\r\n\t\t\tmiles = userInput.nextDouble();\r\n\t\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Enter feet:\");\r\n\t\t\r\n\t\t\tScanner userInput2 = new Scanner (System.in);\r\n\t\t\tfeet = userInput2.nextDouble();\r\n\t\t\t\r\n\t\t\t\r\n\t\tSystem.out.println(\"Enter inches:\");\r\n\t\t\r\n\t\t\tScanner userInput3 = new Scanner (System.in);\r\n\t\t\tinches = userInput3.nextDouble();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t/*this is where I am converting all my values to feet, which will then convert to\r\n\t\t\t\t * meters.\r\n\t\t\t\t * \r\n\t\t\t\t * I am declaring new variables to represent converted values and also\r\n\t\t\t\t */\r\n\t\t\t\tdouble convertedMiles;\r\n\t\t\t\tconvertedMiles = miles*5280;\r\n\t\t\t\r\n\t\t\t\tdouble convertedFeet;\r\n\t\t\t\tconvertedFeet = feet*1;\r\n\t\t\t\r\n\t\t\t\tdouble convertedInches;\r\n\t\t\t\tconvertedInches = inches/12;\r\n\t\t\t\t\r\n\t\t//this statement is where I add together all my converted values to reach my total in feet\r\n\t\t//and then I divide by 3.3 to get to my meters, as specified in the directions\r\n\t\tmeters = (convertedMiles + convertedFeet + convertedInches)/3.3;\r\n\t\t\r\n\t\t//This statement declares a new variable that will convert from meters to a rounded version\r\n\t\t//so that I can have a variable that is rounded to the nearest tenth.\r\n\t\tdouble metersRounded = (double)Math.round((meters)*10)/10;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(miles + \" mile(s), \" + feet + \" foot(or feet) \" + inches + \r\n\t\t\t\t\t\t \" inch(es) = \" + metersRounded + \" meter(s).\");\r\n\t\t\r\n\t\tuserInput.close();\r\n\t\tuserInput2.close();\r\n\t\tuserInput3.close();\r\n\t\t\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Enter a distance in kilometers: \");\n Scanner scanner = new Scanner(System.in);\n int distance = scanner.nextInt();\n double distanceInMiles = distance*0.621371192;\n System.out.println(\"In miles this is about: \" + Math.round(distanceInMiles));\n }", "public double getMilesOfTrail() {\n\t\treturn milesOfTrail;\n\t}", "public static double getKilometer(double number) {\n\t\tdouble asKilometer = 0;\n\n\t\tasKilometer = number * 1.6;\n\n\t\treturn asKilometer;\n\t}", "public static double millimetersOfMercuryToAtmosphere(double num) { return (num/760); }", "public static double footToMeter(final double foot) {\n return foot * METERS_PER_FOOT;\n }", "public String getDistance(ExerciseEntry exerciseEntry){\n\n //get exerciseEntry distance\n double miles= exerciseEntry.getmDistance();\n\n //if its miles return Distance in Miles\n if(unitType.length()==5){\n return Integer.toString((int) miles )+\" Miles\";\n }\n //if unitType is Kilometers convert distance to kilometers and get String\n else{\n Double kilometers= miles*1.60934;\n return Integer.toString(kilometers.intValue())+\" Kilometers\";\n }\n }", "public Double kilometersPerSecond()\n\t{\n\t\treturn getValue(VelocityUnit.KILOMETERS_PER_SECOND);\n\t}", "public static long tomilesperhour(double kilometrsperhour) {\n\n if (kilometrsperhour < 0) {\n\n return -1;\n }\n // long milesperhour =\n return Math.round(kilometrsperhour / 1.609);\n // return milesperhour;\n\n }", "public static double calculateEvenRadiusKilometers(double kmRadiusAtEquator, double latitude) {\n if (latitude < 0) {\n latitude *= -1;\n }\n return kmRadiusAtEquator * (-0.009897 * latitude + 1);\n }", "public static double centimeterToMeter(final double centimeter) {\n return centimeter * METERS_PER_CENTIMETER;\n }", "double getActualKm();", "public static double squareFeetToSquareMilliMeters(double num){ return squareMetersToSquareMilliMeters(squareFeetToSquareMeters(num)); }", "public static double inchToMeter(final double inch) {\n return inch * METERS_PER_INCH;\n }", "private String calculateL100Km() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = (fuel * 100) / distance;\n return rounder(value);\n }", "public static double kilometerToMeter(final double kilometer) {\n return kilometer * METERS_PER_KILOMETER;\n }", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "public static double squareKiloMetersToSquareMilliMeters(double num) { return squareCentimetersToSquareMillimeters(squareKiloMetersToSquareCentiMeters(num)); }", "public void kilometersPerSecond(Double val)\n\t{\n\t\tsetValue(val, VelocityUnit.KILOMETERS_PER_SECOND);\n\t}", "private String getMiles(String numero) {\n String c = numero.substring(numero.length() - 3);\r\n //obtiene los miles\r\n String m = numero.substring(0, numero.length() - 3);\r\n String n = \"\";\r\n //se comprueba que miles tenga valor entero\r\n if (Integer.parseInt(m) > 0) {\r\n n = getCentenas(m);\r\n return n + \"mil \" + getCentenas(c);\r\n } else {\r\n return \"\" + getCentenas(c);\r\n }\r\n\r\n }", "public static double squareCentimetersToSquareMillimeters(double num) { return (num*100); }", "public static String printConversion(double kilometersPerHour) {\n\t\t\t// TODO Write an implementation for this method declaration\n\t\t\tString result;\n\t\t\tdouble milesPerHour;\n\t\t\tlong iPart;\n\t\t\tdouble fPart;\n\t\t\tlong output = 0;\n\t\t\tif(kilometersPerHour < 0) {\n\t\t\t\tresult = \"Invalid Value\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmilesPerHour = 0.62137 * kilometersPerHour;\n\t\t\t\tiPart = (long) milesPerHour;\n\t\t\t\tfPart = milesPerHour - iPart;\n\t\t\t\tif(fPart > 0 && fPart < 0.5) {\n\t\t\t\t\toutput = iPart;\n\t\t\t\t}\n\t\t\t\telse if(fPart > 0.5 && fPart <=0.99d) {\n\t\t\t\t\toutput = iPart+1;\n\t\t\t\t}\n\t\t\t\tresult = Double.toString(kilometersPerHour) + \" km/h\" + \" = \" + Long.toString(output) + \" mi/h\";\t\t\t\t\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}", "public static double walkingStepsToSecond(int steps) {\n //Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps\n double oneStepTime = 0.6;//one step taking in 1.6 second\n double timeOfSteps;\n timeOfSteps = oneStepTime * steps;\n return timeOfSteps;\n }", "public double convertDistance(double lat, double value){\n double earthRadius = 6378.137;\n double pi = Math.PI;\n double oneKMeter = (1/((2*pi/360)*earthRadius));\n\n return value * oneKMeter;\n }", "Double getStep();", "private static double distance(double lat1, double lon1, double lat2, double lon2, String unit) {\n double theta = lon1 - lon2;\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\n dist = Math.acos(dist);\n dist = rad2deg(dist);\n dist = dist * 60 * 1.1515;\n if (unit.equals(\"K\")) {\n dist = dist * 1.609344;\n } else if (unit.equals(\"N\")) {\n dist = dist * 0.8684;\n }\n //default miles\n return (dist);\n }", "public static void printconversion(double kilometersperhour) {\n\n if (kilometersperhour < 0) {\n System.out.println(\"invalid value\");\n } else {\n long milesperhour = tomilesperhour(kilometersperhour);\n System.out.println(kilometersperhour + \" km/h = \" + milesperhour + \" mi/h \");\n\n }\n }", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t System.out.print(\"Enter the miles to be converted to kilometers: \");\r\n\t int m = scanner.nextInt();\r\n\t scanner.close();\r\n\t Scanner scaner = new Scanner(System.in);\r\n\t System.out.print(\"Enter the centimeters to be converted to meter: \");\r\n\t int c = scanner.nextInt();\r\n\t scaner.close();\r\n\t\r\n\t\r\n\r\nfor(int i=0; i <= 1 ; i++)\r\n{\r\n switch(i){\r\ncase 1:\r\n\tdouble k;\r\n\tk=1.609*m;\r\n\tSystem.out.println(+m+ \" miles is equal to \" +k+ \"kilometers\");\r\ncase 2:\r\n\tdouble mt;\r\n\tmt=0.01*c;\r\n\tSystem.out.println(+c+ \" centimeters is equal to \" +mt+ \"meters\");\r\n\t\r\n\r\n}}}", "public static int calculateDistanceInKilometer(double srcLat, double srcLng,double dstLat, double dstLng) {\n double latDistance = Math.toRadians(srcLat - dstLat);\n double lngDistance = Math.toRadians(srcLng - dstLng);\n\n double a = Math.sin(latDistance / 2) * Math.sin(latDistance / 2)\n + Math.cos(Math.toRadians(srcLat)) * Math.cos(Math.toRadians(dstLat))\n * Math.sin(lngDistance / 2) * Math.sin(lngDistance / 2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n\n return (int) (Math.round(AVERAGE_RADIUS_OF_EARTH_KM * c));\n\t }", "public static double meterToKilometer(final double meter) {\n return meter / METERS_PER_KILOMETER;\n }", "@PostMapping(path = \"/conversions/ktom\")\n public ResponseEntity convertKilometersToMiles(@Valid @RequestBody ConversionRequest amount) {\n if (amount == null || amount.getAmount() == null) {\n return new ResponseEntity(null , HttpStatus.INTERNAL_SERVER_ERROR);\n }\n return new ResponseEntity(amount.getAmount().divide(ConverterConstants.MILES_TO_KILOMETER,5, RoundingMode.HALF_UP), HttpStatus.OK);\n }", "public final double megabytes()\n\t{\n\t\treturn kilobytes() / 1024.0;\n\t}", "public double dimensionsToMeters() {\n\t\tdouble heightMeters = heightInInches / 39.370;\n\t\tdouble widthMeters = widthInInches / 39.370;\n\n\t\treturn areaInMeters = heightMeters * widthMeters;\n\t}", "public int getCostPerMile() {\n return costPerMile;\n }", "public static double meterToFoot(final double meter) {\n return meter / METERS_PER_FOOT;\n }", "public void Millas_M(){\r\n System.out.println(\"Cálcular Metros o Kilometros de Millas Marinas\");\r\n System.out.println(\"Ingrese un valor en Millas Marinas\");\r\n cadena =numero.next(); \r\n valor = metodo.Doble(cadena);\r\n valor = metodo.NegativoD(valor);\r\n totalM = valor * 1852 ;\r\n Millas_KM(totalM);\r\n }", "public static double computeDiameter(int wireGauge)\r\n{ \r\n return 0.127 * Math.pow(92.0, (36.0 - wireGauge) / 39.0); \r\n}", "public final double kilobytes()\n\t{\n\t\treturn value / 1024.0;\n\t}", "public static double cmToInches(double cms)\n {\n return cms * CM_PER_INCH;\n }", "public void setStartMiles(Float startMiles) {\n this.startMiles = startMiles;\n }", "public static float caloriesBurnedForWalking(float weight, long steps) {\n float caloriesBurned;\n// caloriesBurned = (float) ((0.029 * kgToLbs(weight)) * (walkingStepsToSecond(steps) / 60));\n caloriesBurned = (float) ((0.75 * kgToLbs(weight)) * kmToMiles(steps));\n return caloriesBurned;\n }", "public double convert(double distance, LengthUnit units)\r\n {\r\n return this.toMetersConversionFactor * distance /\r\n units.toMetersConversionFactor;\r\n }", "public void drive(double miles)\n {\n double gallonsBurned = miles / this.fuelEfficiency;\n this.fuelInTank = this.fuelInTank - gallonsBurned;\n }", "private static float calculateStepRate(int stepCount) {\n\n return (float) stepCount / (float) secsPerMinute;\n\n }", "public final Double getMile() {\n return mile;\n }", "public static void main(String[] args) {\n\n double meters = convertInchesToMeters(1000.0);\n DecimalFormat df = new DecimalFormat(\"#.##\");\n\n System.out.println(\"1000.0 inches is \"+df.format(meters));\n\n }", "public static double meterToInch(final double meter) {\n return meter / METERS_PER_INCH;\n }", "public static double cubicMetreToMillilitres(double num) { return (num*Math.exp(6)); }", "public double sizeMeters() {\n return this.size_meters;\n }", "public static void main(String[] args) {\n\t\tdouble d = 14/1.6;\r\n\t\tdouble t = (45*60+30)/3600.0;\r\n\t\tdouble s = d/t;\r\n\t\tSystem.out.println(\"the average speed in miles per hour is \"+s);\r\n\t}", "public static int lengthInInches(int feet, int inches){\n return inches = (12*feet)+inches;\n }", "public Float getEndMiles() {\n return endMiles;\n }", "public Double getDistanceByUnit(final DistanceUnit distanceUnit, final double distanceInKm);", "double getDegreesCoolingPerMBPerK();", "Double getTotalSpent();", "private int toFeet(int inches) {\n return (int) Math.round(inches / 12.0);\n }", "public static Double convertMpsToKmh(double mps) {\n\t\treturn mps * 60 * 60 / 1000;\n\t}", "float calFuelConsumption(float distance, float numLiters);", "public int getKiloWatts(){\n\t\treturn kiloWatts;\n\t}", "public static void main(String[] args) {\n//The integers used in this program\n int secsTrip1 = 480; //initializes secsTrip1 480, which states the number of seconds of trip 1\n int secsTrip2 = 3220; //initializes secsTrip2 3220, which states the number of seconds of trip 2\n int countsTrip1 = 1561; //initializes countTrip1 1561, which states the number of counts of trip 1\n int countsTrip2 = 9037; //initializes countTrip2 9037, which states the number of count of trip 2\n \n //The operations used in this program \n double wheelDiameter = 27.0; //Initializes wheelDiameter as 27.0 \n double PI = 3.14159; // States Pi as a constant\n int feetPerMile = 5280; //States the conversion factor of feetPerMile\n int inchesPerFoot = 12; //States the conversion factor of inchesPerFoot\n int secondsPerMinute = 60; //States the conversion factor of secondsPerMinute\n double distanceTrip1, distanceTrip2, totalDistance; //Declares distanceTrip1, distanceTrip2, totalDistance as double\n \n //Outputs of the program\n //Prints out the time it took for trip 1 and the counts it had \n System.out.println(\"Trip 1 took \" + (secsTrip1/secondsPerMinute) + \" minutes and had \" + countsTrip1 + \" counts.\"); \n //Prints out the time it took for trip 1 and the counts it had\n System.out.println(\"Trip 2 took \" + (secsTrip2/secondsPerMinute) + \" minutes and had \" + countsTrip2 + \" counts.\");\n \n distanceTrip1 = countsTrip1 * wheelDiameter * PI; // Gives distance in inches\n distanceTrip1 /= inchesPerFoot * feetPerMile; // Gives distance in miles\n distanceTrip2 = countsTrip2 * wheelDiameter * PI / inchesPerFoot / feetPerMile;\n totalDistance = distanceTrip1 + distanceTrip2;\n\n //Print out the output data.\n System.out.println(\"Trip 1 was \"+distanceTrip1+\" miles\");\n System.out.println(\"Trip 2 was \"+distanceTrip2+\" miles\");\n System.out.println(\"The total distance was \"+totalDistance+\" miles\");\n\n\n\n}" ]
[ "0.7412972", "0.7326079", "0.71208596", "0.6827809", "0.67369956", "0.6734108", "0.66923964", "0.66903746", "0.66309726", "0.6623946", "0.65940773", "0.6566053", "0.6557775", "0.6494317", "0.6451833", "0.64512175", "0.6419199", "0.63796055", "0.6316893", "0.62792647", "0.62753433", "0.62422496", "0.6207566", "0.618583", "0.61825824", "0.61787623", "0.61722237", "0.61366254", "0.611726", "0.6114465", "0.6100665", "0.6088334", "0.6072832", "0.60728025", "0.6047819", "0.60449284", "0.60436106", "0.6043329", "0.60355204", "0.602793", "0.6025597", "0.60183334", "0.60108304", "0.5966593", "0.59546703", "0.59453905", "0.5930907", "0.59304804", "0.5924642", "0.59179366", "0.59062487", "0.5900225", "0.58919907", "0.5841811", "0.5833782", "0.58195287", "0.5808159", "0.58033496", "0.57977927", "0.57842696", "0.57769513", "0.5754129", "0.57450074", "0.57414955", "0.5733444", "0.5727717", "0.57205915", "0.5714639", "0.5705365", "0.57045066", "0.5669202", "0.56678885", "0.5660086", "0.5617451", "0.56095976", "0.56042075", "0.559318", "0.55819654", "0.557228", "0.55645293", "0.5546232", "0.5540103", "0.5527353", "0.5511734", "0.5509219", "0.5506393", "0.5493288", "0.5489011", "0.54879034", "0.5478299", "0.5470367", "0.5468544", "0.5467129", "0.54582894", "0.54452676", "0.5441019", "0.5438397", "0.5436561", "0.5435849", "0.5425982" ]
0.83151037
0
/ this function returning seconds of steps
public static double walkingStepsToSecond(int steps) { //Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps double oneStepTime = 0.6;//one step taking in 1.6 second double timeOfSteps; timeOfSteps = oneStepTime * steps; return timeOfSteps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double runningStepsToSecond(int steps) {\n double oneStepTime = 0.6;//one step taking in 1.6 second\n double timeOfSteps;\n timeOfSteps = oneStepTime * steps;\n return timeOfSteps;\n }", "public static double getTimeStep(Cell[] cells){\n return cells[0].dx / Math.abs(Info.ADVECTION_VEL) * Info.CFL; \n }", "int getTtiSeconds();", "private static int timeSpent(Step s) {\n return s.getName().getBytes()[0] - 64 + PENALTY_TIME;\n }", "public double getStepsCycle() {\n\t\treturn stepsSleep + stepsCS;\n\t}", "private void stepTiming() {\n\t\tdouble currTime = System.currentTimeMillis();\n\t\tstepCounter++;\n\t\t// if it's been a second, compute frames-per-second\n\t\tif (currTime - lastStepTime > 1000.0) {\n\t\t\tdouble fps = (double) stepCounter * 1000.0\n\t\t\t\t\t/ (currTime - lastStepTime);\n\t\t\t// System.err.println(\"FPS: \" + fps);\n\t\t\tstepCounter = 0;\n\t\t\tlastStepTime = currTime;\n\t\t}\n\t}", "public long getTimeTaken();", "public static int getTimeSeconds() {\n return Atlantis.getBwapi().getFrameCount() / 30;\n }", "public double getSecs( );", "int stepsToGo();", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "public double getTimestep(double dt, double time_passed) {\n\t\tif ((getVx() == 0) && (getVy() == 0) && (getAx() == 0) && (getAy() == 0))\n\t\t\treturn dt - time_passed;\n\t\treturn Math.min(0.01/(Math.sqrt(Math.pow(getVx(), 2) + Math.pow(getVy(), 2)) +\n\t\t\t\tMath.sqrt(Math.pow(getAx(), 2) + Math.pow(getAy(), 2))*dt), dt - time_passed);\n\t}", "Double getStep();", "public abstract float getSecondsPerUpdate();", "public double getAnimationSeconds()\n\t{\n\t\treturn seconds_passed;\n\t}", "public long getSecondsUntilNextExecutionTime() {\n\t\treturn (getNextExecutionTime().getTime() - System.currentTimeMillis()) / 1000;\n\t\t\n\t}", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "static int timer (long maxTime, int loopSteps) {\r\n\t\tlong TStart = System.currentTimeMillis(); //starting time\r\n\t\tlong TEnd = TStart + maxTime; \r\n\t\tint t=0;\r\n\t\twhile (System.currentTimeMillis() <= TEnd) { //\r\n\t\t\tt++; //loop counter \r\n\t\t\tif (t % loopSteps == 0) { \r\n\t\t\t\tSystem.out.println(\"Number of loops: \"+t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total number of loops: \"+t); \r\n\t\treturn t;\r\n\t}", "public float getTimeSeconds() { return getTime()/1000f; }", "public static double ParaTimer(){\n return (System.nanoTime() - timer)/(1000000000.);\n }", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "long elapsedTime();", "@Override\n public int getTimeForNextTicInSeconds() {\n int seconds = Calendar.getInstance().get(Calendar.SECOND);\n return 60 - seconds;\n }", "long duration();", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public long getElapsedSeconds() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed / nsPerSs;\n\t}", "public int getTotalTime();", "float getStepPhaseShiftIncrement();", "public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }", "public static double getExecutionTimeInSeconds(){\n\t\treturn (executionTime * (1.0e-9));\n\t}", "public Double waitTimeCalculatior(long start) {\n\t\t\t\tdouble difference = (System.currentTimeMillis() - start);\n\t\t\t\treturn difference;\n\t\t\t}", "private double computeFPS(double t)\n {\n\tif (t == 0 || !drawAnimation.value) {\n\t numPrevT = 0;\n\t return 0;\n\t}\n\n\tint which = numPrevT % prevT.length;\n\tdouble tdiff = t - prevT[which];\n\n\tprevT[which] = t;\n\tnumPrevT++;\n\n\t// Only compute frame rate when valid\n\tif (numPrevT <= prevT.length || tdiff <= 0) {\n\t return 0;\n\t}\n\n\treturn prevT.length / tdiff;\n }", "public double getStopTime();", "public void timePassed(double dt) {\n\n }", "public void timePassed(double dt) {\n\n }", "public long getElapsedTimeSecs() {\n return running ? ((System.currentTimeMillis() - startTime) / 1000) % 60 : 0;\n }", "long getElapsedTime();", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "public static double toc() {\n\t\treturn System.currentTimeMillis() / 1000d - t;\n\t}", "public static long getElapsedTimeSecs() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = ((System.nanoTime() - startTime)/1000000);\n\t\t} else {\n\t\t\telapsed = ((stopTime - startTime)/1000000);\n\t\t}\n\t\treturn elapsed;\n\t}", "Integer getTotalStepCount();", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "private int calculateCalories(int steps) {\n\t\treturn (int) (steps * 0.25);\n\t}", "public int getSecondsPassed()\n {\n return this.seconds;\n }", "private static float calculateStepRate(int stepCount) {\n\n return (float) stepCount / (float) secsPerMinute;\n\n }", "public double computeElapsedTime() {\r\n\r\n long now = System.currentTimeMillis();\r\n\r\n elapsedTime = (double) (now - startTime);\r\n\r\n // if elasedTime is invalid, then set it to 0\r\n if (elapsedTime <= 0) {\r\n elapsedTime = (double) 0.0;\r\n }\r\n\r\n return (double) (elapsedTime / 1000.0); // return in seconds!!\r\n }", "int getRunningDuration();", "public double toDelta() {\n return ((double)(_secs)) + _fracDouble;\n }", "public long elapsedMillis() {\n/* 162 */ return elapsedTime(TimeUnit.MILLISECONDS);\n/* */ }", "public double getTime(int timePt);", "public int getSeconds(){\n return (int) (totalSeconds%60);\n }", "public double getSimulationStepDuration() {\n\t\treturn Kernel.getSingleton().getSimulationClock().getSimulationStepDuration();\n\t}", "public float getTimeInTransitions() {\n\t\t\treturn (float) ((long) getTotalTransitions() * (long) getTransitionLatency() / 1E9);\n\t\t}", "public int delta()\r\n\t{\r\n\t\treturn smooth ? (resolution / fps) : duration;\r\n\t}", "public long getElapsedTime(){\n long timePassed = endTime - startTime;\n return timePassed;\n }", "public long getLoopTime();", "public static double getSecondsTime() {\n\t\treturn (TimeUtils.millis() - time) / 1000.0;\n\t}", "private long getDistanceFromSecondMark(){\n long numSecsElapsed = (long)Math.floor(timeElapsed / WorkoutStatic.ONE_SECOND);\n return timeElapsed - numSecsElapsed * WorkoutStatic.ONE_SECOND;\n }", "int getStep();", "int getStep();", "int getStep();", "private long getPTSUs() {\n long result = System.nanoTime() / 1000L;\n if (result < prevOutputPTSUs)\n result = (prevOutputPTSUs - result) + result;\n return result;\n }", "public long timeAlg(){\n long startTime = System.nanoTime();\n \n this.doTheAlgorithm();\n \n long endTime = System.nanoTime();\n long elapsedTime = endTime - startTime;\n \n return elapsedTime;\n }", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "int getPaceSeconds() {\r\n\t\tint m = getContents(minutes);\r\n\t\tint s = getContents(seconds);\r\n\t\treturn 60*m +s;\r\n\t}", "public double getTimeRemaining() {\n\t\treturn (startingTime + duration) - System.currentTimeMillis();\n\t}", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "private long getTotalDuration() {\n if(mMarkers.size() == 0) {\n return 0;\n }\n long first = mMarkers.get(0).time;\n long last = mMarkers.get(mMarkers.size() - 1).time;\n return last - first;\n }", "public double getAsSeconds()\n {\n return itsValue / 1000000.0;\n }", "int getSequenceStepsCount();", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();", "int getChronicDelayTime();", "public static float getDeltaMillis()\r\n {\r\n long t = (long)(getDelta()/DAMPING);\r\n return TimeUnit.MILLISECONDS.convert(t, TimeUnit.NANOSECONDS); \r\n }", "public int calculateTimeForDeceleration(int i) {\n return super.calculateTimeForDeceleration(i) * 4;\n }", "public static double tic() {\n\t\tt = System.currentTimeMillis() / 1000d;\n\t\treturn t;\n\t}", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "@Override\n public float getTimeInSeconds() {\n return getTime() * INVERSE_TIMER_RESOLUTION;\n }", "public void step(long t) {\n\n\t}", "@Override\r\n\tpublic double getCurrentStepStart() {\n\t\treturn 0;\r\n\t}", "public void step() {\n \tinternaltime ++;\n \n }", "public float getIterationValue()\n\t{\n\t\tif (getDuration() <= 0) { return 1; }\n\t\treturn getCurrentTime() / getDuration();\n\t}", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "public void timePassed() {\n this.moveOneStep();\n }", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "long getInitialDelayInSeconds();", "public float getTime() {\n return Math.abs(endTime - startTime) / 1000000f;\n }", "private int toTime(int i) {\n int count = 0;\n\n //hours units\n count += toLeds((i / 6000) % 10);\n //hours tens\n count += toLeds(((i / 6000) % 100) / 10);\n\n //minutes units\n count += toLeds((i / 60) % 10);\n //minutes tens\n count += toLeds(((i / 60) % 100) / 10);\n\n //seconds units\n count += toLeds((i % 60) % 10);\n //seconds tens\n count += toLeds(((i % 60) % 100) / 10);\n\n return count;\n }", "public Double getTime() {\n\t\treturn new Double((double) length * 36) / ((((double) speed) * 100));\n\t}", "public int getduration() {\n\t\tDuration duration = Duration.between(initial_time, current_time);\n\t\treturn (int)duration.getSeconds();\n\t}", "public double getElapsedTime() {\r\n return (double) (elapsedTime / 1000.0); // convert from milliseconds to seconds\r\n }", "@Override\n\tpublic float getTimePerFrame() {\n\t\treturn tpf;\n\t}", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "@Override\r\n\tpublic double getStep(double step){\n\t\treturn 0;\r\n\t}", "private long getGameDuration() {\n return ((System.currentTimeMillis() - startGameTime) / 1000);\n }", "long getTotalDoExamTime();", "public long elapsedTime(TimeUnit desiredUnit) {\n/* 153 */ return desiredUnit.convert(elapsedNanos(), TimeUnit.NANOSECONDS);\n/* */ }", "public int step() {\n // Step CPU\n int cycleInc = cpu.step();\n cycles += cycleInc;\n\n timer.update(cycleInc, ram);\n\n // Update LCD\n // hack so that LCD never will have to care about speedSwitch (ugly or beautiful?).\n lcd.updateLCD(cycleInc);\n if ( videoReciever != null && lcd.newScreenAvailable() ) {\n \tvideoReciever.transmitVideo(lcd.getPixels());\n }\n return cycleInc;\n }", "abstract int steps();", "public double getElapsedTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs && (( SpObs )child).isOptional() )\n\t\t\t\t\telapsedTime += ( ( SpObs )child ).getElapsedTime() ;\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t\telapsedTime += (( SpMSB )child).getElapsedTime() ;\n\t\t}\n\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\treturn elapsedTime ;\n\t}" ]
[ "0.75882363", "0.69484985", "0.6914485", "0.69111866", "0.68975073", "0.674397", "0.6742501", "0.67259747", "0.67001647", "0.6678203", "0.66775906", "0.6659313", "0.6599609", "0.65844274", "0.65825766", "0.65696", "0.656205", "0.6546356", "0.65252227", "0.6516115", "0.64971787", "0.6491659", "0.64832634", "0.647952", "0.6475703", "0.6422709", "0.64169735", "0.639502", "0.63728476", "0.6362982", "0.63137037", "0.6293386", "0.6288439", "0.6282796", "0.6272722", "0.6272722", "0.6267998", "0.6257486", "0.6256638", "0.6248358", "0.6242942", "0.6223461", "0.6218984", "0.62144905", "0.62108433", "0.62034047", "0.61927986", "0.61914015", "0.61879593", "0.618037", "0.61522514", "0.6150286", "0.61416054", "0.61370975", "0.6131753", "0.6117788", "0.6114431", "0.6110793", "0.6109511", "0.61026096", "0.61026096", "0.61026096", "0.60951626", "0.6094331", "0.60704863", "0.606992", "0.60661703", "0.6061993", "0.6043792", "0.6038691", "0.60385305", "0.60356516", "0.60142034", "0.6010167", "0.6004148", "0.6001282", "0.59844565", "0.59826714", "0.5978676", "0.5970665", "0.5962751", "0.59614694", "0.59614295", "0.595223", "0.5948706", "0.59457934", "0.59386444", "0.5937674", "0.59367406", "0.59347355", "0.59288573", "0.5926884", "0.5920829", "0.5919088", "0.5917145", "0.5915985", "0.59137446", "0.59128803", "0.59048533", "0.59034973" ]
0.74131465
1
Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps
public static double runningStepsToSecond(int steps) { double oneStepTime = 0.6;//one step taking in 1.6 second double timeOfSteps; timeOfSteps = oneStepTime * steps; return timeOfSteps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "void easy_ride (double min_lift) { \n double pitch = 0;\n double min_drag = 10000.0;\n double step = 2;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if (//(step < 0 && velocity+step <= 0) ||\n (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "void easy_ride_from_70kmh_down (double min_lift) { \n double start_speed = 70; // kmh\n double pitch = 0;\n double min_drag = 10000.0;\n double step = -10;\n velocity = start_speed;\n for (int count = 0; count < 10000; count++) {\n trace(\"velocity: \" + velocity + \" step: \" + step);\n steady_flight_at_given_speed(5, 0);\n double total_drag = total_drag();\n double foil_lift = foil_lift();\n if (Math.abs(step) < 0.01) break;\n if ((step < 0 && velocity+step <= 0) ||\n // (step > 0 && velocity >= 70) ||\n foil_lift < load ||\n total_drag > min_drag) { // can't pivot because of local max of drag before taking off.... \n velocity -= step;\n step *= 0.5;\n } else {\n velocity += step;\n min_drag = total_drag;\n }\n }\n make_cruising_info(min_lift, min_drag, velocity); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }", "public void go()\n {\n for( int i = 0; i<3; i++)m[i].setSpeed(720);\n step();\n for( int i = 0; i<3; i++)m[i].regulateSpeed(false);\n step();\n }", "public void incWalkSpeed(int n)\n{\n walkSpeed = walkSpeed - n;\n}", "public static double walkingStepsToSecond(int steps) {\n //Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps\n double oneStepTime = 0.6;//one step taking in 1.6 second\n double timeOfSteps;\n timeOfSteps = oneStepTime * steps;\n return timeOfSteps;\n }", "void move(int steps);", "public void randomWalk() {\n if (getX() % GameUtility.GameUtility.TILE_SIZE < 5 && getY() % GameUtility.GameUtility.TILE_SIZE < 5) {\n if (canChangeDirection) {\n direction = (int) (Math.random() * 3);\n direction += 1;\n direction *= 3;\n canChangeDirection = false;\n }\n }\n move(direction);\n if (timer >= timeTillChanngeDirection) {\n canChangeDirection = true;\n timer = 0;\n }\n\n if (lastLocation.x == this.getLocation().x && lastLocation.y == this.getLocation().y) {\n direction = (direction + 3) % 15;\n canChangeDirection = false;\n\n }\n lastLocation = this.getLocation();\n\n }", "@Override\n\tpublic void doTimeStep() {\n\t\tint activity = Critter.getRandomInt(3);\n\t\tif(activity == 0) {\n\t\t\twalk(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(activity == 1) {\t\t\t\t\n\t\t\trun(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(this.getEnergy() >= Params.min_reproduce_energy) {\n\t\t\tCritter4 egg = new Critter4();\n\t\t\tthis.reproduce(egg,Critter.getRandomInt(8));\n\t\t}\n\t\telse {\n\t\t}\n\t}", "void easy_ride_old (double min_lift, double start_speed) { \n double pitch = 0;\n double min_drag = 10000.0;\n double min_drag_speed = -1;\n for (double speed = start_speed; speed < v_max; speed += 0.5) {\n velocity = speed;\n trace(\"velocity: \" + velocity);\n for (pitch = 0; pitch <= aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n // if (total_drag() >= max_drag) {\n // trace(\"warning speed: \" + speed + \" pitch: \" + pitch + \" lift \" + foil_lift());\n // return;\n // }\n if (foil_lift() >= min_lift) {\n double drag = total_drag();\n if (min_drag > drag) {\n min_drag = drag;\n min_drag_speed = velocity;\n break;\n } else {\n // drag goes up now. can be done now, but\n // as a heuristic, now try from the upepr limit, and then find range:\n max_speed(min_lift, min_drag + 2, false);\n if (velocity < min_drag_speed) {\n // something went wrong (iteration stepped over the sweets spot etc)\n // so we take min_lift, min_drag, and min_drag_speed as is\n make_cruising_info(min_lift, min_drag, min_drag_speed); \n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n } else {\n // done, report with average of min_drag_speed and velocity\n make_cruising_info(min_lift, min_drag+1, (min_drag_speed+velocity)/2); \n trace(\"done with refinement! \");\n System.out.println(\"\\nDone!\\n----------------\\n\" + cruising_info);\n }\n return;\n }\n }\n }\n }\n }", "@Override\r\n\tpublic void doTimeStep() {\n\t\tdir = Critter.getRandomInt(8);\r\n\t\t\r\n\t\tnumSteps = Critter.getRandomInt(maxStep) + 1;\r\n\t\t\r\n\t\t//go a random number of steps in that direction\r\n\t\tfor(int i = 0; i < numSteps; i++) {\r\n\t\t\twalk(dir);\r\n\t\t}\t\t\r\n\t}", "public void move()\n\t{\n time++;\n\t\tif (time % 10 == 0)\n\t\t{\n\t\t\thistogramFrame.clearData();\n\t\t}\n\t\tfor (int i = 0; i < nwalkers; i++)\n\t\t{\n\t\t\tdouble r = random.nextDouble();\n\t\t\tif (r <= pRight)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] + 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] - 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft + pDown)\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] + 1;\n\t\t\t}\n\t\t\tif (time % 10 == 0)\n\t\t\t{\n\t\t\t\thistogramFrame.append(Math.sqrt(xpositions[i] * xpositions[i]\n\t\t\t\t\t\t+ ypositions[i] * ypositions[i]));\n\t\t\t}\n\t\t\txmax = Math.max(xpositions[i], xmax);\n\t\t\tymax = Math.max(ypositions[i], ymax);\n\t\t\txmin = Math.min(xpositions[i], xmin);\n\t\t\tymin = Math.min(ypositions[i], ymin);\n\t\t}\n\t}", "@Override\n public void run() {\n ElapsedTime time = new ElapsedTime();\n time.reset();\n sleep(3000);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n sh.hitRing();\n sleep(600);\n //sh.pivotStop.setPosition(.55);\n sh.hitRing();\n sleep(500);\n //sh.pivotDown();\n sh.hitRing();\n sleep(500);\n sh.withdraw();\n sh.lift.setPower(0);\n sh.lift.setPower(0);\n wobble.wobbleUp();\n sh.pivotStop.setPosition(1);\n loop.end();\n\n\n }", "@Override\n public void timePassed() {\n moveOneStep();\n }", "@Override\n\tpublic void step() {\n\t\ty += speed;\n\t}", "public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public interface Hwalk {\n void startForwardWalk();//前进;\n void startBackwardWalk();//后退\n void startTurnLeftWalk();//左转\n void startTurnRightWalk();//右转\n void startLeftWalk();//左走\n void startLeftForwardWalk();//左前走\n void startLeftBackwardWalk();//左后走\n void startRightWalk();//右走\n void startRightForwardWalk();//右前走\n void startRightBackwardWalk();//右后走\n void stopWalk();//停止\n void destoryWalk();//关闭步态算法\n void setWalkSpeed(int[] speed);//设置速度\n}", "public void smoothMovePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n }", "public void pos60() throws InterruptedException{\r\n bucketOverSweeper();\r\n sleep(2500);\r\n motorShoulder.setTargetPosition(-1160);\r\n motorElbow.setTargetPosition(2271);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.5);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3075);\r\n motorShoulder.setTargetPosition(-1300);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_FAST);\r\n sleep(1000);\r\n\r\n motorElbow.setTargetPosition(3500);\r\n motorElbow.setPower(POWER_ELBOW_SLOW);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(MAX_BUCKET);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3600);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(1000);\r\n\r\n servoBucket.setPosition(0.85);\r\n\r\n servoBucket.setPosition(0.80);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.70);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.65);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.60);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.55);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.50);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.40);\r\n sleep(500);\r\n\r\n servoBucket.setPosition(0.30);\r\n sleep(500);\r\n\r\n motorElbow.setTargetPosition(3000);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n sleep(500);\r\n\r\n posBucket = MAX_BUCKET;\r\n posElbow = 3000;\r\n posShoulder = -1275;\r\n sleep(3000);\r\n returnBucket();\r\n\r\n }", "void steady_flight_at_given_speed (double step, double start_pitch) {\n // preamble: make sure inputs are in\n //computeFlowAndRegenPlotAndAdjust();\n\n //strut.aoa = 0.5; // ad hoc\n\n recomp_all_parts();\n\n double load = FoilBoard.this.load;\n\n // now moved into load box and bar \n //rider.weight = load - BOARD_WEIGHT - RIG_WEIGHT - FOIL_WEIGHT;\n\n steady_flight_at_given_speed___ok = false; // so far util done\n\n craft_pitch = start_pitch;\n // double prev_pitch = -20; // we nned it only because pitch value gets rounded somewhere in recomp_all_parts...\n while (craft_pitch < aoa_max && craft_pitch > aoa_min) {\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n double lift = foil_lift();\n if (lift == load // exact hit, done !(almost never happens, though)\n // happens due to rounding\n // || prev_pitch == craft_pitch\n ) \n break;\n if (step > 0 && lift > load) { // done or pivot\n if (step < 0.0025) { \n // done! flight is OK\n steady_flight_at_given_speed___ok = true;\n break;\n }\n step = -step/2; // shrink step & pivot\n } else if (step < 0 && lift < load) { \n step = -step/2; // shrink step & pivot\n } // else keep going with current stepa\n // prev_pitch = craft_pitch;\n craft_pitch += step;\n }\n\n // expect small increse in drag as the result\n vpp.set_mast_aoa_for_given_drag(total_drag()); // (wing.drag+stab.drag);\n recomp_all_parts();\n\n // old linearly increasing logic \n //find_aoa_of_min_drag();\n //if (foil_lift() > load_numeric) {\n // // need to reduce AoA\n // while (craft_pitch > aoa_min) {\n // craft_pitch -= 0.1;\n // System.out.println(\"-- reducing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() <= load_numeric) \n // break; // done\n // } \n //}\n //else if (foil_lift() < load_numeric) {\n // // need to increase AoA\n // while (craft_pitch < aoa_max) {\n // craft_pitch += 0.1;\n // System.out.println(\"-- increasing... craft_pitch: \" + craft_pitch);\n // computeFlowAndRegenPlotAndAdjust();\n // recomp_all_parts();\n // if (foil_lift() >= load_numeric) \n // break; // done\n // } \n //}\n\n }", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "public void accelerate(){\n speed += 5;\n }", "public void nextClockChange(int nextJump);", "public int liftStepper() {\n if(robot.wrist.getPosition()> .25)\n {\n if(robot.jaw.getPosition()> .25)\n {\n telemetry.addLine(\"I could self damage.\");\n }\n }\n else{\n if (this.improvedGamepad1.y.isInitialPress()) {\n step = step + 1;\n if (step > 5) {\n step = 5;\n }\n power = .5;\n //up by one\n }\n if (this.improvedGamepad1.a.isInitialPress()) {\n step = step - 1;\n if (step < 0) {\n step = 0;\n }\n power = .5;\n //down by one\n }\n\n if (this.improvedGamepad1.b.isInitialPress()) {\n topStep = step;\n step = 0;\n power = .7;\n //to bottom\n }\n\n if (this.improvedGamepad1.x.isInitialPress()) {\n step = topStep;\n power = .7;\n //to top\n }\n\n }\n\n telemetry.addData(\"Step\", step);\n telemetry.addData(\"Top Step\", topStep);\n telemetry.update();\n\n\n //DcMotor lift = this.hardwareMap.dcMotor.get(\"lift\");\n int targetPosition = step * 750;\n\n robot.lift.setTargetPosition(targetPosition);\n robot.lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.lift.setPower(power);\n\n telemetry.update();\n return step;\n\n }", "public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}", "public void pos90() throws InterruptedException {\r\n bucketOverSweeper();\r\n sleep(2500);\r\n\r\n posElbow = 2200;\r\n posShoulder = 0;\r\n posBucket = 1.0;\r\n motorElbow.setTargetPosition(posElbow);\r\n motorShoulder.setTargetPosition(posShoulder);\r\n servoBucket.setPosition(posBucket);\r\n motorElbow.setPower(POWER_ELBOW_FAST);\r\n motorShoulder.setPower(POWER_SHOULDER_SLOW);\r\n\r\n posBucket = 0.2;\r\n servoBucket.setPosition(posBucket);\r\n sleep(1000);\r\n\r\n posBucket = 0.4;\r\n servoBucket.setPosition(posBucket);\r\n sleep(1000);\r\n\r\n posBucket = 0.5;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.4;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.3;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.2;\r\n servoBucket.setPosition(posBucket);\r\n sleep(200);\r\n\r\n posBucket = 0.15;\r\n servoBucket.setPosition(posBucket);\r\n sleep(2500);\r\n\r\n returnBucket();\r\n }", "public void mecanumDrive(double forward, double turn, double strafe, double multiplier) {\n double vd = Math.hypot(forward, strafe);\n double theta = Math.atan2(forward, strafe) - (Math.PI / 4);\n turnPower = turn;\n\n// if(forward == 0 && strafe == 0 && turn == 0) {\n// Time.reset();\n// }\n//\n// double accLim = (Time.time()/1.07)*((0.62*Math.pow(Time.time(), 2))+0.45);\n//\n// if(forward < 0 || turn < 0 || strafe < 0) {\n//\n// }\n//\n// if(turn == 0) {\n// targetAngle = getImuAngle();\n// turnPower = pid.run(0.001, 0, 0, 10, targetAngle);\n// } else {\n// targetAngle = getImuAngle();\n// }\n\n double[] v = {\n vd * Math.sin(theta) - turnPower,\n vd * Math.cos(theta) + turnPower,\n vd * Math.cos(theta) - turnPower,\n vd * Math.sin(theta) + turnPower\n };\n\n double[] motorOut = {\n multiplier * (v[0] / 1.07) * ((0.62 * Math.pow(v[0], 2)) + 0.45),\n multiplier * (v[1] / 1.07) * ((0.62 * Math.pow(v[1], 2)) + 0.45),\n multiplier * (v[2] / 1.07) * ((0.62 * Math.pow(v[2], 2)) + 0.45),\n multiplier * (v[3] / 1.07) * ((0.62 * Math.pow(v[3], 2)) + 0.45)\n };\n\n fr.setPower(motorOut[0]);\n fl.setPower(motorOut[1]);\n br.setPower(motorOut[2]);\n bl.setPower(motorOut[3]);\n }", "public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}", "void MoveTimed( double power, double theta_degrees, double t_secs, boolean set_gTheta){\n if( set_gTheta ) gTheta = getAngle();\n \n double t_start = getRuntime();\n while ( opModeIsActive() ) {\n \n GoDir( power, theta_degrees );\n \n Position pos = imu.getPosition();\n \n double t_elapsed = getRuntime()-t_start;\n telemetry.addData(\"T remaining\", t_secs-t_elapsed);\n telemetry.addData(\"delta Theta\", getAngle() - gTheta);\n telemetry.addData(\"encoder\", leftDrive.getCurrentPosition());\n telemetry.update();\n if ( t_elapsed >= t_secs ) break;\n }\n\n topDrive.setPower( 0 );\n leftDrive.setPower( 0 );\n rightDrive.setPower( 0 );\n }", "public void activateUncontrolledMoves() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n actualPoint = new Point();\n actualPoint.x = 0;\n actualPoint.y = 0;\n final int maxX = wheel.getBounds().width(); //This represent the max X possible coord on the wheel\n final int maxY = wheel.getBounds().height();\n int timeBtwnMvmnts = 5000; //Time between each new movement\n while (true) {\n\n try {\n Thread.sleep(timeBtwnMvmnts);//Waiting for the next movement\n } catch (InterruptedException e) {\n\n }\n if (isUncontrolledActivated) { //If is activated continue\n double userCurrentSnap = USER_CURRENT_BREATH_RATE; //Snapshot to the current BR\n\n //Getting the percent of excess according to the max ideal breathing rate and the max posible rate (20)\n //Consider 6-8, MAX_IDEAL_BREATH_RATE (8) will be the max\n double referenceDistance = MAX_BREATH_RATE - MAX_IDEAL_BREATH_RATE;\n double myRateExcess = userCurrentSnap - MAX_IDEAL_BREATH_RATE;\n double relationPreferedActual = myRateExcess / referenceDistance;\n double percentOfExcess = relationPreferedActual * 100;\n\n Random r = new Random();\n\n //Probability of appearance of each special move\n if (percentOfExcess <= 40 && percentOfExcess > 10) { //A little error margin to make it easier. Nets to be 10% excess\n //Boost, stop, roll , inverted. probabilities (70,16,10,4)\n int diceRolled = r.nextInt(100); //This works as the \"probability\"\n if (diceRolled < 4) {// 4% inverted\n /*Enable inverted controlling. Determine how much time is this going to last.\n Not more than the time between each movement.*/\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 4 && diceRolled < 14) { // 10% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 14 && diceRolled < 30) { // 16% stop\n uncStop();\n } else if (diceRolled >= 30 && diceRolled < 100) { // 70% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 8000;\n } else if (percentOfExcess <= 60 && percentOfExcess > 10) {\n //Boost, stop, roll , inverted. probabilities (45,30,15,10)\n int diceRolled = r.nextInt(100);\n if (diceRolled < 10) {// 10% inverted\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 10 && diceRolled < 25) { // 15% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 25 && diceRolled < 55) { // 30% stop\n uncStop();\n } else if (diceRolled >= 55 && diceRolled < 100) { // 45% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 6700;\n } else if (percentOfExcess > 10) {//Percent > 60\n //Boost, stop, roll , inverted. probabilities (5,10,25,60)\n int diceRolled = r.nextInt(100);\n if (diceRolled < 60) {// 60% inverted\n final int duration = new Random().nextInt(timeBtwnMvmnts - 1000) + 1000;\n invertControls(duration);\n } else if (diceRolled >= 60 && diceRolled < 85) { // 25% roll\n uncRoll(maxX, maxY);\n } else if (diceRolled >= 85 && diceRolled < 95) { // 10% stop\n uncStop();\n } else if (diceRolled >= 95 && diceRolled < 100) { // 5% boost\n int whichBoost = new Random().nextInt(1);\n if (whichBoost == 0)\n uncBackwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n else\n uncForwardBoost(actualPoint.x, actualPoint.y, maxX, maxY);\n }\n timeBtwnMvmnts = 5000;\n }\n\n } else {\n break;\n }\n }\n }\n }).start();\n }", "public void timePassed() {\n this.moveOneStep();\n }", "public void liftArm(){armLifty.set(-drivePad.getThrottle());}", "@Override\n\tpublic void step() {\n\t\tthis.y-= speed;\t\n\t}", "public void move()\n {\n move(WALKING_SPEED);\n }", "public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}", "public abstract void setMovementPerTick(float step);", "private void driveForwardTimer()\r\n\t{\r\n\t\tif(timer.get() < Config.Auto.timeDriveForward){\r\n\t\t\tdrive.setSpeed(0, 0, Config.Auto.driveForwardSpeed, Config.Auto.driveForwardSpeed);\r\n\t\t\tSystem.out.println(timer.get());}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tdrive.setSpeed(0, 0, 0, 0);\r\n\t\t\tautoStep++;\r\n\t\t}\r\n\t}", "@Override\n public void loop() {\n\n if (gamepad1.a && pow >= .01){\n pow -= .01;\n }\n\n if (gamepad1.b && pow <= .99){\n pow += .01;\n }\n robot.shooter.setPower(pow);\n\n telemetry.addData(\"Current Shooter Speed: \", pow);\n telemetry.update();\n\n //The following code should be for a normal drivetrain.\n\n robot.drive360(gamepad1.left_stick_x, -gamepad1.left_stick_y, gamepad1.right_stick_x);\n\n if (gamepad1.dpad_down && pow2 >= .01){\n pow2 -= .01;\n }\n\n if (gamepad1.dpad_up && pow2 <= .99){\n pow2 += .01;\n }\n\n //End normal drivetrain, the rest of this code is for varying the intake speed.\n\n if (gamepad1.right_bumper){\n robot.intake.setPower(pow2);\n }\n else if (gamepad1.left_bumper) {\n robot.intake.setPower(pow2 * -1);\n }\n else {\n robot.intake.setPower(0);\n }\n\n telemetry.addData(\"Current Intake Speed: \", pow2);\n telemetry.update();\n\n }", "public void setWalkSpeed(int n)\n{\n walkSpeed = n;\n}", "void advance(int tickCount, boolean left) {\n if (left) {\n // use the mirror image of the cowboy graphic when\n // the cowboy is going towards the left.\n setTransform(TRANS_MIRROR);\n move(-1, 0);\n } else {\n // use the (normal, untransformed) image of the cowboy\n // graphic when the cowboy is going towards the right.\n setTransform(TRANS_NONE);\n move(1, 0);\n }\n // this section advances the animation:\n // every third time through the loop, the cowboy\n // image is changed to the next image in the walking\n // animation sequence:\n if (tickCount % 3 == 0) { // slow the animation down a little\n if (myIsJumping == myNoJumpInt) {\n // if he's not jumping, set the image to the next\n // frame in the walking animation:\n nextFrame();\n } else {\n // if he's jumping, advance the jump:\n // the jump continues for several passes through\n // the main game loop, and myIsJumping keeps track\n // of where we are in the jump:\n myIsJumping++;\n if (myIsJumping < 0) {\n // myIsJumping starts negative, and while it's\n // still negative, the cowboy is going up.\n // here we use a shift to make the cowboy go up a\n // lot in the beginning of the jump, and ascend\n // more and more slowly as he reaches his highest\n // position:\n setRefPixelPosition(getRefPixelX(), getRefPixelY()\n - (2 << (-myIsJumping)));\n } else {\n // once myIsJumping is negative, the cowboy starts\n // going back down until he reaches the end of the\n // jump sequence:\n if (myIsJumping != -myNoJumpInt - 1) {\n setRefPixelPosition(getRefPixelX(), getRefPixelY()\n + (2 << myIsJumping));\n } else {\n // once the jump is done, we reset the cowboy to\n // his non-jumping position:\n myIsJumping = myNoJumpInt;\n setRefPixelPosition(getRefPixelX(), myInitialY);\n // we set the image back to being the walking\n // animation sequence rather than the jumping image:\n setFrameSequence(FRAME_SEQUENCE);\n // myScoreThisJump keeps track of how many points\n // were scored during the current jump (to keep\n // track of the bonus points earned for jumping\n // multiple tumbleweeds). Once the current jump is done,\n // we set it back to zero.\n myScoreThisJump = 0;\n }\n }\n }\n }\n }", "private void pointWalkBehavior() {\n\t\tif (moving) {\n\t\t\tif (remainingSteps > 0) {\n\t\t\t\tupdatePixels(action);\n\t\t\t\tremainingSteps -= speed;\n\t\t\t} else {\n\t\t\t\tupdateCoordinate(action, false);\n\t\t\t\tif (coordX != endPoint.x || coordY != endPoint.y) {\n\t\t\t\t\tif (validMoveEh(action)) {\n\t\t\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\t\tpointWalking = false;\n\t\t\t\t\tmoving = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (validMoveEh(action)) {\n\t\t\t\tmoving = true;\n\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t}\n\t\t}\n\t}", "public void jump() {\n\n if (this.getPlanet() == null) {\n return;\n }\n\n float rot = this.getAngleBetween(this.getPlanet());\n\n this.jumpingTime = 0.5f;\n\n rot -= Math.PI / 2.0;\n\n Vector2 direction = new Vector2((float) Math.cos(rot), (float) Math.sin(rot)).nor();\n\n this.applyForceToCenter(direction.rotate(180).scl((float) (Math.pow(this.calculatePullForce(this.getPlanet()).len(), 4))), true);\n\n this.limitVelocity();\n\n this.removeFromPlanet();\n\n float time = this.state.getTime();\n\n this.setState(new FloatState(time + jumpBonusTime));\n\n }", "public void strafe(double inches, float heading, double speedLimit) throws InterruptedException {\n\n double error; //The number of degrees between the true heading and desired heading\n double correction; //Modifies power to account for error\n double frontPower; //Power being fed to front side of bot\n double backPower; //Power being fed to back side of bot\n double max; //To be used to keep powers from exceeding 1\n double P_COEFF = 0.0012; //0.002\n double I_COEFF = 0.00192; //0.0035\n double D_COEFF = 0.0003; //0.00042\n if(inches<24){\n P_COEFF = 0.0015;\n I_COEFF = 0.00192;\n D_COEFF = 0.0003;\n }\n double power;\n double deltaT;\n double derivative = 0;\n double integral = 0;\n int deltaD;\n int lastEncoder;\n int distance;\n long loops = 0;\n heading = (int) normalize360(heading);\n\n setEncoderBase();\n lastEncoder = 0;\n\n int target = (int) (inches * ticksPerInchTetrix);\n\n speedLimit = Range.clip(speedLimit, 0.0, 1.0);\n\n if (speedLimit==0){\n return;\n }\n\n double lastTime = callingOpMode.getRuntime();\n\n while ((((Math.abs(target)-50) > Math.abs(getEncoderWheelXPosition()) || ((Math.abs(target)+50) < Math.abs(getEncoderWheelXPosition())))\n || (loops==0 || Math.abs(derivative)<1)) && ((LinearOpMode) callingOpMode).opModeIsActive()) {\n\n error = heading - zRotation;\n\n distance = Math.abs(target) - Math.abs(getEncoderWheelXPosition());\n\n while (error > 180) error = (error - 360);\n while (error <= -180) error = (error + 360);\n\n correction = Range.clip(error * P_DRIVE_COEFF, -1, 1);\n\n deltaT = callingOpMode.getRuntime()-lastTime;\n lastTime = callingOpMode.getRuntime();\n deltaD = getEncoderWheelXPosition()-lastEncoder;\n lastEncoder = getEncoderWheelXPosition();\n\n derivative = ((double) deltaD)/deltaT;\n\n if(Math.abs(distance*P_COEFF)<1){\n integral += distance*deltaT;\n } else {\n integral = 0;\n }\n\n power = (distance*P_COEFF) + (integral*I_COEFF) - (derivative*D_COEFF);\n\n if (Math.abs(power) > Math.abs(speedLimit)) {\n power /= Math.abs(power);\n power *= Math.abs(speedLimit);\n }\n\n frontPower = power + correction;\n backPower = power - correction;\n\n max = Math.max(Math.abs(frontPower), Math.abs(backPower));\n if (max > 1.0) {\n backPower /= max;\n frontPower /= max;\n }\n\n updateDriveMotors(-frontPower, frontPower, backPower, -backPower);\n\n if (((loops+10) % 10) == 0) {\n callingOpMode.telemetry.addData(\"gyro\" , zRotation);\n callingOpMode.telemetry.addData(\"encoder\" , getEncoderWheelXPosition());\n callingOpMode.telemetry.addData(\"loops\", loops);\n callingOpMode.telemetry.addData(\"deltaD\", deltaD);\n callingOpMode.telemetry.addData(\"deltaT\", deltaT);\n callingOpMode.telemetry.addData(\"distance\", distance);\n callingOpMode.telemetry.addData(\"derivative\", derivative);\n callingOpMode.telemetry.update();\n }\n\n loops++;\n\n updateGlobalPosition();\n\n ((LinearOpMode) callingOpMode).sleep(10);\n }\n }", "void move(int direction)\n {\n int step = 1;\n int covered = 0;\n if ((direction==1 && tankY==0) || (direction==2 && tankY >= 512) || (direction==3 && tankX == 0) || (direction==1 && tankX >=512)){\n System.out.println(\"Illegal move \"+ direction);\n return;\n }\n turn(direction);\n\n while (covered < 64){\n if (direction ==1 ){\n tankY -= step;\n }\n if (direction ==2 ){\n tankY += step;\n }\n if (direction ==4){\n tankX += step;\n }\n if (direction ==3 ){\n tankX -= step;\n }\n covered +=step;\n }\n repaint();\n sleep(speed);\n\n }", "@Override\n public void loop() {\n rightArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\n leftArm.setTargetPosition((int)(.125* TICKS_PER_WHEEL_ROTATION*8));\nrightArm.setPower(.6);\nleftArm.setPower(.6);\nif(runtime.seconds()>4&& stage==-1){\n stage++;\n}\n// telemetry.addData(\"IsAligned\" , detector.getAligned()); // Is the bot aligned with the gold mineral?\n// telemetry.addData(\"X Pos\" , detector.getXPosition()); // Gold X position.\n\n //Point screenpos = detector.getScreenPosition();\n if(stage==0) {\n Rect bestRect = detector.getFoundRect();\n\n double xPos = bestRect.x + (bestRect.width / 2);\n\n if (xPos < alignXMax && xPos > alignXMin) {\n aligned = true;\n } else {\n aligned = false;\n }\n telemetry.addData(\"aligned \", aligned);\n\n telemetry.addData(\"xpos \", xPos);\n telemetry.addData(\"amax \", alignXMax);\n telemetry.addData(\"amin \", alignXMin);\n if(!(xPos>0)){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"not detected\");\n }\n else if (xPos > alignXMax) {\n double power = ((xPos - alignXMax) / scale) * .3 + .4;\n rightWheel.setPower(power);\n leftWheel.setPower(-power);\n telemetry.addData(\"powL: \", power);\n telemetry.addLine(\"turning left\");\n runtime.reset();\n } else if (xPos < alignXMin) {\n double power = ((alignXMin - xPos) / scale) * .3 + .4;\n rightWheel.setPower(-power);\n leftWheel.setPower(power);\n telemetry.addData(\"powR: \", power);\n telemetry.addLine(\"turning right\");\n runtime.reset();\n } else {\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n telemetry.addLine(\"found\");\n telemetry.addData(\"secks: \", runtime.seconds());\n if(runtime.seconds()>.1){\n runtime.reset();\n stage++;\n resetDriveEncoders();\n }\n }\n\n\n }\n else if (stage==1){\n rightWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setTargetPosition(-3*TICKS_PER_WHEEL_ROTATION);\n leftWheel.setPower(.5);\n rightWheel.setPower(.5);\n if(runtime.seconds()>5){\n rightWheel.setPower(0);\n leftWheel.setPower(0);\n }\n\n }\n\n\n telemetry.addData(\"stage: \", stage);\n telemetry.update();\n }", "public double accelerate(int mphIncrease){\r\n speed = speed + mphIncrease;\r\n return speed;\r\n }", "public void movePower(String movement, double power, double duration)\n {\n double startTime = getRuntime();\n switch(movement)\n {\n case \"forward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"backward\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"right\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n\n case \"left\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"leftTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power);\n robot.FR_drive.setPower(power);\n robot.BL_drive.setPower(power);\n robot.BR_drive.setPower(power);\n }\n break;\n\n case \"rightTurn\":\n runtime.reset();\n while (runtime.seconds() < duration)\n {\n robot.FL_drive.setPower(power * -1);\n robot.FR_drive.setPower(power * -1);\n robot.BL_drive.setPower(power * -1);\n robot.BR_drive.setPower(power * -1);\n }\n break;\n }\n stop();\n }", "@Override\n public void step(double deltaTime) {\n // wheel radius, in meters\n double wheelCircumference = 2 * simulatorConfig.driveBase.wheelRadius * Math.PI;\n\n double leftRadians = 0;\n double rightRadians = 0;\n for (SimMotor simMotor : motorStore.getSimMotorsSorted()) {\n if (simMotor.isLeftDriveMotor()) {\n leftRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n } else if (simMotor.isRightDriveMotor()) {\n rightRadians = simMotor.position / simulatorConfig.driveBase.gearRatio;\n }\n }\n\n // invert the left side because forward motor movements mean backwards wheel movements\n rightRadians = -rightRadians;\n\n double currentLinearRadians = (leftRadians + rightRadians) / 2;\n\n double deltaRadians = currentLinearRadians - lastLinearRadians;\n double metersPerRadian = wheelCircumference / (Math.PI * 2);\n double deltaLinearPosition = deltaRadians * metersPerRadian;\n double newHeading = ((leftRadians - rightRadians) * metersPerRadian / simulatorConfig.driveBase.radius);\n\n // for next loop\n lastLinearRadians = currentLinearRadians;\n\n robotPosition.heading = newHeading + startHeading;\n\n robotPosition.velocity = deltaLinearPosition / deltaTime;\n robotPosition.x += deltaLinearPosition * Math.sin(robotPosition.heading);\n robotPosition.y += deltaLinearPosition * Math.cos(robotPosition.heading);\n\n SimNavX simNavX = SimSPI.getNavX(SPI.Port.kMXP.value);\n if (simNavX != null) {\n float degrees = (float)((robotPosition.heading - simulatorConfig.startPosition.heading) * 360 / (Math.PI * 2));\n\n // degrees are between 0 and 360\n if (degrees < 0) {\n degrees = 360 - (Math.abs(degrees) % 360);\n } else {\n degrees = degrees % 360;\n }\n simNavX.heading = degrees;\n }\n\n }", "private void encoderDrive(double speed,\n double leftInches, double rightInches,\n double timeoutS) {\n int newLeftFrontTarget;\n int newLeftBackTarget;\n int newRightFrontTarget;\n int newRightBackTarget;\n\n // Ensure that the opmode is still active\n if (opModeIsActive()) {\n\n robot.resetWheelEncoders();\n\n // Determine new target position, and pass to motor controller\n newLeftFrontTarget = robot.leftFront.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newLeftBackTarget = robot.leftBack.getCurrentPosition() + (int) (leftInches * TICKS_PER_INCH);\n newRightFrontTarget = robot.rightFront.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n newRightBackTarget = robot.rightBack.getCurrentPosition() + (int) (rightInches * TICKS_PER_INCH);\n robot.leftFront.setTargetPosition(newLeftFrontTarget);\n robot.leftBack.setTargetPosition(newLeftBackTarget);\n robot.rightFront.setTargetPosition(newRightFrontTarget);\n robot.rightBack.setTargetPosition(newRightBackTarget);\n\n // Turn On RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n\n // reset the timeout time and start motion.\n encoderTime.reset();\n robot.driveForward(Math.abs(speed));\n\n // wait for motors to not be busy\n while (opModeIsActive() &&\n (encoderTime.seconds() < timeoutS) &&\n (robot.leftFront.isBusy() && robot.leftBack.isBusy() && robot.rightFront.isBusy() && robot.rightBack.isBusy())) {\n\n // Display it for the driver.\n telemetry.addData(\"Goal Position\", \"%7d :%7d :%7d :%7d\", newLeftFrontTarget, newLeftBackTarget, newRightFrontTarget, newRightBackTarget);\n telemetry.addData(\"Current Position\", \"%7d :%7d :%7d :%7d\",\n robot.leftFront.getCurrentPosition(),\n robot.leftBack.getCurrentPosition(),\n robot.rightFront.getCurrentPosition(),\n robot.rightBack.getCurrentPosition());\n telemetry.update();\n }\n\n // Stop all motion;\n robot.stopDriving();\n\n // Turn off RUN_TO_POSITION\n robot.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n sleep(100); // optional pause after each move\n }\n }", "public void turn()\n {\n turn(90);\n }", "void drive(double power, double leftInches, double rightInches, double seconds) {\n\n //Make new integer to set left and right motor targets\n int leftTarget;\n int rightTarget;\n\n if (opModeIsActive()) {\n\n //Determine left and right target to move to\n leftTarget = robot.leftMotor.getCurrentPosition() + (int) (leftInches * COUNTS_PER_INCH);\n rightTarget = robot.rightMotor.getCurrentPosition() + (int) (rightInches * COUNTS_PER_INCH);\n\n //Set target and move to position\n robot.leftMotor.setTargetPosition(leftTarget);\n robot.rightMotor.setTargetPosition(rightTarget);\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //Reset runtime and start motion\n robot.leftMotor.setPower(Math.abs(power));\n robot.rightMotor.setPower(Math.abs(power));\n\n //Test if motors are busy, runtime is less than timeout and motors are busy and then run code\n while (opModeIsActive() && (runtime.seconds() < seconds) && (robot.leftMotor.isBusy() && robot.rightMotor.isBusy())) {\n\n //Tell path to driver\n telemetry.addData(\"Path1\", \"Running to: \", leftTarget, rightTarget);\n telemetry.addData(\"Path2\", \"Running at: \", robot.leftMotor.getCurrentPosition(), robot.rightMotor.getCurrentPosition());\n telemetry.update();\n }\n\n //Stop motors after moved to position\n robot.leftMotor.setPower(0);\n robot.rightMotor.setPower(0);\n\n //Set motors back to using run using encoder\n robot.leftMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.rightMotor.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }\n }", "@Override\n\tpublic void move() {\n\t\ttry {\n\t\t\tTimeUnit.SECONDS.sleep(new Random().nextInt(5));\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\tSystem.out.println(\"Tank moving...\");\n\t}", "public void onLivingUpdate()\n {\n super.onLivingUpdate();\n double moveSpeed = this.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue();\n if (timetopee-- < 0 && !bumgave)\n {\n isJumping = false;\n\n if (bumrotation == 999F)\n {\n bumrotation = rotationYaw;\n }\n\n rotationYaw = bumrotation;\n moveSpeed = 0.0F;\n\n if (!onGround)\n {\n motionY -= 0.5D;\n }\n \n /* TODO\n if(worldObj.isRemote)\n {\n \tMCW.proxy.pee(worldObj, posX, posY, posZ, rotationYaw, modelsize);\n } */\n\n if (timetopee < -200)\n {\n timetopee = rand.nextInt(600) + 600;\n bumrotation = 999F;\n int j = MathHelper.floor_double(posX);\n int k = MathHelper.floor_double(posY);\n int l = MathHelper.floor_double(posZ);\n\n for (int i1 = -1; i1 < 2; i1++)\n {\n for (int j1 = -1; j1 < 2; j1++)\n {\n if (rand.nextInt(3) != 0)\n {\n continue;\n }\n\n Block k1 = worldObj.getBlockState(new BlockPos(j + j1, k - 1, l - i1)).getBlock();\n Block l1 = worldObj.getBlockState(new BlockPos(j + j1, k, l - i1)).getBlock();\n\n if (rand.nextInt(2) == 0)\n {\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n worldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.YELLOW_FLOWER.getDefaultState());\n }\n\n continue;\n }\n\n if ((k1 == Blocks.GRASS || k1 == Blocks.DIRT) && l1 == Blocks.AIR)\n {\n \tworldObj.setBlockState(new BlockPos(j + j1, k, l - i1), Blocks.RED_FLOWER.getDefaultState());\n }\n }\n }\n }\n }\n }", "public void doTimeStep() {\r\n\t\twalk(getRandomInt(8));\r\n\t\tif (getEnergy() < 6 * Params.min_reproduce_energy && getEnergy() > Params.min_reproduce_energy) {\r\n\t\t\tCritter1 child = new Critter1();\r\n\t\t\treproduce(child, getRandomInt(8));\r\n\t\t\tnumberSpawned += 1;\r\n\t\t}else if(getEnergy() < Params.min_reproduce_energy) {\r\n\t\t\treturn;\r\n\t\t}else {\r\n\t\t\tCritter1 child1 = new Critter1();\r\n\t\t\treproduce(child1, getRandomInt(8));\r\n\t\t\tCritter1 child2 = new Critter1();\r\n\t\t\treproduce(child2, getRandomInt(8));\r\n\t\t\tnumberSpawned += 2;\r\n\t\t}\t\r\n\t}", "public void move ()\n\t{\n\t\t//Let's try this...\n\t\tchangeFallSpeed (turnInt);\n\t\t\n\t\t\n\t\tsetX_Pos (getX_Pos () + getHSpeed ());\t//hSpeed is added onto x_pos\n\t\t//The xDimensions are updated by having hSpeed added onto them.\n\t\txDimension1 += getHSpeed ();\n\t\txDimension2 += getHSpeed ();\n\t\txDimension3 += getHSpeed ();\n\t\t\n\t\t//The if statement below ensures that the PaperAirplane does not move\n\t\t//after reaching the 300 y point. The walls around the PaperAirplane,\n\t\t//however, start to move up, creating the illusion that the\n\t\t//PaperAirplane is still falling.\n\t\tif (getY_Pos () < 300)\n\t\t{\n\t\t\tsetY_Pos (getY_Pos () + getVSpeed ());//vSpeed is added onto y_pos\n\t\t\t//The yDimensions are updated by having vSpeed added onto them.\n\t\t\tyDimension1 += getVSpeed ();\n\t\t\tyDimension2 += getVSpeed ();\n\t\t\tyDimension3 += getVSpeed ();\n\t\t}\n\t}", "public void advanceTimeStep(double timestep) {\n\t\t\n\t\tif (getDeathTime() > 0) return;\n\t\t\n\t\tList<List<List<Object>>> collisions = getCollisions();\n\t\tif ((noObjectMovementBlocking(collisions.get(0).get(0)) && !(collisions.get(0).get(1).contains(Feature.ground)) && (getVx() < 0))\n\t\t\t|| ((noObjectMovementBlocking(collisions.get(2).get(0)) && !(collisions.get(2).get(1).contains(Feature.ground)) && (getVx() > 0)))) \n\t\t\t\tadvanceX(timestep);\n\t\t\n\t\tsetVx(advanceVx(timestep));\n\t\t\n\t\tcollisions = getCollisions();\n\t\tif (noObjectMovementBlocking(collisions.get(3).get(0)) && !(collisions.get(3).get(1).contains(Feature.ground)) && (getVy() < 0))\n\t\t\tadvanceY(timestep);\n\t\telse if (getVy() > 0) {\n\t\t\tboolean should_advance = true;\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tif (!noObjectMovementBlocking(collisions.get(i).get(0)) || collisions.get(i).get(1).contains(Feature.ground))\n\t\t\t\t\tshould_advance = false;\n\t\t\t}\n\t\t\tif (should_advance) advanceY(timestep);\n\t\t}\n\n\t\tadvanceVy(timestep);\n\t\tsetAy(advanceAy());\n\n\t\tcollisions = getCollisions();\n\t\tif ((this instanceof Mazub) && !(getJustJumped()) &&\n\t\t\t\t((collisions.get(3).get(0).size() != 0) || (collisions.get(3).get(1).contains(Feature.ground)))) {\n\t\t\t((Mazub) this).setJumping(false);\n\t\t}\n\t\t\n\t\tsetTimeInvincible(advanceTimeInvincible(timestep));\n\t}", "public abstract void tilt(long ms);", "public void step() {\r\n for(int i = 0;i<numberOfCars;i++) {\r\n xtemp[i] = x[i];\r\n }\r\n for(int i = 0;i<numberOfCars;i++) {\r\n if(v[i]<maximumVelocity) {\r\n v[i]++; // acceleration\r\n }\r\n int d = xtemp[(i+1)%numberOfCars]-xtemp[i]; // distance between cars\r\n if(d<=0) { // periodic boundary conditions, d = 0 correctly treats one car on road\r\n d += roadLength;\r\n }\r\n if(v[i]>=d) {\r\n v[i] = d-1; // slow down due to cars in front\r\n }\r\n if((v[i]>0)&&(Math.random()<p)) {\r\n v[i]--; // randomization\r\n }\r\n x[i] = (xtemp[i]+v[i])%roadLength;\r\n flow += v[i];\r\n }\r\n steps++;\r\n computeSpaceTimeDiagram();\r\n }", "public void advanceFloor(){\n //TODO: write method to move onto next floor\n }", "@Override\n \tpublic int step( ArrayList<Boid> school ) {\n \t//public void update( PVector accel ) {\n \t\t\n \t\tPVector accel = calculateAccel( school );\n \t\taccel = avoidEgdes(accel);\n \t\t\n \t\t\n \t\t// If accel == null, skip down to end\n \t\tif( accel != null ) {\n \t\t\t\n \t\t\tPVector accelLocal = matrixMult( Fish.inverse(basis), accel );\n \t\t\t\t// accelLocal is now a cordinate vector in the fish's local coordinate system,\n \t\t\t\t// defined by the fish's basis\t\t\t\n \t\t\t\n \t\t\t/*\n \t\t\t * To limit it's max steering angle to a defined degree, we make sure the acceleration perpendicular \n \t\t\t * to its velocity is <= the parallel acceleration.\n \t\t\t */\n \t\t\t\n \t\t\t// TODO should we be doing this w/ speed, not accel?\n \t\t\t// If turning angle is greater than the maximum allowed ...\n \t\t\tif( Math.abs( accelLocal.y)/Math.abs(accelLocal.x) > MAX_TURN_RATIO ) {\n \n \t\t\t\t\n \t\t\t\t// Sets y's magnitude to x's magnitude, keeping y's sign\n \t\t\t\taccelLocal.y = ((accelLocal.y < 0) ? -1 : 1) * Math.abs(accelLocal.x);\n \t\t\t\t\n \t\t\t\t// TODO put in settings for min coasting speed\n \t\t\t\t// If we are turning extremely slowly (and we're here because we want to turn hard),\n \t\t\t\t// speed up so we can turn\n \t\t\t\tif( accelLocal.mag() < Set.FISH_MaxAccel/3 ) {\n \t\t\t\t\taccelLocal.normalize();\n \t\t\t\t\taccelLocal.mult( Set.FISH_MaxAccel/3 );\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// If the desired acceleration is > max, set it to max\n \t\t\tif( accel.mag() > Set.FISH_MaxAccel ) {\n \t\t\t\taccel.normalize();\n \t\t\t\taccel.mult(Set.FISH_MaxAccel);\n \t\t\t}\n \t\t\t\n \t\t\t// not sure TODO\n \t\t\tif( speed.mag() + accelLocal.x < Set.FISH_MinSpeed) {\n \t\t\t\taccelLocal.x = -accelLocal.x;\n \t\t\t}\n \t\t\t\n \t\t\t// Update recentAccel. basis * accelLocal -> accel in global\n \t\t\trecentAccel = matrixMult(basis, accelLocal); \t\n \t\t\t\n \t\t\t// update speed. \n \t\t\tspeed.add( recentAccel );\n \t\t\t\n \t\t\t// If the new speed is > max, set it to max\n \t\t\tif( speed.mag() > Set.FISH_MaxSpeed ) {\n \t\t\t\tspeed.normalize();\n \t\t\t\tspeed.mult(Set.FISH_MaxSpeed);\n \t\t\t}\t\n \t\t\t\n \t\t} else { // Jumps to here if accel == null\n \t\t\trecentAccel = null;\n \t\t}\n \t\t\n \t\t\n \t\t// Update position\n \t\tposition.add(speed);\n \t\t\n \t\t// Make sure the new position is onscreen; if not, wrap it\n \t\tif( position.x < 0 ) position.x += Set.SCREEN_Width;\n \t\tif( position.y < 0 ) position.y += Set.SCREEN_Height;\n \t\tposition.x %= Set.SCREEN_Width;\n \t\tposition.y %= Set.SCREEN_Height;\n \t\t\n \t\t// Update basis\n \t\tbasis[0].set(speed);\n \t\tPVector.cross( basis[0], Z_VECTOR, basis[1]);\n \t\tbasis[0].normalize();\n \t\tbasis[1].normalize();\n \t\t\n \t\t// Update opacity\n \t\tcolor = Sim.colors.get( COLOR_OFFSETS[style]+(Sim.frameCounter+FRAME_OFFSET)%Set.FISH_ShimmerCycle );\n \t\thead_color = Sim.colors.get( Set.FISH_ShimmerCycle+COLOR_OFFSETS[style]+(Sim.frameCounter+FRAME_OFFSET)%Set.FISH_ShimmerCycle );\n \t\t\n \t\t// no change in school\n \t\treturn 0;\n \t}", "public void move()\n {\n if (!alive) {\n return;\n }\n\n if (speedTimer > 0) {\n speedTimer --;\n } else if (speedTimer == 0 && speed != DEFAULT_SPEED) {\n speed = DEFAULT_SPEED;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n Location next = null;\n\n // For the speed, iterate x blocks between last and next\n\n if (direction == UPKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() - speed * getPixelSize()));\n } else if (direction == DOWNKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() + speed * getPixelSize()));\n } else if (direction == LEFTKEY)\n {\n next = getLocation((int)(last.getX() - speed * getPixelSize()), last.getY());\n } else if (direction == RIGHTKEY)\n {\n next = getLocation((int)(last.getX() + speed * getPixelSize()), last.getY());\n }\n\n ArrayList<Location> line = getLine(last, next);\n\n if (line.size() == 0) {\n gameOver();\n return;\n }\n\n for (Location loc : line) {\n if (checkCrash (loc)) {\n gameOver();\n return;\n } else {\n // Former bug: For some reason when a player eats a powerup a hole appears in the line where the powerup was.\n Location l2 = getLocation(loc.getX(), loc.getY());\n l2.setType(LocationType.PLAYER);\n l2.setColor(this.col);\n\n playerLocations.add(l2);\n getGridCache().add(l2);\n }\n }\n }", "protected final void walk(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += x_directions[direction];\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += y_directions[direction];\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\t\n\t//Specific to walking during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.walk_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}", "public void walking(final Player p){\n timerListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n //test to see if the player is currently jumping\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }\n };\n //creates the timer for continous animation of walkListener\n walker = new Timer(getWalkSpeed(), timerListener);\n //starts timer for walk animation\n walker.start();\n ActionListener walkIncListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if (getWalkSpeed() > WALK_SPEED_MIN)\n {\n System.out.println(\"1\");\n walker.stop();\n incWalkSpeed(getWalkSpeedInc());\n walker = new Timer(getWalkSpeed(), timerListener);\n walker.start();\n }\n else\n {\n walkInc.stop();\n System.out.println(\"2\");\n }\n\n }\n };\n walkInc = new Timer(WALK_SPEED, walkIncListener);\n //starts timer for walk animation\n walker.start();\n ActionListener dead = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if(p.isAlive() == false){\n walker.stop();\n }\n }\n };\n Timer kill = new Timer(100, dead);\n kill.start();\n\n }", "public void speedUp(){\r\n\t\tmoveSpeed+=1;\r\n\t\tmoveTimer.setDelay(1000/moveSpeed);\r\n\t}", "public void startTurning(double speed) {\n wheelTurner.set(speed);\n }", "private void wanderingBehavior() {\n\t\tif (moving) {\n\t\t\tupdatePixels(action);\n\t\t\tremainingSteps -= speed;\n\t\t\tif (remainingSteps == 0) {\n\t\t\t\tmoving = false;\n\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\tupdateCoordinate(facing, false);\n\t\t\t}\n\t\t} else if (remainingSteps > 0) {\n\t\t\tremainingSteps -= speed;\n\t\t} else {\n\t\t\trandom = rand.nextInt(100);\n\t\t\tif (Math.abs(random) < 2) {\n\t\t\t\trandom = rand.nextInt(4);\n\t\t\t\t{\n\t\t\t\t\tswitch (random) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trandom = rand.nextInt(3);\n\t\t\t\t\tremainingSteps = STEP_SIZE * 2;\n\t\t\t\t\tif (random != 0 && validMoveEh(facing) && validWanderEh(facing)) {\n\t\t\t\t\t\tremainingSteps -= STEP_SIZE;\n\t\t\t\t\t\taction = facing;\n\t\t\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t\t\t\tmoving = true;\n\t\t\t\t\t\tupdateCoordinate(facing, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int drive(int speedL, int speedR, int distanceL, int distanceR);", "public void walk(int direction);", "public void tankDrive() {\n\t\tif (fastBool) {\n\t\t\tmotorRB.set(joystickRYAxis);\n\t\t\tmotorRF.set(joystickRYAxis);\n\t\t\tmotorLB.set(-joystickLYAxis);\n\t\t\tmotorLF.set(-joystickLYAxis);\n\n\t\t} else {\n\t\t\tmotorRB.set(joystickRYAxis/2);\n\t\t\tmotorRF.set(joystickRYAxis/2);\n\t\t\tmotorLB.set(-joystickLYAxis/2);\n\t\t\tmotorLF.set(-joystickLYAxis/2);\n\t\t\t//System.out.println(strongBad.motorMultiplier);\n\t\t\t//SmartDashboard.putNumber(\"MM2\", strongBad.motorMultiplier);\n\n\t\t}\n\t}", "public void lift(){\n\t\twhile(Math.abs(robot.lift1.getCurrentPosition()-robot.startingHeight)<3900&&opModeIsActive()){\n\t\t\trobot.lift1.setPower(1);\n\t\t\trobot.lift2.setPower(1);\n\t\t}\n\t\tlift(\"stop\");\n\t}", "public void raiseLift(double timeout) {\n {\n\n robot.liftleft.setTargetPosition(LIFT_TOP_POSITION);\n robot.liftright.setTargetPosition(-LIFT_TOP_POSITION);\n // Turn On RUN_TO_POSITION\n robot.liftleft.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftright.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n // reset the timeout time and start motion.\n runtime.reset();\n robot.liftleft.setPower(1);\n robot.liftright.setPower(1);\n\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (\n (runtime.seconds() < timeout) &&\n (robot.liftleft.isBusy()) && (robot.liftright.isBusy()) )\n // Display it for the driver.\n\n telemetry.addData(\"Path2\", \"lift left position: %7d lift right position: %7d target position: %7d\",\n robot.liftleft.getCurrentPosition(), robot.liftright.getCurrentPosition(),\n LIFT_TOP_POSITION);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.liftleft.setPower(0);\n robot.liftright.setPower(0);\n\n\n robot.liftleft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftright.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n\n // sleep(250); // optional pause after each move\n }", "private void walk() throws MyException{\n try{\n Thread.sleep((long)(1+300*Math.random()));\n }catch(InterruptedException e){\n throw new MyException(\"Error: Not walking.\");\n }\n }", "public void lowerLift(double timeout) {\n {\n\n robot.liftleft.setTargetPosition(0);\n robot.liftright.setTargetPosition(0);\n // Turn On RUN_TO_POSITION\n robot.liftleft.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.liftright.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n // reset the timeout time and start motion.\n runtime.reset();\n robot.liftleft.setPower(0.25);\n robot.liftright.setPower(0.25);\n // keep looping while we are still active, and there is time left, and both motors are running.\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\n // always end the motion as soon as possible.\n // However, if you require that BOTH motors have finished their moves before the robot continues\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\n while (\n (runtime.seconds() < timeout) &&\n (robot.liftleft.isBusy()) && robot.liftright.isBusy())\n // Display it for the driver.\n\n telemetry.addData(\"Path2\", \"lift left position: %7d lift left position: %7d target position: %7d\",\n robot.liftleft.getCurrentPosition(), robot.liftright.getCurrentPosition(),\n 0);\n telemetry.update();\n }\n\n // Stop all motion;\n robot.liftright.setPower(0);\n robot.liftleft.setPower(0);\n\n\n robot.liftleft.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n robot.liftright.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n }", "public void drive(double distance)\n {\n fuelInTank -= distance / fuelEfficiency; \n }", "public abstract void timeStep(char currCommand, World world);", "public void angleTurn(float angle, int timeout){\n\t\tcalculateAngles();\n\n\t\t// Get the current program time and starting encoder position before we start our drive loop\n\t\tfloat StartTime = data.time.currentTime();\n\t\tfloat StartPosition = data.drive.leftDrive.getCurrentPosition();\n\n\t\t// Reset our Integral and Derivative data.\n\t\tdata.PID.integralData.clear();\n\t\tdata.PID.derivativeData.clear();\n\n\n\t\t// Manually calculate our first target\n\t\tdata.PID.target = (calculateAngles() + (data.PID.IMURotations * 360)) + angle;\n\n\t\t// We need to keep track of how much time passes between a loop.\n\t\tfloat LoopTime = data.time.currentTime();\n\n\t\t// This is the main loop of our straight drive.\n\t\t// We use encoders to form a loop that corrects rotation until we reach our target.\n\t\twhile(StartTime + timeout > data.time.currentTime()){\n\n\t\t\t// Record the time since the previous loop.\n\t\t\tLoopTime = data.time.timeFrom(LoopTime);\n\t\t\t// Calculate our angles. This method may modify the input Rotations.\n\t\t\t//IMURotations =\n\t\t\tcalculateAngles();\n\t\t\t// Calculate our PID\n\t\t\tcalculatePID(LoopTime);\n\n\t\t\t// Calculate the Direction to travel to correct any rotational errors.\n\t\t\tfloat Direction = ((data.PID.I * data.PID.ITuning) / 2000) + ((data.PID.P * data.PID.PTuning) / 2000) + ((data.PID.D * data.PID.DTuning) / 2000);;\n\n\t\t\tif(Math.abs(Direction) <= 0.03f) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdata.drive.rightDrive.setPower(data.drive.POWER_CONSTANT - (Direction));\n\t\t\tdata.drive.leftDrive.setPower(data.drive.POWER_CONSTANT + (Direction));\n\t\t}\n\t\t// Our drive loop has completed! Stop the motors.\n\t\tdata.drive.rightDrive.setPower(0);\n\t\tdata.drive.leftDrive.setPower(0);\n\t}", "public void step() {\n \tinternaltime ++;\n \n }", "public abstract void advanceBoard(float deltaTime);", "public abstract void drive(double leftSpeed, double rightSpeed);", "public void traverseZipline(){\n this.driver.setForwardSpeed(150);\n this.driver.forward();\n \n // Note: rotations are negative because motor is built the wrong way\n // Rotate slowly for the first third of the rotations \n this.pulleyMotor.setSpeed(80);\n this.pulleyMotor.rotate(-2160);\n \n // Rotate quicker for the second third of the rotations\n this.pulleyMotor.setSpeed(120);\n this.pulleyMotor.rotate(-2160);\n \n // Rotate slowly for the last third of the rotations\n this.pulleyMotor.setSpeed(80);\n this.pulleyMotor.rotate(-2160);\n\n // Move a bit forward to move away from zipline\n this.driver.forward(2,false);\n this.driver.setForwardSpeed(120); \n }", "private void travelToAirport()\n {\n try\n { sleep ((long) (1 + 30000 * Math.random ()));\n }\n catch (InterruptedException e) {}\n }", "private void step ()\n {\n // a car arrives approximately every four minutes\n int chance = randGen.nextInt(CarWashApplication.CHANCE_INT);\n if (chance == 0)\n {\n waitingLine.enqueue(new Car(currentTime));\n numCars++;\n\n /** For printed output of each step */\n //System.out.println(currentTime);\n //waitingLine.toPrint();\n }\n\n // process the waiting cars\n if (bay.isEmpty() && !waitingLine.isEmpty())\n {\n bay.startWash();\n Car car = (Car) waitingLine.dequeue();\n waitTimeArray[arrayIndex] = currentTime - (car.arrivalTime());\n arrayIndex++;\n }\n\n if (!bay.isEmpty())\n bay.keepWashing();\n\n currentTime++;\n }", "@Override\n protected void defineSteps() {\n addStep(new StepStartDriveUsingMotionProfile(80, 0.0));\n addStep(new StepWaitForDriveMotionProfile());\n addStep(new StepStopDriveUsingMotionProfile());\n addStep(new AutoStepDelay(500));\n addStep(new StepSetIntakeState(true));\n addStep(new StepSetNoseState(true));\n addStep(new AutoStepDelay(500));\n addStep(new StepStartDriveUsingMotionProfile(-5, 0.0));\n addStep(new StepWaitForDriveMotionProfile());\n addStep(new StepStopDriveUsingMotionProfile());\n addStep(new AutoStepDelay(500));\n\n AutoParallelStepGroup crossCheval = new AutoParallelStepGroup();\n AutoSerialStepGroup driveOver = new AutoSerialStepGroup();\n\n driveOver.addStep(new StepStartDriveUsingMotionProfile(80, 0.0));\n driveOver.addStep(new StepWaitForDriveMotionProfile());\n driveOver.addStep(new StepStopDriveUsingMotionProfile());\n // Medium flywheel speed.\n crossCheval.addStep(new StepRunFlywheel(Shooter.FLYWHEEL_SPEED_MEDIUM));\n crossCheval.addStep(driveOver);\n addStep(crossCheval);\n addStep(new AutoStepDelay(500));\n addStep(new StepSetIntakeState(false));\n addStep(new StepSetNoseState(false));\n addStep(new AutoStepDelay(1000));\n\n addStep(new StepQuickTurn(180));\n addStep(new AutoStepDelay(1000));\n addStep(new StepVisionAdjustment());\n addStep(new AutoStepDelay(500));\n addStep(new StepSetShooterPosition(true));\n addStep(new StepResetShooterPositionToggle());\n addStep(new AutoStepDelay(2000));\n addStep(new StepShoot());\n addStep(new AutoStepDelay(1000));\n addStep(new StepResetShotToggle());\n addStep(new StepRunFlywheel(Shooter.FLYWHEEL_SPEED_ZERO));\n\n // total delay time: 7.5 seconds\n }", "public void move() {\n track += speed;\n speed += acceleration;\n if (speed <= 0) {\n speed =0;\n }\n if (speed >= MAX_SPEED) {\n speed = MAX_SPEED;\n }\n y -= dy;\n if (y <=MAX_TOP) {\n y = MAX_TOP;\n }\n if (y >=MAX_BOTTOM){\n y = MAX_BOTTOM;\n }\n if (layer2 - speed <= 0) {\n layer1 = 0;\n layer2 = 2400;\n } else {\n\n layer1 -= speed;\n layer2 -= speed;\n }\n }", "public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }", "public void drive(double miles)\n {\n double gallonsBurned = miles / this.fuelEfficiency;\n this.fuelInTank = this.fuelInTank - gallonsBurned;\n }", "public void walk(int distance, int speed) {\n\t\t\r\n\t\t_weight = _weight - distance * speed / 1000000;\r\n\t\tSystem.out.println(_fullname + \" is done walking, his weight is: \" + _weight);\r\n\r\n\t\t\r\n\t}", "private void incrementSpeed(double amount){\n currentSpeed = Math.min(getCurrentSpeed() + speedFactor() * amount, enginePower);\n }", "public abstract void advance(double deltaTime);", "@Override\n public double speed() {\n \tif(Robot.drive.getDistance() > 120) {\n \t\treturn 0.2;\n \t}\n \treturn speed;\n }", "@Override\n\t\tpublic int getSpeed() {\n\t\t\treturn i+30;\n\t\t}", "public void moveForward() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t // 2\n\t\tseconds += tic;\n\t\tif (seconds >= 60.0) {\n\t\t\tseconds -= 60.0;\n\t\t\tminutes++;\n\t\t\tif (minutes == 60) {\n\t\t\t\tminutes = 0;\n\t\t\t\thours++;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void turn(float delta) {\n\t\t\r\n\t}", "void worldGo(int speed) {\n\t\tif (Hit != true) {\n\t\t\tfloat vo = 7;\n\t\t\tint x = 0;\n\t\t\tfloat y = vo;\n\t\t\tif (EZInteraction.isKeyDown(KeyEvent.VK_SPACE)) {\n\t\t\t\ty = (float) (-vo * 1.4);\n\t\t\t}\n\t\t\tif (turtle.image.getXCenter() < 250 || reachEnd == true) {\n\t\t\t\tx = speed;\n\t\t\t} else if (turtle.image.getXCenter() >= 250 && reachEnd == false) {\n\t\t\t\tmove(-speed);\n\t\t\t\tbackground.translateBy(-0.4, 0);\n\t\t\t}\n\t\t\tif (turtle.image.getYCenter() >= 700) {\n\t\t\t\tturtle.move(0, -vo);\n\t\t\t}\n\t\t\tturtle.move(x, y);\n\t\t\tif (turtle.image.getYCenter() <= 0) {\n\t\t\t\tturtle.move(0, -y);\n\t\t\t}\n\t\t\tfor (int a = 0; a < height; a++) {\n\n\t\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\t\tif (turtle.image.isPointInElement(FWorld[a][b].getXCenter(), FWorld[a][b].getYCenter())) {\n\t\t\t\t\t\t\tHit = true;\n\t\t\t\t\t\t\tint iX = FWorld[a][b].getXCenter();\n\t\t\t\t\t\t\tint iY = FWorld[a][b].getYCenter();\n\t\t\t\t\t\t\texplosion = EZ.addImage(\"boom.png\", iX, iY);\n\t\t\t\t\t\t\tGameOver.play();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (turtle.image.getXCenter() >= 1030) {\n\t\t\t\tPlayerreachEnd = true;\n\t\t\t}\n\t\t}\n\t}", "int spinTheWheel();", "@Override\n public void move()\n {\n System.out.println(\"tightrope walking\");\n }", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "@Override\n public void loop() { \n\n double forward = gamepad1.left_stick_y;\n double turn = gamepad1.right_stick_x;\n double collect = gamepad2.left_trigger - gamepad2.right_trigger;\n double wristPower = gamepad1.left_trigger - gamepad1.right_trigger;\n\n if (forward > 0)\n forward = Math.pow(forward, 2);\n else if (forward < 0)\n forward = -Math.pow(forward, 2);\n\n if (turn > 0)\n turn = Math.pow(turn, 2);\n else if (turn < 0)\n turn = -Math.pow(turn, 2);\n//\n// else if(turn < 0)\n// turn = -Math.pow(turn, 2);\n telemetry.addData(\"Forward Power\", forward);\n telemetry.addData(\"Turn Power\", turn);\n left.setPower(Range.clip(forward - turn, -1, 1));\n right.setPower(Range.clip(forward + turn, -1, 1));\n collection.setPower(0.8 * (Range.clip(collect, -1.0, 1.0)));\n wrist.setPower((Range.clip(wristPower, -1, 1)));\n\n //regular servo code\n// if(gamepad1.x && !wristUp) //wrist up\n// {\n// wrist.setPosition(.9);\n// wristUp = true;\n// }\n// else if(gamepad1.x && wristUp) //wrist down\n// { wrist.setPosition(-.9);\n// wristUp = false;\n// }\n// else if(gamepad1.left_trigger > 0 && wrist.getPosition() <= .95)\n// {\n// wrist.setPosition(wrist.getPosition() + 0.005);\n// }\n// else if(gamepad1.right_trigger > 0 && wrist.getPosition() >= -.95)\n// {\n// wrist.setPosition(wrist.getPosition() - 0.005);\n// }\n\n if (lift.getCurrentPosition() >= 0 || lift.getCurrentPosition() <= 3200 || liftOverride){\n if (gamepad2.left_stick_y > 0.2)\n lift.setPower(-1);\n else if (gamepad2.left_stick_y < -0.2)\n lift.setPower(1);\n else\n lift.setPower(0);\n }\n if(gamepad2.right_bumper && gamepad2.y)\n {\n liftOverride = true;\n }\n else if(liftOverride == true)\n {\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n liftOverride = false;\n }\n telemetry.addData(\"bucket posiition\", bucket.getPosition());\n telemetry.update();\n\n if (gamepad2.a) //bucket dump\n {\n bucket.setPosition(0.75);\n } else if (gamepad2.b) //bucket down\n {\n bucket.setPosition(0);\n } else if (gamepad2.x) //endgame\n bucket.setPosition(0.4);\n if (gamepad2.dpad_up && bucket.getPosition() <= 0.9975)\n bucket.setPosition(bucket.getPosition() + .0025);\n else if (gamepad2.dpad_down && bucket.getPosition() >= -0.9975)\n bucket.setPosition(bucket.getPosition() - .0025);\n\n\n //Press to keep bucket up for endgame\n //NOTE: D-Pad will not work unless gamepad2 B is pressed to end the override\n// if(gamepad2.a && bucketOverride == false) {\n// bucket.setPower(-.4);\n// bucketOverride = true;\n// }\n// else if (gamepad2.a && bucketOverride == true)\n// {\n// bucket.setPower(0);\n// bucketOverride = false;\n// }\n\n if (gamepad1.right_bumper) {\n extension.setPower(1);\n } else if (gamepad1.left_bumper) {\n extension.setPower(-1);\n } else extension.setPower(0);\n\n telemetry.update();\n }", "public void encoderDrive(double speed,\r\n double leftInches, \r\n double rightInches,\r\n String name) \r\n {\n int newLeftTarget = robot.leftDrive.getCurrentPosition() + (int)(leftInches * COUNTS_PER_INCH);\r\n int newRightTarget = robot.rightDrive.getCurrentPosition() + (int)(rightInches * COUNTS_PER_INCH);\r\n robot.leftDrive.setTargetPosition(newLeftTarget);\r\n robot.rightDrive.setTargetPosition(newRightTarget);\r\n\r\n // Turn On RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_TO_POSITION);\r\n\r\n // reset the timeout time and start motion.\r\n ElapsedTime localTimer = new ElapsedTime();\r\n localTimer.reset();\r\n robot.leftDrive.setPower(Math.abs(speed));\r\n robot.rightDrive.setPower(Math.abs(speed));\r\n\r\n // keep looping while we are still active, and there is time left, and both motors are running.\r\n // Note: We use (isBusy() && isBusy()) in the loop test, which means that when EITHER motor hits\r\n // its target position, the motion will stop. This is \"safer\" in the event that the robot will\r\n // always end the motion as soon as possible.\r\n // However, if you require that BOTH motors have finished their moves before the robot continues\r\n // onto the next step, use (isBusy() || isBusy()) in the loop test.\r\n while (localTimer.seconds() < EncoderDrive_Timeout_Second \r\n && (robot.leftDrive.isBusy() || robot.rightDrive.isBusy())) {\r\n\r\n // Display it for the driver.\r\n telemetry.addData(\"\", \"%s @ %s\", name, localTimer.toString());\r\n telemetry.addData(\"To\", \"%7d :%7d\", newLeftTarget, newRightTarget);\r\n telemetry.addData(\"At\", \"%7d :%7d\",\r\n robot.leftDrive.getCurrentPosition(),\r\n robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n idle();\r\n }\r\n\r\n // Stop all motion;\r\n robot.leftDrive.setPower(0);\r\n robot.rightDrive.setPower(0);\r\n\r\n // Turn off RUN_TO_POSITION\r\n robot.leftDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n robot.rightDrive.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\r\n }", "private long calcSeekTime (int newCylinder)\r\n\t{\r\n\t\t//\tCompute number of cylinders to move.\r\n\t\tint moveCyl = Math.abs(newCylinder - this.cylinder);\r\n\t\t//\tCompute time to move that many cylinders.\r\n\t\tlong moveTime = (long)(2 * config.getRampTime());\r\n\t\tmoveTime += Math.round(moveCyl * config.getTrack2Track());\r\n\t\treturn moveTime;\r\n\t}", "public void act() \n {\n age += 1;\n \n RandomTerrain world = (RandomTerrain)getWorld();\n \n int centreX = getX();\n \n int leftX = centreX - WHEEL_BASE;\n int rightX = centreX + WHEEL_BASE;\n \n int leftY = world.getTerrainHeight(leftX) - WHEEL_RADIUS;\n int rightY = world.getTerrainHeight(rightX) - WHEEL_RADIUS;\n \n double angle = Math.atan2(rightY - leftY, WHEEL_BASE * 2);\n \n /*\n {\n int midY = (leftY + rightY) / 2;\n leftY = midY + (int)(-WHEEL_BASE * Math.sin(angle));\n rightY = midY + (int)(WHEEL_BASE * Math.sin(angle));\n }\n */\n \n exactX += velocity * Math.cos(Math.max(-Math.PI/4, Math.min(Math.PI/4, angle)));\n \n setLocation((int)exactX, (leftY + rightY) / 2);\n \n GreenfootImage img = new GreenfootImage(WHEEL_BASE * 3, WHEEL_BASE * 3);\n img.setColor(java.awt.Color.RED);\n \n int leftWheelX = (img.getWidth()/2) - WHEEL_BASE;\n int rightWheelX = (img.getWidth()/2) + WHEEL_BASE;\n int leftWheelY = leftY - getY() + (img.getHeight()/2);\n int rightWheelY = rightY - getY() + (img.getHeight()/2);\n \n drawWheel(img, leftWheelX, leftWheelY);\n drawWheel(img, rightWheelX, rightWheelY);\n \n int perpX = (int)(WHEEL_BASE * Math.cos(angle - Math.PI/2));\n int perpY = (int)(WHEEL_BASE * Math.sin(angle - Math.PI/2));\n \n int[] xs = new int[] {leftWheelX, leftWheelX + perpX, rightWheelX + perpX, rightWheelX};\n int[] ys = new int[] {leftWheelY, leftWheelY + perpY, rightWheelY + perpY, rightWheelY};\n \n img.fillPolygon(xs, ys, 4);\n \n setImage(img);\n \n if ((exactX < 0 && velocity < 0 )|| (exactX >= getWorld().getWidth() && velocity > 0))\n {\n getWorld().removeObject(this);\n }\n }" ]
[ "0.6623239", "0.6607846", "0.6540818", "0.64688325", "0.6424186", "0.6334533", "0.63144183", "0.629859", "0.62885576", "0.62177765", "0.62070465", "0.61865175", "0.61534", "0.6139597", "0.61168164", "0.6109913", "0.6108247", "0.6083038", "0.6081055", "0.6072585", "0.60247916", "0.6024674", "0.601512", "0.6001296", "0.59995127", "0.59980947", "0.5992661", "0.59905964", "0.5984594", "0.5971343", "0.59453887", "0.59371847", "0.59126794", "0.5897849", "0.58910817", "0.588499", "0.58692944", "0.5864649", "0.585642", "0.5850296", "0.5835198", "0.582991", "0.5825775", "0.5822147", "0.5809793", "0.5803393", "0.58019507", "0.5800241", "0.5797396", "0.5785112", "0.57845753", "0.5769754", "0.57646686", "0.5761031", "0.57507515", "0.574676", "0.5741599", "0.5730305", "0.5725924", "0.57240486", "0.5721924", "0.5721544", "0.572094", "0.57199556", "0.5719719", "0.5714646", "0.5712391", "0.5711196", "0.5709254", "0.57074386", "0.57015043", "0.5698745", "0.5692466", "0.56834626", "0.5677623", "0.56724054", "0.56709576", "0.5668807", "0.56685793", "0.5668577", "0.56680965", "0.5667257", "0.56651896", "0.5663432", "0.5662051", "0.5658358", "0.56571877", "0.5653105", "0.5650551", "0.5645179", "0.56440383", "0.56438994", "0.564318", "0.5640684", "0.5639093", "0.5635256", "0.5631933", "0.56296307", "0.56289494", "0.5628093", "0.5623328" ]
0.0
-1
/ Method to generate date format
public static String yyyymmdddToddmmyyyy(String strDate) { DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date date = null; try { date = (Date) formatter.parse(strDate); } catch (ParseException e) { e.printStackTrace(); } SimpleDateFormat newFormat = new SimpleDateFormat("dd-MM-yyyy"); String finalString = newFormat.format(date); return finalString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String generateDate()\r\n\t{\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat datef = new SimpleDateFormat(\"YYYY_MM_dd_ss\");\r\n\t\treturn datef.format(d);\r\n\r\n\r\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "java.lang.String getToDate();", "private static String generateDateString(int year, int month, int dayOfMonth){\n //Add one to month b/c Android is zero-based while SimpleDateFormatter is not\n month++;\n String yearString = String.format(Locale.getDefault(), \"%04d\", year);\n String monthString = String.format(Locale.getDefault(), \"%02d\", month);\n String dayOfMonthString = String.format(Locale.getDefault(), \"%02d\", dayOfMonth);\n\n String result = yearString + \".\" + monthString + \".\" + dayOfMonthString;\n return result;\n }", "public String generateTimeStamp() {\t\t\r\n\t\t\tCalendar now = Calendar.getInstance();\r\n\t\t\tint year = now.get(Calendar.YEAR);\r\n\t\t\tint month = now.get(Calendar.MONTH) + 1;\r\n\t\t\tint day = now.get(Calendar.DATE);\r\n\t\t\tint hour = now.get(Calendar.HOUR_OF_DAY); // 24 hour format\r\n\t\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\t\tint second = now.get(Calendar.SECOND);\r\n\t\t\t\r\n\t\t\tString date = new Integer(year).toString() + \"y\";\r\n\t\t\t\r\n\t\t\tif(month<10)date = date + \"0\"; // zero padding single digit months to aid sorting.\r\n\t\t\tdate = date + new Integer(month).toString() + \"m\"; \r\n\r\n\t\t\tif(day<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(day).toString() + \"d\";\r\n\r\n\t\t\tif(hour<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(hour).toString() + \"_\"; \r\n\r\n\t\t\tif(minute<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(minute).toString() + \"_\"; \r\n\r\n\t\t\tif(second<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(second).toString() + \"x\";\r\n\t\t\t\r\n\t\t\t// add the random number just to be sure we avoid name collisions\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tdate = date + rand.nextInt(1000);\r\n\t\t\treturn date;\r\n\t\t}", "public String format (Date date , String dateFormat) ;", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "DateFormat getDisplayDateFormat();", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String toString() {\n\treturn String.format(\"%d/%d/%d\", year, month, day);\t\r\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public static String formatDate(Date date) {\n\t\tString newstring = new SimpleDateFormat(\"MM-dd-yyyy\").format(date);\n\t\treturn newstring;\n\t}", "public static String getYYYYMMDD()\r\n/* 65: */ {\r\n/* 66: 81 */ String nowTime = \"\";\r\n/* 67: 82 */ Date now = new Date();\r\n/* 68: 83 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 69: 84 */ nowTime = formatter.format(now);\r\n/* 70: 85 */ return nowTime;\r\n/* 71: */ }", "private String makeDateString(int day, int month, int year) {\n String str_month = \"\" + month;\n String str_day = \"\" + day;\n if (month < 10) {\n str_month = \"0\" + month;\n }\n if (day < 10) {\n str_day = \"0\" + day;\n }\n return year + \"-\" + str_month + \"-\" + str_day;\n }", "java.lang.String getDate();", "public static String generateCurrentDayString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn dateFormat.format(new Date());\n\t}", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}", "private String easyDateFormat(final String format) {\n Date today = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n String datenewformat = formatter.format(today);\n return datenewformat;\n }", "java.lang.String getStartDateYYYYMMDD();", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "private static String buildSequence() {\n\t\tSimpleDateFormat dateFormatGMT = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // set to Greenwich mean time.\n\t\treturn dateFormatGMT.format(new Date());\n\t}", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public String getFileFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\tDate date = formatter.parse(month + \"/\" + day + \"/\" + year);\n\n\t\t\treturn formatter.format(date);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "DateFormat getSourceDateFormat();", "private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String toString() {\n\t\treturn String.format(\"%d/%d/%d\", year, month, day);\n\t}", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }", "public static java.lang.String getDateFormat() {\r\n\t\treturn getDBLayer().getDateFormat();\r\n\t}", "private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }", "@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "String getDate();", "String getDate();", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "public static String formatDate(Date date) {\n final SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n return formatter.format(date);\n }", "public String getDateCreatedAsString() {\n return dateCreated.toString(\"MM/dd/yyyy\");\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "public static String getDateFormatForFileName() {\n final DateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HH-mm-ss\");\n return sdf.format(new Date());\n }", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "public static String getDisplayDateFormat(Date val) {\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn \"\" + format.format(val);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "@Override\n public String toString() {\n SimpleDateFormat format = new SimpleDateFormat (\"MMM d yyyy\");\n String dateString = format.format(by);\n return \"[D]\" + super.toString() + \" (by: \" + dateString + \")\";\n }", "private String getDate(int year, int month, int day) {\n return new StringBuilder().append(month).append(\"/\")\n .append(day).append(\"/\").append(year).toString();\n }", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "String formatDateCondition(Date date);", "protected static SimpleDateFormat dateFormat() {\n return dateFormat(true, false);\n }", "public static void main(String[] args) {\n String s = FormatFecha.format(FormatFecha.FMT_ISO, new Date());\n System.out.println(\"Fecha: \" + s);\n //\"10/6/2010\" 2010-06-10\n }", "private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}", "public String date() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public String getFormatedDate(Date date) {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\treturn sdf.format(date);\r\n\t}", "@Override\n public String toString() {\n return String.format(year + \",\" + month + \",\" + day);\n\n }", "private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }", "protected abstract String format();", "public static String dateOnly() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public static void dateFormat() {\n }", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "protected String getReturnDateString() { return \"\" + dateFormat.format(this.returnDate); }", "private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }", "public String toString() { //toString method\n String startDateString2= \"\"; //Initialize\n try{\n Date date1 = new SimpleDateFormat(\"yyyyMMdd\").parse(full_Date);\n DateFormat df2 = new SimpleDateFormat(\"MMM dd, yyyy\");\n startDateString2 = df2.format(date1);\n \n return startDateString2;\n }catch(ParseException e){\n e.printStackTrace();\n }\n return startDateString2;\n \n}", "public String getFormatDate()\n {\n return formatDate;\n }", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public static String toStringFormat_4(Date date) {\r\n\r\n\t\treturn dateToString(date, DATE_FORMAT_4);\r\n\t}", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "public String toString() {\n\t\tdouble hour = getHour();\n\t\tString h = (hour < 10 ? \" \" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + hour;\n\n\t\treturn \"(YYYY/MM/DD) \" + getYear() + \"/\" + (getMonth() < 10 ? \"0\" : \"\") + getMonth() + \"/\"\n\t\t\t\t+ (getDay() < 10 ? \"0\" : \"\") + getDay() + \", \" + h + \"h \" + (getCalendarType() ? \"(greg)\" : \"(jul)\")\n\t\t\t\t+ \"\\n\" + \"Jul. Day: \" + getJulDay() + \"; \" + \"DeltaT: \" + getDeltaT();\n\t}", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "public String formatDate(Date date) {\n\t\tString formattedDate;\n\t\tif (date != null) {\n\t\t\tformattedDate = simpleDateFormat.format(date);\n\t\t\tformattedDate = formattedDate.substring(0,\n\t\t\t\t\tformattedDate.length() - 5);\n\t\t} else {\n\t\t\tformattedDate = Constants.EMPTY_STRING;\n\t\t}\n\t\treturn formattedDate;\n\t}", "private static String getNewYearAsString() {\n\t\t// calculate the number of days since new years\n\t\tGregorianCalendar now = new GregorianCalendar();\n\t\t\n\t\t// create a date and string representing the new year\n\t\tGregorianCalendar newYearsDay = new GregorianCalendar( now.get(GregorianCalendar.YEAR), 0, 1);\n\t\tDateFormat fmt = new SimpleDateFormat(\"MMM dd, yyyy \");\n\t\n\t\treturn fmt.format( newYearsDay.getTime() );\n\t}", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public static String FormatDate(int day, int month, int year) {\r\n String jour = Integer.toString(day);\r\n String mois = Integer.toString(month + 1);\r\n if (jour.length() == 1) {\r\n jour = \"0\" + jour;\r\n }\r\n\r\n if (mois.length() == 1) {\r\n mois = \"0\" + mois;\r\n }\r\n return jour + \"/\" + mois + \"/\" + Integer.toString(year);\r\n }", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "@Override\n public String toString() {\n String byFormatted = by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n return \"[D]\" + super.toString() + \" (by: \" + byFormatted + \")\";\n }" ]
[ "0.75041425", "0.74634624", "0.6997567", "0.6964883", "0.6949486", "0.6874352", "0.6833352", "0.6799016", "0.6768548", "0.675916", "0.67423743", "0.673838", "0.6691687", "0.6686591", "0.66811264", "0.6676312", "0.6676181", "0.66756415", "0.6649506", "0.6640879", "0.6625701", "0.6620707", "0.6619543", "0.6610164", "0.6603784", "0.6599259", "0.65985984", "0.6595697", "0.6566057", "0.65607333", "0.65599966", "0.65457636", "0.65434366", "0.6536539", "0.6528505", "0.6514185", "0.6512846", "0.65022534", "0.649877", "0.64965", "0.6468632", "0.6467774", "0.64414966", "0.6430808", "0.64263976", "0.64249516", "0.64178", "0.6412036", "0.64095557", "0.6398324", "0.6392353", "0.63868755", "0.63868755", "0.6376044", "0.6361878", "0.6346413", "0.6332799", "0.6330311", "0.6328112", "0.6312103", "0.63108075", "0.628811", "0.62805533", "0.62626886", "0.62596536", "0.62555724", "0.6253972", "0.6251125", "0.62490296", "0.62444234", "0.6243676", "0.62337583", "0.62327033", "0.6230421", "0.62284946", "0.62215143", "0.62170196", "0.62157387", "0.6214131", "0.6211044", "0.62036335", "0.62001544", "0.61949015", "0.61943334", "0.61914796", "0.61899793", "0.61887866", "0.61749494", "0.6173402", "0.6169482", "0.6165", "0.6164071", "0.61614275", "0.61584485", "0.6155154", "0.61399937", "0.61396116", "0.6133427", "0.6130297", "0.61116767", "0.6105463" ]
0.0
-1
/ Method to generate date format
public static String ddmmyyyyToyyyymmddd(String strDate) { DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy"); Date date = null; try { date = (Date) formatter.parse(strDate); } catch (ParseException e) { e.printStackTrace(); } SimpleDateFormat newFormat = new SimpleDateFormat("yyyy-MM-dd"); String finalString = newFormat.format(date); return finalString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String generateDate()\r\n\t{\r\n\t\tDate d = new Date();\r\n\t\tSimpleDateFormat datef = new SimpleDateFormat(\"YYYY_MM_dd_ss\");\r\n\t\treturn datef.format(d);\r\n\r\n\r\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "private String createDate(){\n SimpleDateFormat date = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n String stringDate = date.format(new Date()); \n return stringDate;\n }", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "java.lang.String getToDate();", "private static String generateDateString(int year, int month, int dayOfMonth){\n //Add one to month b/c Android is zero-based while SimpleDateFormatter is not\n month++;\n String yearString = String.format(Locale.getDefault(), \"%04d\", year);\n String monthString = String.format(Locale.getDefault(), \"%02d\", month);\n String dayOfMonthString = String.format(Locale.getDefault(), \"%02d\", dayOfMonth);\n\n String result = yearString + \".\" + monthString + \".\" + dayOfMonthString;\n return result;\n }", "public String generateTimeStamp() {\t\t\r\n\t\t\tCalendar now = Calendar.getInstance();\r\n\t\t\tint year = now.get(Calendar.YEAR);\r\n\t\t\tint month = now.get(Calendar.MONTH) + 1;\r\n\t\t\tint day = now.get(Calendar.DATE);\r\n\t\t\tint hour = now.get(Calendar.HOUR_OF_DAY); // 24 hour format\r\n\t\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\t\tint second = now.get(Calendar.SECOND);\r\n\t\t\t\r\n\t\t\tString date = new Integer(year).toString() + \"y\";\r\n\t\t\t\r\n\t\t\tif(month<10)date = date + \"0\"; // zero padding single digit months to aid sorting.\r\n\t\t\tdate = date + new Integer(month).toString() + \"m\"; \r\n\r\n\t\t\tif(day<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(day).toString() + \"d\";\r\n\r\n\t\t\tif(hour<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(hour).toString() + \"_\"; \r\n\r\n\t\t\tif(minute<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(minute).toString() + \"_\"; \r\n\r\n\t\t\tif(second<10)date = date + \"0\"; // zero padding to aid sorting.\r\n\t\t\tdate = date + new Integer(second).toString() + \"x\";\r\n\t\t\t\r\n\t\t\t// add the random number just to be sure we avoid name collisions\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tdate = date + rand.nextInt(1000);\r\n\t\t\treturn date;\r\n\t\t}", "public String format (Date date , String dateFormat) ;", "public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}", "DateFormat getDisplayDateFormat();", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String toString() {\n\treturn String.format(\"%d/%d/%d\", year, month, day);\t\r\n\t}", "private String formatDate(final Date date) {\r\n\t\tfinal Calendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(date);\r\n\r\n\t\tfinal String dayOfMonth = formatDayOfMonth(calendar);\r\n\t\tfinal String month = formatMonth(calendar);\r\n\t\tfinal String year = String.valueOf(calendar.get(Calendar.YEAR));\r\n\r\n\t\treturn String.format(\"%s/%s/%s\", year, month, dayOfMonth);\r\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public static String formatDate(Date date) {\n\t\tString newstring = new SimpleDateFormat(\"MM-dd-yyyy\").format(date);\n\t\treturn newstring;\n\t}", "public static String getYYYYMMDD()\r\n/* 65: */ {\r\n/* 66: 81 */ String nowTime = \"\";\r\n/* 67: 82 */ Date now = new Date();\r\n/* 68: 83 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n/* 69: 84 */ nowTime = formatter.format(now);\r\n/* 70: 85 */ return nowTime;\r\n/* 71: */ }", "private String makeDateString(int day, int month, int year) {\n String str_month = \"\" + month;\n String str_day = \"\" + day;\n if (month < 10) {\n str_month = \"0\" + month;\n }\n if (day < 10) {\n str_day = \"0\" + day;\n }\n return year + \"-\" + str_month + \"-\" + str_day;\n }", "java.lang.String getDate();", "public static String generateCurrentDayString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn dateFormat.format(new Date());\n\t}", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public String toString() {\r\n\t\treturn String.format(\"%02d/%02d/%02d\", month, day, year);\r\n\r\n\t}", "java.lang.String getStartDateYYYYMMDD();", "private String easyDateFormat(final String format) {\n Date today = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n String datenewformat = formatter.format(today);\n return datenewformat;\n }", "public String ConvertDate(){\r\n//\t\tDate date=JavaUtils.getSystemDate();\r\n//\t DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd\");\r\n\t String pattern = \"yyyy-MM-dd\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n\r\n\t String date = simpleDateFormat.format(new Date());\r\n//\t System.out.println(date);\r\n\t \r\n//\t String s = df.format(date);\r\n//\t String result = s;\r\n//\t try {\r\n//\t date=df.parse(result);\r\n//\t } catch (ParseException e) {\r\n//\t // TODO Auto-generated catch block\r\n//\t e.printStackTrace();\r\n//\t }\r\n\t return date;\r\n\t }", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "private static String buildSequence() {\n\t\tSimpleDateFormat dateFormatGMT = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\");\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\")); // set to Greenwich mean time.\n\t\treturn dateFormatGMT.format(new Date());\n\t}", "public String getFileFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd\"));\n }", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "@Override\n\tpublic String toString() {\n\t\ttry {\n\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\t\tDate date = formatter.parse(month + \"/\" + day + \"/\" + year);\n\n\t\t\treturn formatter.format(date);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\n }", "DateFormat getSourceDateFormat();", "private String toDate(Date appDate) throws ParseException {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(appDate);\n\t\tString formatedDate = cal.get(Calendar.DATE) + \"/\" + (cal.get(Calendar.MONTH) + 1) + \"/\" + cal.get(Calendar.YEAR);\n\t\tSystem.out.println(\"formatedDate : \" + formatedDate); \n\t\treturn formatedDate;\n\t}", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public String toString() {\n\t\treturn String.format(\"%d/%d/%d\", year, month, day);\n\t}", "public String toString() {\r\n String date = month + \"/\" + day;\r\n return date;\r\n }", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }", "public static java.lang.String getDateFormat() {\r\n\t\treturn getDBLayer().getDateFormat();\r\n\t}", "private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }", "@Method(selector = \"stringFromDate:toDate:\")\n public native String format(NSDate fromDate, NSDate toDate);", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "String getDate();", "String getDate();", "public String toStringDateOfBirth() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\treturn dateofbirth.format(format);\n\t}", "public static String formatDate(Date date) {\n final SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n return formatter.format(date);\n }", "public String getDateCreatedAsString() {\n return dateCreated.toString(\"MM/dd/yyyy\");\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }", "protected String getRentDateString() { return \"\" + dateFormat.format(this.rentDate); }", "public static String getDateFormatForFileName() {\n final DateFormat sdf = new SimpleDateFormat(\"yyyyMMdd_HH-mm-ss\");\n return sdf.format(new Date());\n }", "public String getFormatDate() {\n String formatDate = servletRequest.getHeader(ConstantsCustomers.CUSTOMER_FORMAT_DATE);\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = jwtTokenUtil.getFormatDateFromToken();\n }\n if (StringUtil.isEmpty(formatDate)) {\n formatDate = ConstantsCustomers.APP_DATE_FORMAT_ES;\n }\n return formatDate;\n }", "public static String getDisplayDateFormat(Date val) {\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn \"\" + format.format(val);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "@Override\n public String toString() {\n SimpleDateFormat format = new SimpleDateFormat (\"MMM d yyyy\");\n String dateString = format.format(by);\n return \"[D]\" + super.toString() + \" (by: \" + dateString + \")\";\n }", "private String getDate(int year, int month, int day) {\n return new StringBuilder().append(month).append(\"/\")\n .append(day).append(\"/\").append(year).toString();\n }", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "String formatDateCondition(Date date);", "protected static SimpleDateFormat dateFormat() {\n return dateFormat(true, false);\n }", "private static String convertToDDMMYYYY(Date date) {\n\t\tString returnStr = \"\";\n\t\ttry {\n\t\tDateFormat format1 = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\treturnStr = format1.format(date);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn returnStr;\n\t}", "public static void main(String[] args) {\n String s = FormatFecha.format(FormatFecha.FMT_ISO, new Date());\n System.out.println(\"Fecha: \" + s);\n //\"10/6/2010\" 2010-06-10\n }", "public String date() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public String getDateConvert() {\n SimpleDateFormat dateFormat1 = new SimpleDateFormat(\"MMM dd yyyy - hh:mm\");\n SimpleDateFormat dateFormat2 = new SimpleDateFormat(\"a\");\n String date = dateFormat1.format(this.timePost) + dateFormat2.format(this.timePost).toLowerCase();\n return date;\n }", "public String getFormatedDate(Date date) {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\treturn sdf.format(date);\r\n\t}", "@Override\n public String toString() {\n return String.format(year + \",\" + month + \",\" + day);\n\n }", "private String getTimeFormat() {\r\n return mData.getConfiguration(\"x-labels-time-format\", \"yyyy-MM-dd\");\r\n }", "protected abstract String format();", "public static String dateOnly() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public static void dateFormat() {\n }", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public String toString(){\n\t\t\n\t\treturn month+\"/\"+day+\"/\"+year;\n\t}", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "protected String getReturnDateString() { return \"\" + dateFormat.format(this.returnDate); }", "private String formatDate(String dateStr) {\n try {\n SimpleDateFormat fmt = new SimpleDateFormat(Properties.DATE_FORMAT_ALL);\n Date date = fmt.parse(dateStr);\n SimpleDateFormat fmtOut = new SimpleDateFormat(Properties.DATE_FORMAT);\n return fmtOut.format(date);\n } catch (ParseException e) {\n System.out.println( Properties.K_WARNING + \" \" + e.getMessage());\n }\n return \"\";\n }", "public String getFormatDate()\n {\n return formatDate;\n }", "public String toString() { //toString method\n String startDateString2= \"\"; //Initialize\n try{\n Date date1 = new SimpleDateFormat(\"yyyyMMdd\").parse(full_Date);\n DateFormat df2 = new SimpleDateFormat(\"MMM dd, yyyy\");\n startDateString2 = df2.format(date1);\n \n return startDateString2;\n }catch(ParseException e){\n e.printStackTrace();\n }\n return startDateString2;\n \n}", "public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "public static String toStringFormat_4(Date date) {\r\n\r\n\t\treturn dateToString(date, DATE_FORMAT_4);\r\n\t}", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "public String toString() {\n\t\tdouble hour = getHour();\n\t\tString h = (hour < 10 ? \" \" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + (int) hour + \":\";\n\t\thour = 60 * (hour - (int) hour);\n\t\th += (hour < 10 ? \"0\" : \"\") + hour;\n\n\t\treturn \"(YYYY/MM/DD) \" + getYear() + \"/\" + (getMonth() < 10 ? \"0\" : \"\") + getMonth() + \"/\"\n\t\t\t\t+ (getDay() < 10 ? \"0\" : \"\") + getDay() + \", \" + h + \"h \" + (getCalendarType() ? \"(greg)\" : \"(jul)\")\n\t\t\t\t+ \"\\n\" + \"Jul. Day: \" + getJulDay() + \"; \" + \"DeltaT: \" + getDeltaT();\n\t}", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "public String formatDate(Date date) {\n\t\tString formattedDate;\n\t\tif (date != null) {\n\t\t\tformattedDate = simpleDateFormat.format(date);\n\t\t\tformattedDate = formattedDate.substring(0,\n\t\t\t\t\tformattedDate.length() - 5);\n\t\t} else {\n\t\t\tformattedDate = Constants.EMPTY_STRING;\n\t\t}\n\t\treturn formattedDate;\n\t}", "private static String getNewYearAsString() {\n\t\t// calculate the number of days since new years\n\t\tGregorianCalendar now = new GregorianCalendar();\n\t\t\n\t\t// create a date and string representing the new year\n\t\tGregorianCalendar newYearsDay = new GregorianCalendar( now.get(GregorianCalendar.YEAR), 0, 1);\n\t\tDateFormat fmt = new SimpleDateFormat(\"MMM dd, yyyy \");\n\t\n\t\treturn fmt.format( newYearsDay.getTime() );\n\t}", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public static String FormatDate(int day, int month, int year) {\r\n String jour = Integer.toString(day);\r\n String mois = Integer.toString(month + 1);\r\n if (jour.length() == 1) {\r\n jour = \"0\" + jour;\r\n }\r\n\r\n if (mois.length() == 1) {\r\n mois = \"0\" + mois;\r\n }\r\n return jour + \"/\" + mois + \"/\" + Integer.toString(year);\r\n }", "@Override\r\n\t\t\t\tpublic String valueToString(Object value) throws ParseException {\n\t\t\t\t\tif(value != null) {\r\n\t\t\t\t\tCalendar cal=(Calendar) value;\r\n\t\t\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd-MMM-yyyy\");\r\n\t\t\t\t\tString strDate=format.format(cal.getTime());\r\n\t\t\t\t\treturn strDate;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn \" \";\r\n\t\t\t\t}", "@Override\n public String toString() {\n String byFormatted = by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n return \"[D]\" + super.toString() + \" (by: \" + byFormatted + \")\";\n }" ]
[ "0.7503134", "0.746317", "0.6996606", "0.69656557", "0.69491184", "0.6874751", "0.6832876", "0.6799601", "0.6768501", "0.67567694", "0.6743179", "0.6739648", "0.6692076", "0.6685554", "0.66803885", "0.6678598", "0.6676745", "0.6675119", "0.66512686", "0.66408867", "0.6626235", "0.6622286", "0.66182786", "0.6611416", "0.66029024", "0.6599667", "0.6596443", "0.65956587", "0.6565084", "0.6562197", "0.6558313", "0.65450287", "0.65448016", "0.65360695", "0.65286773", "0.6515876", "0.65125924", "0.6501728", "0.6499871", "0.64975464", "0.64703625", "0.64668113", "0.6441517", "0.6430971", "0.64268285", "0.64228994", "0.6419217", "0.6412045", "0.6410992", "0.6398101", "0.63931835", "0.638792", "0.638792", "0.6375478", "0.6363637", "0.6346455", "0.63342404", "0.63307756", "0.6328478", "0.63133025", "0.6310665", "0.6287956", "0.62818134", "0.6264172", "0.62616426", "0.62561995", "0.62536794", "0.6251847", "0.62485397", "0.6244679", "0.6243531", "0.6236703", "0.6231101", "0.62300706", "0.62264156", "0.6221822", "0.62179756", "0.62175953", "0.6214152", "0.6210086", "0.62033814", "0.62002534", "0.61945015", "0.61932117", "0.61927474", "0.619047", "0.61893505", "0.6176069", "0.61748344", "0.6171218", "0.6164553", "0.61617535", "0.6161501", "0.6160081", "0.61577046", "0.61419904", "0.61387694", "0.61360073", "0.6131052", "0.6109449", "0.61049926" ]
0.0
-1
Method to Hide Soft Input Keyboard
public static void HideKeyboardMain(Activity mContext, View view) { try { InputMethodManager imm = (InputMethodManager) mContext .getSystemService(Context.INPUT_METHOD_SERVICE); // R.id.search_img imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void hideSoftKeyBoard();", "public void hideKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n\t}", "public void hideKeyboard() {\n getDriver().hideKeyboard();\n }", "public void hideWindowSoftKeyboard() {\n getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);\n }", "public void hideSoftKeyboard(){\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n // imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "@Override\n public void hide() {\n Gdx.input.setOnscreenKeyboardVisible(false);\n super.hide();\n }", "private void hideKeypad() {\n EditText editTextView = (EditText) findViewById(R.id.book_search_text);\n\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(editTextView.getWindowToken(), 0);\n }", "public void setInputMethodShowOff() {\n\n }", "public void hideKeyboard() {\n try {\n InputMethodManager inputmanager = (InputMethodManager)this.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (inputmanager != null) {\n inputmanager.hideSoftInputFromWindow(this.getCurrentFocus().getWindowToken(), 0);\n }\n } catch (Exception var2) {\n }\n }", "public void hideSoftKeyboard() {\n if(getCurrentFocus()!=null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }\n }", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public void hideSoftKeyboard()\n\t{\n\t\tif (getCurrentFocus() != null)\n\t\t{\n\t\t\tInputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t\t\tinputMethodManager.hideSoftInputFromWindow(getCurrentFocus()\n\t\t\t\t\t.getWindowToken(), 0);\n\t\t}\n\t\t// InputMethodManager imm = (InputMethodManager)\n\t\t// getSystemService(INPUT_METHOD_SERVICE);\n\t\t// imm.hideSoftInputFromWindow(editHousePrice.getWindowToken(), 0);\n\t}", "public void hideSoftKeyboard() {\n\t if(getCurrentFocus()!=null) {\n\t InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n\t }\n\t}", "public void hideKeyboard() {\n View view = getCurrentFocus();\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n if (imm != null) {\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }\n }", "private void hideKeyboard() {\n //check to make sure no view has focus\n View view = this.getCurrentFocus();\n\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this.getSystemService( Context.INPUT_METHOD_SERVICE );\n inputManager.hideSoftInputFromWindow( view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS );\n }\n }", "public void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "private void hideKeyboard() {\n\t View view = this.getCurrentFocus();\n\t if (view != null) {\n\t InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "private void hideKeyboard() {\n\t View view = this.getCurrentFocus();\n\t if (view != null) {\n\t InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "public void hideSoftKeyboard() {\n\t\tif (getCurrentFocus() != null) {\n\t\t\tInputMethodManager inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);\n\t\t\tinputMethodManager.hideSoftInputFromWindow(getCurrentFocus()\n\t\t\t\t\t.getWindowToken(), 0);\n\t\t}\n\t}", "private void hideKeyboard() {\n View view = this.getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) this\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "public static void hideSoftKeypad(Context context) {\n Activity activity = (Activity) context;\n if(activity != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (activity.getCurrentFocus() != null) {\n imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }\n }", "private void hideKeyboard() {\n\t\tInputMethodManager inputMgr = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tEditText editText = (EditText)findViewById(R.id.searchtext);\n\t\tinputMgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);\t\t\n\t}", "public void hideSoftKeyboard() {\n if (getActivity().getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getActivity().getSystemService(getActivity().INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);\n }\n }", "private void hideKeyboard() {\n\t\tView view = getActivity().getCurrentFocus();\n\t\tif ( view != null ) {\n\t\t\tInputMethodManager inputManager = ( InputMethodManager ) getActivity().getSystemService( Context.INPUT_METHOD_SERVICE );\n\t\t\tinputManager.hideSoftInputFromWindow( view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS );\n\t\t}\n\t}", "public boolean hideSoftInputBase() {\n if (tOverlaySupport != null) {\n return tOverlaySupport.hideSoftInputBase();\n }\n return false;\n }", "private void hideKeyboard() {\n View view = getActivity().getCurrentFocus();\n if (view != null) {\n InputMethodManager inputManager = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }", "public static void hideKeyboard(Activity instance) \n\t{\n\t\tInputMethodManager imm = (InputMethodManager) instance.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); // hide\n\t}", "public void supressKeyboard() {\n\t\tgetWindow().setSoftInputMode(\n\t\t\t\tWindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n\t}", "private void hideKeyboard(View v) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n\n }", "protected void hideKeyboard(View view)\n {\n InputMethodManager in = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }", "private void hideKeyboard(View view) {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n\n }", "public static void hideKeyboard(Activity activity) {\n activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n }", "public void hideInputMethod(IBinder token) {\n \tif (mImMgr != null) {\n \t\tmImMgr.hideSoftInputFromWindow(token, 0);\n \t}\n }", "private void hideSoftKeyboard() {\n\n FragmentActivity activity = getActivity();\n\n InputMethodManager in = (InputMethodManager)activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n in.hideSoftInputFromWindow(editTextEmail.getWindowToken(), 0);\n }", "public static void hideSoftInputMethod(Activity activity) {\n InputMethodManager inputManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(\n activity.getWindow().getDecorView().getWindowToken(),\n 0\n );\n try {\n View currentFocus = activity.getWindow().getCurrentFocus();\n if (currentFocus != null)\n currentFocus.clearFocus();\n } catch (Exception e) {\n // current focus could be out of visibility\n }\n }", "private static void hideSoftKeyboard(Activity activity) {\n InputMethodManager inputMethodManager =\n (InputMethodManager) activity.getSystemService(\n Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(\n activity.getCurrentFocus().getWindowToken(), 0);\n }", "public static void hideKeyboard(View view) {\n InputMethodManager inputManager = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }", "public void closeKeyboard(){\n View v = getCurrentFocus();\n if(v != null){\n imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);\n }\n }", "public static void requestHideKeyboard(Context context, View v) {\n InputMethodManager imm = ((InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE));\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }", "@Override\n public void onFocusChange(View v, boolean hasFocus) { // if focus has changed\n if (!hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(Context context, View myEditText) {\n hideKeyboard(context);\n try {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);\n } catch (Exception ignored) {\n }\n }", "public static void hideSoftKeyboard(Activity activity) {\n if (activity.getCurrentFocus() != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(Context context, EditText editText) {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n if (editText != null) {\n imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);\n //editText.clearFocus();\n //editText.setInputType(0);\n }\n }", "@Override\n\tpublic void hide() {\n\t\t((InputMultiplexer)Gdx.input.getInputProcessor()).removeProcessor(ui);\n\t}", "public static void hideSoftKeyboard(Activity activity) {\n\n InputMethodManager inputManager = (InputMethodManager)\n activity.getSystemService(\n Context.INPUT_METHOD_SERVICE);\n View focusedView = activity.getCurrentFocus();\n\n if (focusedView != null) {\n\n try{\n assert inputManager != null;\n inputManager.hideSoftInputFromWindow(focusedView.getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n }catch(AssertionError e){\n e.printStackTrace();\n }\n }\n }", "private void schowajKlawiature() {\n View view = this.getActivity().getCurrentFocus(); //inside a fragment you should use getActivity()\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public void onClick(View v) {\n editText1.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText1.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "public static void hideKeyboard(Activity activity)\n {\n View view = activity.getCurrentFocus();\n //If no view currently has focus, create a new one, just so we can grab a window token from it\n if(view != null)\n {\n InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n if(event.getAction() == MotionEvent.ACTION_DOWN){\n if(getCurrentFocus()!=null && getCurrentFocus().getWindowToken()!=null){\n manager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n }\n }\n return super.onTouchEvent(event);\n }", "public static void hideKeyboard(Context mContext) {\n try {\n InputMethodManager inputManager = (InputMethodManager) mContext\n .getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(((Activity) mContext).getCurrentFocus().getWindowToken(), 0);\n } catch (Exception ignored) {\n }\n }", "public static void hideKeyboard(Activity activity){\n\t\tif (activity.getCurrentFocus() != null){\n\t \tInputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE);\n\t \tinputMethodManager.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n\t }\n\t}", "public static void toggleKeyboard(Context context) {\n InputMethodManager imm = ((InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE));\n imm.toggleSoftInput(0, 0);\n }", "public static void hideKeyboard(Activity activity) {\n View view = activity.findViewById(android.R.id.content);\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tif (event.getAction() == MotionEvent.ACTION_DOWN) {\r\n\t\t\tif (getCurrentFocus() != null\r\n\t\t\t\t\t&& getCurrentFocus().getWindowToken() != null) {\r\n\t\t\t\tmanager.hideSoftInputFromWindow(getCurrentFocus()\r\n\t\t\t\t\t\t.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn super.onTouchEvent(event);\r\n\t}", "public void onClick(View v) {\n editText2.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText2.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "@Override\n\t\t\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\t\t\tInputMethodManager imm = (InputMethodManager) getApplicationContext()\n\t\t\t\t\t\t.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\timm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n\t\t\t\treturn false;\n\t\t\t}", "public void showKeyboard(){\n\t\tInputMethodManager inputMethodManager = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\tinputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);\n\t}", "public void onClick(View v) {\n editText3.setInputType(InputType.TYPE_NULL);\n InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n mgr.hideSoftInputFromWindow(editText3.getWindowToken(),InputMethodManager.HIDE_IMPLICIT_ONLY);\n }", "public void onPressHideKeyboard(EditText editText){\n editText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n /*hide keyboard\n If press any else where on screen, (need clickable=\"true\" & focusableInTouchMode=\"true\" in base layer xml)\n */\n @Override\n public void onFocusChange(View v, boolean hasFocus) { // if focus has changed\n if (!hasFocus) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(v.getWindowToken(), 0);\n }\n }\n });\n\n }", "public boolean hideCurrentInputLockedInternal() {\n boolean hideCurrentInputLocked;\n synchronized (this.mMethodMap) {\n hideCurrentInputLocked = ColorSecureInputMethodManagerService.super.hideCurrentInputLocked(0, (ResultReceiver) null);\n }\n return hideCurrentInputLocked;\n }", "@Override\n public boolean setSoftKeyboardShowMode(int mode) {\n return false;\n }", "public static void hideKeyboardFrom(Context context, View view) {\n if (view != null) {\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public void hide() throws DeviceException;", "public void setInputMethodShowOn() {\n\n }", "public void stopKeyboard() {\n\t\tthis.stopKeyboard = true;\n\t}", "private void closeKeyboard(){\n View view = this.getCurrentFocus();\n if (view != null){\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "public static void hideKeyboard(AndroidDriver driver) {\n\t\ttry {\n\t\t\tdriver.hideKeyboard();\n\t\t\tThread.sleep(2000);\n\t\t} catch (Throwable e) {\n\n\t\t}\n\t}", "public static void hideKeyboard(AndroidDriver driver) {\n\t\ttry {\n\t\t\tdriver.hideKeyboard();\n\t\t\tThread.sleep(2000);\n\t\t} catch (Throwable e) {\n\n\t\t}\n\t}", "public void hideBoomKeyTip() {\n }", "private void dismisskeyboard() {\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(usernameTxt.getWindowToken(), 0);\n imm.hideSoftInputFromWindow(passwordTxt.getWindowToken(), 0);\n imm.hideSoftInputFromWindow(fullnameTxt.getWindowToken(), 0);\n }", "@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\tif(event!=null){\n\t\t\t\tInputMethodManager imm = (InputMethodManager)getSystemService(\n\t\t\t\t\t Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\timm.hideSoftInputFromWindow(v.getWindowToken(), 0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}", "public static void hideKeyBoard(Activity mActivity, View mGetView) {\n\t\ttry {\n\t\t\t((InputMethodManager) mActivity\n\t\t\t\t\t.getSystemService(Activity.INPUT_METHOD_SERVICE))\n\t\t\t\t\t.hideSoftInputFromWindow(mGetView.getRootView()\n\t\t\t\t\t\t\t.getWindowToken(), 0);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void disableGamePlayKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), \"none\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_Z, 0), \"none\");\n }", "public static void hideKeyboard(Context mContext, View v) {\n InputMethodManager imm = (InputMethodManager) mContext\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(v.getWindowToken(),\n InputMethodManager.HIDE_NOT_ALWAYS);\n }", "public static void hideKeyboardFrom(Context context, View view) {\n if(context == null){\n throw new IllegalArgumentException(\"Context cannot be null\");\n }\n\n if(view == null){\n throw new IllegalArgumentException(\"View cannot be null\");\n }\n\n InputMethodManager imm = (InputMethodManager) context\n .getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }", "public static void hideKeyboard(Activity activity) {\n if(activity == null){\n throw new IllegalArgumentException(\"Activity cannot be null\");\n }\n\n InputMethodManager imm = (InputMethodManager) activity\n .getSystemService(Activity.INPUT_METHOD_SERVICE);\n //Find the currently focused view, so we can grab the correct window token from it.\n View view = activity.getCurrentFocus();\n //If no view currently has focus, create a new one, just so we can grab a window token from it\n if (view == null) {\n view = new View(activity);\n }\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);\n }", "private void closeKeyboard()\n {\n View view = this.getCurrentFocus();\n if(view != null)\n {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n }", "private void closeKeyBoard() throws NullPointerException {\n InputMethodManager inputManager =\n\t\t\t(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n\n // Base interface for a remotable object\n IBinder windowToken = getCurrentFocus().getWindowToken();\n\n // Hide type\n int hideType = InputMethodManager.HIDE_NOT_ALWAYS;\n\n // Hide the KeyBoard\n inputManager.hideSoftInputFromWindow(windowToken, hideType);\n }", "public void m16206h() {\n this.f13199d.setVisibility(0);\n this.f13199d.setFocusableInTouchMode(true);\n this.f13199d.requestFocus();\n this.f13199d.setOnKeyListener(this.f13198c);\n this.f13125b.f13131e = true;\n }", "void unsetKeyBox();", "public static void hideKeyboard(Fragment fragment) {\n fragment.getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t \t\t\t getWindow().setSoftInputMode(\n\t \t \t WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);\n\t \t\t\tshowDialog();\n\t\t\t\t}", "public static void hideSoftKeyboardwithEdit(View view, Context mContext) {\n if (!(view instanceof EditText)) {\n try {\n InputMethodManager inputManager = (InputMethodManager) mContext\n .getSystemService(Activity.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(((Activity) mContext).getCurrentFocus().getWindowToken(), 0);\n } catch (Exception ignored) {\n }\n\n }\n\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION |\n View.SYSTEM_UI_FLAG_FULLSCREEN |\n View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n }", "public static void disableSoftInputFromAppearing(EditText editText) {\n if (Build.VERSION.SDK_INT >= 11) {\n editText.setRawInputType(InputType.TYPE_CLASS_TEXT);\n editText.setTextIsSelectable(true);\n } else {\n editText.setRawInputType(InputType.TYPE_NULL);\n editText.setFocusable(true);\n }\n }", "public void hideIt(){\n this.setVisible(false);\n }", "@Override\n public void setFocus(Context context) {\n InputMethodManager inputManager =\n (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n inputManager.hideSoftInputFromWindow(this.getWindowToken(), 0);\n\n }", "@Override\r\n public boolean dispatchTouchEvent(MotionEvent event) {\n\r\n if (event.getAction() == MotionEvent.ACTION_DOWN) {\r\n View v = getCurrentFocus();\r\n if (v instanceof EditText) {\r\n Rect outRect = new Rect();\r\n v.getGlobalVisibleRect(outRect);\r\n if (!outRect.contains((int) event.getRawX(), (int) event.getRawY())) {\r\n v.clearFocus();\r\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\r\n imm.hideSoftInputFromWindow(v.getWindowToken(), 0);\r\n }\r\n }\r\n }\r\n return super.dispatchTouchEvent(event);\r\n }", "public static void hide(@Nullable Activity activity) {\n if (activity == null) {\n LogHelper.writeWithTrace(Level.WARNING, TAG, \"Activity is null!\");\n return;\n }\n\n InputMethodManager mgr = (InputMethodManager)activity\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n if (mgr != null) {\n mgr.hideSoftInputFromWindow(activity\n .getWindow().getDecorView().getWindowToken(), 0);\n }\n }", "public void disableInputs();", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "private void hideSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_IMMERSIVE\n // Set the content to appear under the system bars so that the\n // content doesn't resize when the system bars hide and show.\n | View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n // Hide the nav bar and status bar\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN);\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n InputMethodManager inputMethodManager = (InputMethodManager)\n getSystemService(Context.INPUT_METHOD_SERVICE);\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n }", "public void setHide()\n\t{\n\t\tMainController.getInstance().setVisible(name, false);\n\t}" ]
[ "0.86636037", "0.85031563", "0.83705765", "0.82356054", "0.82160866", "0.805925", "0.8058099", "0.8050618", "0.800639", "0.78253007", "0.78250045", "0.78161705", "0.7791941", "0.7786556", "0.776499", "0.7762368", "0.775248", "0.7732237", "0.7732237", "0.77285445", "0.77259576", "0.7709306", "0.76877", "0.7628687", "0.7565998", "0.7559619", "0.7544596", "0.75149417", "0.74035686", "0.7394426", "0.7363432", "0.7360089", "0.7299349", "0.7144734", "0.7132012", "0.7076846", "0.70712495", "0.70566994", "0.70455176", "0.7002748", "0.69926184", "0.6969024", "0.692929", "0.6909569", "0.68795866", "0.68670005", "0.6863186", "0.68510467", "0.6842921", "0.6820369", "0.6819103", "0.6817823", "0.6790496", "0.67835784", "0.67820215", "0.6743937", "0.67058676", "0.66998094", "0.6682295", "0.66763574", "0.6675479", "0.6675266", "0.66663903", "0.66500634", "0.66496265", "0.6641049", "0.6632543", "0.6629211", "0.6629211", "0.6619669", "0.6584819", "0.65577203", "0.65284216", "0.65212214", "0.64943916", "0.6485649", "0.64753747", "0.64714086", "0.64577025", "0.6457106", "0.64478654", "0.64388114", "0.64312434", "0.6393275", "0.6366087", "0.63476646", "0.6319037", "0.63187665", "0.63040286", "0.62931675", "0.62613654", "0.62587804", "0.6251651", "0.6251651", "0.6251651", "0.6251651", "0.6251651", "0.6251651", "0.62473357", "0.62352633" ]
0.6777176
55
Empty interface declaration, similar to UiBinder
interface Driver extends RequestFactoryEditorDriver<PersonProxy, PersonEditor> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EmptyInterface {}", "interface UiBinderInstance extends UiBinder<Widget, Menu> {\r\n\t\t// Nothing to do\r\n\t}", "@Override\n public boolean isInterface() { return false; }", "public interface EmptyView extends BaseView {\n}", "public interface ApiHandler {\n // Empty\n}", "public interface i {\n}", "public Object _get_interface()\n {\n throw new NO_IMPLEMENT(reason);\n }", "interface Blank extends WithLocation {\n }", "interface Blank extends WithLocation {\n }", "public interface DMBaseIEmpty<Empty> {\n\n /**\n * For get empty object and send to binding view\n *\n * @return Empty is object type for send data and show in the empty view, use in the recycler view\n */\n default Empty getEmptyObject() {\n return null;\n }\n}", "interface I {}", "interface Blank extends WithVault {\n }", "public interface HasUiAttributes {\n}", "public interface TestInerface {\n public String name = \"asd\";\n BlankFragment qqq = null;\n}", "@Override\r\n\tpublic Class<?> interfaceAdapted() {\n\t\treturn null;\r\n\t}", "interface InterfaceDemo {\n int age =0; //接口中变量都是公开静态常量\n String name =null;\n abstract void aa();\n\n public abstract void display(); //接口中方法都是抽象的\n}", "public interface ReloadViewUICommand extends UICommandMdsl\n{\n}", "public interface AppUi {\n\n /**\n * Initializes the UI.\n *\n * @param root The layout root of app UI.\n * @param isSecureCamera Whether the app is in secure camera mode.\n * @param isCaptureIntent Whether the app is in capture intent mode.\n */\n public void init(View root, boolean isSecureCamera, boolean isCaptureIntent);\n\n /**\n * Returns the module layout root.\n */\n public FrameLayout getModuleLayoutRoot();\n\n /**\n * Returns the filmstrip controller.\n */\n public FilmstripController getFilmstripController();\n}", "public interface Pasticcere {\r\n //No attributes\r\n public void accendiForno();\r\n}", "public interface IFruit {\n\n void say();\n}", "InterfaceDefinition createInterfaceDefinition();", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public Interface() {\n initComponents();\n }", "public interface IView {\n\n\n\n\n\n}", "public interface a {\n }", "public interface SimpleInterface {\n void f();\n}", "public interface NotificationsView extends IsWidget {\n\n void setPresenter(Presenter presenter);\n\n void displayNotifications(List<NotificationDTO> notificationDTOs);\n\n public interface Presenter {\n }\n\n}", "public interface BaseIView {\n}", "public interface SimpleFlow extends Serializable {\n\n public Pipe getPipe();\n\n public @interface IrSimpleFlow {\n\n String name();\n\n }\n\n}", "public interface MonitorUI {\n\n void displayUI();\n}", "public interface IMainView extends IBaseView{\n}", "public interface a extends IInterface {\n}", "public interface IBaseViewImpl {\n}", "interface InterfaceA {\n\tint a = 5;\n\tvoid show();\n\tint display();\n}", "public interface NoEventType {\n\n}", "public interface a {\n void a();\n }", "public interface a {\n void a();\n }", "public interface A {\n default void oi(){\n System.out.println(\"Dentro do oi de A\");\n }\n}", "public static Interface getInterface() {\n return null;\n }", "public interface IBibliotheque {\n\t// Start of user code (user defined attributes for IBibliotheque)\n\n\t// End of user code\n\n\t/**\n\t * Description of the method listeDesEmpruntsEnCours.\n\t */\n\tpublic void listeDesEmpruntsEnCours();\n\n\t// Start of user code (user defined methods for IBibliotheque)\n\n\t// End of user code\n\n}", "public interface IBaseView {\n}", "public interface IBaseView {\n}", "public interface IBaseView {\n}", "public interface INotificationPresenter extends IPresenter {\n}", "interface Binder extends UiBinder<Widget, SearchBoxUserRecord<?>> {\n }", "public interface View {\n}", "public interface View {\n}", "interface Hi {\n // MUST BE IMPLEMENTED IN IMPLEMENTING CLASS!!\n void Okay(String q);\n}", "public interface IMainView {\n\n}", "public interface UserDao extends BaseDaoInterface<String, UserEntity> {\n // empty interface\n}", "interface Blank\n extends GroupableResource.DefinitionWithRegion<WithGroup> {\n }", "Interface_decl getInterface();", "public interface Buttion {\n\n void display();\n}", "interface A {\n\t\tvoid displayA();\n\t}", "interface ws$i extends ws$n {\n boolean b();\n\n String c();\n}", "public interface BaseApiService {\n // Empty declaration\n}", "public interface BaseUi {\n\n /**\n * Show error.\n */\n void showError();\n\n /**\n * Show error.\n *\n * @param titleId\n * the title id\n * @param messageId\n * the message id\n */\n void showError(@StringRes int titleId, @StringRes int messageId);\n\n /**\n * Show loading state.\n */\n void showLoadingState();\n\n /**\n * Show loading state.\n *\n * @param res\n * the res\n */\n void showLoadingState(@StringRes int res);\n\n /**\n * Hide loading state.\n */\n void hideLoadingState();\n}", "public interface AInterface {\n\n public void say();\n\n}", "public interface Add_Voyage_UI_itf {\n\n void saveTravel(View view);\n}", "public interface IPresenter {\n}", "public interface OnBaseUIListener {\n}", "interface Iface {\n void usedIface();\n}", "interface A{\n void show();\n}", "public interface UICreator {\r\n // TODO convert to use View.Builder ?\r\n /**\r\n * Should instantiate the UI.\r\n * @param sim The {@link Simulator} instance for which the UI should be\r\n * created.\r\n */\r\n void createUI(Simulator sim);\r\n }", "interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {\n }", "interface Blank extends GroupableResourceCore.DefinitionWithRegion<WithGroup> {\n }", "default void display1(){\n\t\tSystem.out.println(\"Default Method inside interface\");\n\t}", "public interface IInventoryObject extends IID\n{\n}", "@SuppressWarnings(\"unused\")\npublic interface GameFrillsSettingsView extends MvpView {\n}", "public interface PresentationModel extends Outlasting {\n}", "public interface Fruit {\n}", "interface Blank extends WithJobAgent {\n }", "@Override\n public org.omg.CORBA.Object _get_interface_def()\n {\n if (interfaceDef != null)\n return interfaceDef;\n else\n return super._get_interface_def();\n }", "public interface DiscoverIView extends BaseIView {\n\n}", "public interface MainActivityView {\n\n}", "public interface StandaloneObject {\n // marker\n}", "public interface HomeViewInterface extends MvpView {\n}", "public Interface ()\n {\n initComponents ();\n }", "public interface IOverride extends IMeasurement_descriptor{\n\n\tpublic IRI iri();\n\n}", "public interface RegisteredBooking extends Booking, Updatable.Unupdated {\r\n}", "public interface UIAction {\n}", "public interface AnInterface {\n void f();\n\n void g();\n\n void h();\n}", "interface Blank extends WithParentResource {\n }", "interface Blank extends WithParentResource {\n }", "interface Blank extends WithParentResource {\n }", "public interface InterfaceA {\n\n default String message() {\n return \"Message from Interface A\";\n }\n\n}", "private static interface Base {\n\n public void foo();\n }", "public interface IdleView extends BaseMVPView {\n}", "public interface IMainView {\n\n\n void msg(String s);\n}", "public interface Hello {\n\n String hello();\n}", "public interface MainIView<E> extends IView<E>,IToolbar {\n}", "public interface EButton extends EButtonBase {\r\n}", "public Object _get_interface_def()\n {\n // First try to call the delegate implementation class's\n // \"Object get_interface_def(..)\" method (will work for JDK1.2\n // ORBs).\n // Else call the delegate implementation class's\n // \"InterfaceDef get_interface(..)\" method using reflection\n // (will work for pre-JDK1.2 ORBs).\n\n throw new NO_IMPLEMENT(reason);\n }", "public interface IMVPView {\n}", "public interface Ui {\n /**\n * Starts the UI (and the JavaFX application).\n *\n * @param primaryStage Stage created by the JavaFX system when the application first starts up.\n */\n void start(Stage primaryStage);\n\n /**\n * Prints message on the command window.\n *\n * @param message Output message.\n */\n void print(String message);\n}", "org.omg.CORBA.Object _get_interface_def();", "interface A {\n void a();\n}", "interface Blank extends AuthorizationRule.DefinitionStages.WithListenOrSendOrManage<WithCreate> {\n }", "public interface Button {\n void display();\n}", "public interface Screen {\n}" ]
[ "0.7487416", "0.72910595", "0.70813364", "0.69612104", "0.655957", "0.64811164", "0.63811904", "0.6365123", "0.6365123", "0.6299724", "0.62910783", "0.62888217", "0.62512255", "0.6245274", "0.6185288", "0.6179152", "0.6177671", "0.61749953", "0.6173776", "0.6169413", "0.616692", "0.6141522", "0.6141522", "0.6141522", "0.61149216", "0.6112208", "0.60993373", "0.6046403", "0.60383", "0.60241765", "0.6019864", "0.6014132", "0.5997952", "0.5995661", "0.5994508", "0.59944457", "0.5992786", "0.5992786", "0.5970901", "0.59625864", "0.59502655", "0.5945165", "0.5945165", "0.5945165", "0.59433275", "0.5933556", "0.59320927", "0.59320927", "0.59243464", "0.5923075", "0.59226215", "0.5917152", "0.59170717", "0.5915538", "0.5910778", "0.59036964", "0.5895141", "0.58907956", "0.5885383", "0.5884128", "0.58799475", "0.5879139", "0.58679855", "0.5867339", "0.5866628", "0.5863092", "0.5863092", "0.58620447", "0.5851206", "0.5849484", "0.5843956", "0.5840951", "0.58359", "0.58309776", "0.58288085", "0.58283997", "0.5818369", "0.58092266", "0.58031994", "0.57986975", "0.5796218", "0.57942414", "0.5784153", "0.5776284", "0.5776284", "0.5776284", "0.57752836", "0.5774411", "0.5767523", "0.576318", "0.5761452", "0.5757366", "0.5748672", "0.5747473", "0.5743683", "0.5742548", "0.57425034", "0.57415706", "0.5740552", "0.5739929", "0.5738571" ]
0.0
-1
PersonEditor is a DialogBox that extends Editor PersonEditor editor = new PersonEditor(); Initialize the driver with the toplevel editor
public void edit(PersonProxy personProxy, PersonRequest request) { driver.initialize(requestFactory, personEditor); // personEditor.editPersonProxy(personProxy); // Copy the data in the object into the UI driver.edit(personProxy, request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EditorDriver() {\r\n\t\tgui = new GUI(this);\r\n\t\treadingInputPath = true;\r\n\t\tinputFileFound = false;\r\n\t\teditor = new Editor();\r\n\t\tgui.println(IN_FILE_PROMPT);\r\n\t}", "public Editor getEditor() { return editor; }", "public void setEditor(Editor editor)\n {\n this.editor = editor;\n }", "protected void initializeEditors() {\n\t}", "public Component getEditorComponent ()\r\n {\r\n return editor;\r\n }", "Builder addEditor(Person value);", "void setEditorController(EditorViewController gameEditorViewController);", "public void configureEditor() {\n\t\tsuper.configureEditor();\n\t}", "private void initEditorComponent () {\n // Overriding the 'setJawbDocument' method to handle logging too.\n final AnnotationPopupListener popupListener =\n new AnnotationPopupListener(this);\n \n JTabbedPane tp = new DetachableTabsJawbComponent (task.getName()) {\n public void setJawbDocument (JawbDocument doc) {\n\t JawbDocument old = getJawbDocument();\n super.setJawbDocument (doc); // this is a must!!!\n\t if (old != null) \n\t old.getAnnotationMouseModel().\n\t removeAnnotationMouseListener(popupListener);\n\t if (doc != null)\n\t doc.getAnnotationMouseModel().\n\t addAnnotationMouseListener(popupListener);\n }\n };\n\n // add a simple editor for each\n Iterator iter = task.getMaiaScheme().iteratorOverAnnotationTypes();\n while (iter.hasNext()) {\n AnnotationType type = (AnnotationType) iter.next();\n Component editor = new SimpleAnnotEditor(this, type);\n tp.add (type.getName(), editor);\n }\n\n editorComponent = (JawbComponent)tp;\n }", "@Override\n\tpublic void setGui(PersonGui g) {\n\t\t\n\t}", "public void runEditorNew()\r\n\t{\r\n\t\tmainFrame.runEditorNew();\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tIWorkbenchPage page = getPage();\n\t\t\t\t\tJasmineEditorInput input = new JasmineEditorInput(specRunner, name);\n\t\t\t\t\tpart.add(page.openEditor(input, ID));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\texception.add(e);\n\t\t\t\t}\n\t\t\t}", "private void _openEditor() {\n\t\tWindow w = new Window(_caption.getValue());\n\t\tw.setId(\"tinyEditor\");\n\t\tw.setCaptionAsHtml(true);\n\t\t_tinyEditor = new TinyMCETextField();\n\t\t_tinyEditor.setValue(_hiddenField.getValue());\n\t\tw.setResizable(true);\n\t\tw.center();\n\t\tw.setWidth(800, Unit.PIXELS);\n\t\tw.setHeight(600, Unit.PIXELS);\n\t\tVerticalLayout vl = new VerticalLayout();\n\t\tvl.setSizeFull();\n\t\tw.setContent(vl);\n\t\tvl.addComponent(_tinyEditor);\n\t\tButton close = new Button(_i18n.getMessage(\"close\"));\n\t\tclose.addClickListener(evt -> w.close());\n\t\tButton accept = new Button(_i18n.getMessage(\"accept\"));\n\t\taccept.addStyleName(ValoTheme.BUTTON_PRIMARY);\n\t\taccept.addClickListener(evt -> {\n\t\t\t\t\t\t\t\t\t\tString oldValue = _hiddenField.getValue();\n\t\t\t\t\t\t\t\t\t\t_hiddenField.setValue(_tinyEditor.getValue());\n\t\t\t\t\t\t\t\t\t\tif (!oldValue.equals(_hiddenField.getValue())) {\n\t\t\t\t\t\t\t\t\t\t\tthis.fireEvent(new ValueChangeEvent<String>(this,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \toldValue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \ttrue));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t_html.removeAllComponents();\n\t\t\t\t\t\t\t\t\t\t_html.addComponent(new Label(_tinyEditor.getValue(), ContentMode.HTML));\n\t\t\t\t\t\t\t\t\t\tw.close();\n\t\t\t\t\t\t\t\t\t });\n\t\tHorizontalLayout hl = new HorizontalLayout();\n\t\thl.addComponents(close, accept);\n\t\thl.setWidth(100, Unit.PERCENTAGE);\n\t\thl.setExpandRatio(close, 1);\n\t\thl.setComponentAlignment(accept, Alignment.BOTTOM_RIGHT);\n\t\thl.setComponentAlignment(close, Alignment.BOTTOM_RIGHT);\n\t\tvl.addComponent(hl);\n\t\tvl.setExpandRatio(_tinyEditor, 1);\n\t\tgetUI().addWindow(w);\n\t}", "protected abstract BaseDualControlDataEditor<PK, DATA> instantiateEditorPanel () ;", "public EditorFactoryImpl() {\n\t\tsuper();\n\t}", "public static void designTextEditor() {\n\t\t\n\t}", "public Editor() {\n initComponents();\n this.setTitle(\"Diario “La Otra Perspectiva”\");\n this.setLocationRelativeTo(null);\n }", "public UsuarioEditor() {\n initComponents();\n setLocationRelativeTo(null);\n// control = new PaisControlEditor();\n// control.registrarVentana(this);\n\n }", "public RefactoringDialog() {\r\n super(IDEPlugin.getEditorFrame());\r\n }", "public abstract void addEditorForm();", "public void runEditorExisting()\r\n\t{\r\n\t\tmainFrame.runEditorExisting();\r\n\t}", "@Override\n public void testCreateAsEditor() {}", "public interface EditorViewController {\r\n\t/**\r\n\t * Saves the current game\r\n\t */\r\n\tvoid saveGame();\r\n\r\n\t/**\r\n\t * Loads new game\r\n\t */\r\n\tvoid loadGame();\r\n\r\n\t/**\r\n\t * Created new player\r\n\t */\r\n\tvoid createNewPlayer();\r\n\r\n\t/**\r\n\t * Callback for view. Notify class that current state changed.\r\n\t */\r\n\tvoid currentStateChanged();\r\n\r\n\t/**\r\n\t * Callback for view. Notify class that map editor selection mechanism\r\n\t * changed.\r\n\t */\r\n\tvoid graphSelectionChanged(Mode mode);\r\n\r\n\t/**\r\n\t * Return currently active player\r\n\t */\r\n\tPlayer getCurrentPlayer();\r\n\r\n\t/**\r\n\t * Set currently selected state\r\n\t */\r\n\tvoid stateSelected(State state);\r\n\r\n\t/**\r\n\t * Return game world.\r\n\t */\r\n\tGameWorld getGameWorld();\r\n\r\n\t/**\r\n\t * Callback for the view. Create new continent.\r\n\t */\r\n\tvoid createNewContinent();\r\n\r\n\t/**\r\n\t * a method to create a new continent\r\n\t */\r\n\tvoid createNewContinent(Point2D location, Dimension2D size);\r\n\r\n\t/**\r\n\t * update the view of the simulation and editor\r\n\t */\r\n\tvoid updateView();\r\n}", "public void setEditor(Editor editor) {\n this.currentEditor = editor;\n refreshView();\n }", "public PetalEditor getEditor() {\n return petal_editor;\n }", "interface Driver extends RequestFactoryEditorDriver<PersonProxy, PersonEditor> {\n }", "public interface EditorView {\r\n\r\n\t/**\r\n\t * sets the controller that will handle events\r\n\t */\r\n\tvoid setEditorController(EditorViewController gameEditorViewController);\r\n\r\n\t/**\r\n\t * Initialise view\r\n\t */\r\n\tvoid init();\r\n\r\n\t/**\r\n\t * Show view\r\n\t */\r\n\tvoid show();\r\n\r\n\t/**\r\n\t * Get selected player name\r\n\t * \r\n\t * @return\r\n\t */\r\n\tString getNewPlayerName();\r\n\r\n\t/**\r\n\t * Add player to the view\r\n\t */\r\n\tvoid addPlayer(Player newPlayer);\r\n\r\n\t/**\r\n\t * Check is user marked state as a city\r\n\t */\r\n\tboolean isCitySelected();\r\n\r\n\t/**\r\n\t * Check is user marked that the current territory has barracks.\r\n\t */\r\n\tboolean hasBracksSelected();\r\n\r\n\t/**\r\n\t * Check is user marked that the current territory has iron.\r\n\t */\r\n\tboolean hasIronSelected();\r\n\r\n\t/**\r\n\t * Check is user marked that the current territory has stables.\r\n\t */\r\n\tboolean hasStablesSelected();\r\n\r\n\t/**\r\n\t * Check is user marked that the current territory has artillery factory.\r\n\t */\r\n\tboolean hasArtilleryFactorySelected();\r\n\r\n\t/**\r\n\t * get currently selected player.\r\n\t */\r\n\r\n\tPlayer getSelectedPlayer();\r\n\r\n\t/**\r\n\t * Get currently selected state name.\r\n\t */\r\n\tString getSelectedStateName();\r\n\r\n\t/**\r\n\t * Return number of cavalry units in currently selected territory\r\n\t */\r\n\tint getNumberOfCavalry();\r\n\r\n\t/**\r\n\t * Return number of artillery units in currently selected territory\r\n\t */\r\n\tint getNumberOfArtillery();\r\n\r\n\t/**\r\n\t * Return number of infantry units in currently selected territory\r\n\t */\r\n\tint getNumberOfInfantry();\r\n\r\n\t/**\r\n\t * Set the name of the state.\r\n\t */\r\n\tvoid setStateName(String name);\r\n\r\n\t/**\r\n\t * Set number of infantry in currently selected territory\r\n\t */\r\n\tvoid setNumberOfInfantry(int infantry);\r\n\r\n\t/**\r\n\t * Set number of cavalry units in currently selected territory\r\n\t */\r\n\tvoid setNumberOfCavalry(int cavalery);\r\n\r\n\t/**\r\n\t * Return number of artillery units in currently selected territory\r\n\t */\r\n\tvoid setNumberOfArtillery(int artillery);\r\n\r\n\t/**\r\n\t * Update territory state\r\n\t * \r\n\t * @param city\r\n\t * if true make is a city else a territory\r\n\t */\r\n\tvoid isCity(boolean city);\r\n\r\n\t/**\r\n\t * Set number of barracks in currently selected territory\r\n\t */\r\n\tvoid hasBarracks(boolean hasBarracks);\r\n\r\n\t/*\r\n\t * Configure resources\r\n\t * \r\n\t * @param hasOilDerrick\r\n\t * true is territory has this resource\r\n\t */\r\n\t//void hasOil(boolean hasOilDerrick);\r\n\r\n\t/**\r\n\t * Configure resources\r\n\t * \r\n\t * @param hasIron\r\n\t * true is territory has this resource\r\n\t */\r\n\tvoid hasIron(boolean hasIronMine);\r\n\r\n\t/**\r\n\t * this represents the editor method to add\r\n\t * and remove a stable from a city state\r\n\t * and grant the capability to create cavalry\r\n\t * @param hasStables\r\n\t */\r\n\tvoid hasStables(boolean hasStables);\r\n\r\n\t/**\r\n\t * Configure resources\r\n\t * \r\n\t * @param ArtilleryFactory\r\n\t * true is territory has this resource\r\n\t */\r\n\tvoid hasArtilleryFactory(boolean hasArtilleryFactory);\r\n\r\n\t/**\r\n\t * Select current player\r\n\t */\r\n\tvoid selectPlayer(Player player);\r\n\r\n\t/**\r\n\t * Get a file that contains saved game.\r\n\t * \r\n\t * @return null if no file selected\r\n\t */\r\n\tFile openFile();\r\n\r\n\t/**\r\n\t * Ask user to select a file where to save the game.\r\n\t * \r\n\t * @return null if no file selected\r\n\t */\r\n\tFile getSaveFile();\r\n\r\n\t/**\r\n\t * Clear player list\r\n\t */\r\n\tvoid clearPlayerList();\r\n\r\n\t/**\r\n\t * Sends a summary description of the state to the view.\r\n\t */\r\n\tvoid setDescription(State state);\r\n\r\n\t/**\r\n\t * Add continent to the view\r\n\t */\r\n\tvoid addContinent(Continent continent);\r\n\r\n\t/**\r\n\t * Select current continent.\r\n\t */\r\n\tvoid selectContinent(Continent continent);\r\n\r\n\t/**\r\n\t * Return currently selected continent.\r\n\t */\r\n\tContinent getSelectedContinent();\r\n\r\n\t/**\r\n\t * Clear continents list\r\n\t */\r\n\tvoid clearContinents();\r\n\r\n\t/**\r\n\t * Ask user for continent name\r\n\t * @return continent name or null of user cancels request.\r\n\t */\r\n\tString getContinentName();\r\n\r\n\t/**\r\n\t * set the simulation controller\r\n\t */\r\n\tvoid setSimulationController(SimulationController simulationController);\r\n\r\n\tGameWorldView getGameWorldView();\r\n}", "private void initEditorPanel() {\n\t\t\n\t\t//Remove all components from panel\n\t\tthis.editor.removeAll();\n\t\t\n\t\t//Redraw which feature\n\t\tthis.whichFeature.validate();\n\t\tthis.whichFeature.repaint();\n\t\t\n\t\t//Setting icon values\n\t\tpartL.setIcon(myParent.editor.profileImage);\n\t\tendTypeLTL.setIcon(myParent.editor.ltImage);\n\t\tendTypeRBL.setIcon(myParent.editor.rbImage);\n\t\tpfFormLL.setIcon(myParent.profileshapeImage);\n\t\tsetGo.setIcon(myParent.setImage);\n\t\tcancel.setIcon(myParent.cancelImage);\n\t\t\n\t\t//Setting values visibility\n\t\tpart.setVisible(false);\n\t\tpartL.setVisible(false);\n\t\tparts.setVisible(false);\n\t\t\n\t\tendTypeLT.setVisible(false);\n\t\tendTypeLTL.setVisible(false);\n\t\tlCut.setVisible(false);\n\t\tendTypeRB.setVisible(false);\n\t\tendTypeRBL.setVisible(false);\n\t\trCut.setVisible(false);\n\t\tpfFormL.setVisible(false);\n\t\tpfFormLL.setVisible(false);\n\t\tpfCombo.setVisible(false);\n\t\t\n\t\toffsetL.setVisible(false);\n\t\toffsetR.setVisible(false);\n\t\toffsetLT.setVisible(false);\n\t\toffsetRB.setVisible(false);\n\t\t\n\t\tbL.setVisible(false);\n\t\tbR.setVisible(false);\n\t\tdeltaL.setVisible(false);\n\t\tdeltaR.setVisible(false);\n\t\t\n\t\tsetGo.setVisible(false);\n\t\tcancel.setVisible(false);\n\t\t\n\t\tmyParent.dim.masterSelected.setEnabled(false);\n\t\tmyParent.dim.slaveSelected.setEnabled(false);\n\t\tmyParent.dim.masterSelected.setVisible(false);\n\t\tmyParent.dim.slaveSelected.setVisible(false);\n\t\tmyParent.dim.doAlign.setVisible(false);\n\t\tmyParent.dim.changeAlign.setVisible(false);\n\t\tmyParent.dim.cancelAlign.setVisible(false);\n\t\tmyParent.dim.doAlign.setEnabled(false);\n\t\tmyParent.dim.changeAlign.setEnabled(false);\n\t\t\n\t\tmyParent.alignSeq = 0;\n\t\t\n\t\t//Adding components to editor panel\n\t\teditor.add(part, new XYConstraints(1, 1, 20, 19));\n\t\teditor.add(partL, new XYConstraints(22, 1, 20, 19));\n\t\teditor.add(parts, new XYConstraints(42, 1, 140, 19));\n\t\t\n\t\teditor.add(endTypeLT, new XYConstraints(1, 23, 20, 19));\n\t\teditor.add(endTypeLTL, new XYConstraints(22, 23, 20, 19));\n\t\teditor.add(lCut, new XYConstraints(81, 23, 100, 19));\n\t\t\n\t\teditor.add(endTypeRB, new XYConstraints(1, 44, 20, 19));\n\t\teditor.add(endTypeRBL, new XYConstraints(22, 44, 20, 19));\n\t\teditor.add(rCut, new XYConstraints(81, 44, 100, 19));\n\t\t\n\t\teditor.add(pfFormL, new XYConstraints(1, 65, 20, 19));\n\t\teditor.add(pfFormLL, new XYConstraints(22, 65, 20, 19));\n\t\teditor.add(pfCombo, new XYConstraints(81, 65, 100, 19));\n\t\t\n\t\teditor.add(offsetL, new XYConstraints(1, 86, 50, 19));\n\t\teditor.add(offsetR, new XYConstraints(1, 107, 50, 19));\n\t\teditor.add(bL, new XYConstraints(1, 128, 50, 19));\n\t\teditor.add(bR, new XYConstraints(1, 149, 50, 19));\n\t\t\n\t\teditor.add(offsetLT, new XYConstraints(60, 86, 118, 19));\n\t\teditor.add(offsetRB, new XYConstraints(60, 107, 118, 19));\n\t\t\n\t\teditor.add(deltaL, new XYConstraints(60, 127, 118, 19));\n\t\teditor.add(deltaR, new XYConstraints(60, 147, 118, 19));\n\t\t\n\t\teditor.add(setGo, new XYConstraints(56, 168, 60, 19));\n\t\teditor.add(cancel, new XYConstraints(118, 168, 60, 19));\n\t\t\n\t\teditor.add(myParent.dim.masterSelected, new XYConstraints(1, 3, 120, 19));\n\t\teditor.add(myParent.dim.slaveSelected, new XYConstraints(1, 24,120, 19));\n\t\t\n\t\teditor.add(myParent.dim.doAlign, new XYConstraints(1, 50, 59, 19));\n\t\teditor.add(myParent.dim.changeAlign, new XYConstraints(61, 50, 59, 19));\n\t\teditor.add(myParent.dim.cancelAlign, new XYConstraints(121, 50, 59, 19));\n\t}", "protected void initializeEditingDomain() {\r\n\t\t// Create an adapter factory that yields item providers.\r\n\t\t//\r\n\t\tadapterFactory = new ComposedAdapterFactory(\r\n\t\t\t\tComposedAdapterFactory.Descriptor.Registry.INSTANCE);\r\n\r\n\t\tadapterFactory\r\n\t\t\t\t.addAdapterFactory(new ResourceItemProviderAdapterFactory());\r\n//\t\tadapterFactory\r\n//\t\t\t\t.addAdapterFactory(new ConfmlItemProviderAdapterFactory());\r\n\t\tadapterFactory\r\n\t\t\t\t.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());\r\n\r\n\t\t// Create the command stack that will notify this editor as commands are\r\n\t\t// executed.\r\n\t\t//\r\n\t\tBasicCommandStack commandStack = new BasicCommandStack();\r\n\r\n\t\t// Add a listener to set the most recent command's affected objects to\r\n\t\t// be the selection of the viewer with focus.\r\n\t\t//\r\n\t\tcommandStack.addCommandStackListener\r\n\t\t(new CommandStackListener() {\r\n\t\t\tpublic void commandStackChanged(final EventObject event) {\r\n\t\t\t\tgetContainer().getDisplay().asyncExec\r\n\t\t\t\t(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tfirePropertyChange(IEditorPart.PROP_DIRTY);\r\n\r\n\t\t\t\t\t\t// Try to select the affected objects.\r\n\t\t\t\t\t\t//\r\n\t\t\t\t\t\tCommand mostRecentCommand =\r\n\t\t\t\t\t\t\t((CommandStack)event.getSource()).getMostRecentCommand();\r\n\t\t\t\t\t\tif (mostRecentCommand != null) {\r\n\t\t\t\t\t\t\tsetSelectionToViewer(mostRecentCommand.getAffectedObjects());\r\n\t\t\t\t\t\t}\r\n//\t\t\t\t\t\tif (propertySheetPage != null &&\r\n//\t\t\t\t\t\t\t\t!propertySheetPage.getControl().isDisposed()) {\r\n//\t\t\t\t\t\t\tpropertySheetPage.refresh();\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\r\n\t\t// Create the editing domain with a special command stack.\r\n\t\t//\r\n\t\teditingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack,\r\n\t\t\t\tnew HashMap<Resource, Boolean>());\r\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n\n //Simply opens a new Editor Window\n new EditorWindow().setVisible(true);\n\n }", "public Component getCustomEditor() {\n\t\treturn mEditor;\n\t}", "private void init() {\n \n dialog = new JDialog(this.owner, charField.getName() + \" Post Composition\");\n compFieldPanel = new FieldPanel(false,false, null, this.selectionManager, this.editManager, null); // (searchParams)?\n //compFieldPanel.setSearchParams(searchParams);\n \n // MAIN GENUS TERM\n genusField = CharFieldGui.makePostCompTermList(charField,\"Genus\",minCompChars);\n genusField.setSelectionManager(this.selectionManager); // ??\n //genusField.setListSelectionModel(this.selectionModel);\n compFieldPanel.addCharFieldGuiToPanel(genusField);\n\n // REL-DIFF - put in 1 differentia\n addRelDiffGui();\n\n setGuiFromSelectedModel();\n\n // override FieldPanel preferred size which will set window size\n compFieldPanel.setPreferredSize(null);//new Dimension(700,160));\n dialog.add(compFieldPanel);\n addButtons();\n dialog.pack();\n dialog.setLocationRelativeTo(owner);\n dialog.setVisible(true);\n\n compCharChangeListener = new CompCharChangeListener();\n this.editManager.addCharChangeListener(compCharChangeListener);\n compCharSelectListener = new CompCharSelectListener();\n this.selectionModel.addListSelectionListener(compCharSelectListener);\n }", "public TableEditor openTableEditor(){\n this.save();\n\t\treturn new TableEditor(this.getTitle());\n\t}", "private ch.softenvironment.view.SimpleEditorPanel getPnlEditor() {\n\tif (ivjPnlEditor == null) {\n\t\ttry {\n\t\t\tivjPnlEditor = new ch.softenvironment.view.SimpleEditorPanel();\n\t\t\tivjPnlEditor.setName(\"PnlEditor\");\n\t\t\tivjPnlEditor.setLayout(new javax.swing.BoxLayout(getPnlEditor(), javax.swing.BoxLayout.X_AXIS));\n\t\t\tivjPnlEditor.setEnabled(true);\n\t\t\t// user code begin {1}\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjPnlEditor;\n}", "protected abstract void createFieldEditors();", "@Override\n public void openEditorPanel(Object object) {\n openEditorPanel(object, 1);\n }", "public EditorPanel() throws Exception {\n initComponents();\n \n //Gör Id kolumnem i min JTable osynlig men jag behöver id-numret sparat någonstans för att kunna referera till editors id-nummer när man tar \n //bort någon eller ändrar en editor.\n //Anledningen till att jag gör det osynligt för att jag tycker det är onödigt för en användare att få se den informationen.\n editorTable.getColumnModel().getColumn(0).setMinWidth(0);\n editorTable.getColumnModel().getColumn(0).setMaxWidth(0);\n \n //Sätter färgen på min Jtable\n JTableHeader headerSearch = editorTable.getTableHeader();\n headerSearch.setBackground( new Color(190, 227, 219) );\n headerSearch.setForeground( new Color(85, 91, 110) );\n \n addComboBox();\n addComboBoxTable();\n }", "public EditorTxt() {\n initComponents();\n }", "public void setupEditor(MapUIController controller, GUIEditorGrid editor) {\n editor.addLabel(\"Type\", getType().name());\n editor.addLabel(\"Vertices\", Arrays.toString(getVertices()));\n }", "protected ITextEditor getEditor() {\n return editor;\n }", "public ConfmlEditor() {\r\n\t\tsuper();\r\n\t\tinitializeEditingDomain();\r\n\t}", "public PersonOverview() {\n initComponents();\n setLanguage();\n fillPersonDropList();\n }", "public void testGetEditor() {\n\t\tassertEquals(\"Wrong REDEditor returned.\", fEditor, fFinder.getEditor());\n\t}", "public PtWikiTextEditorBase(GWikiElement element, String sectionName, String editor, String hint)\n {\n super(element, sectionName, editor, hint);\n extractContent();\n }", "@Override\r\n\tpublic void launch(IEditorPart arg0, String arg1) {\n\r\n\t}", "void makeDialog()\n\t{\n\t\tfDialog = new ViewOptionsDialog(this.getTopLevelAncestor());\n\t}", "public StringEditor() {\n\t\tsuper();\n\t\tmEditor = new JTextField();\n\t\t\n\t}", "public void createFieldEditors()\n\t{\n\t}", "@Override\r\n\tpublic void createPages() {\r\n\t\t// Creates the model from the editor input\r\n\t\t//\r\n\t\t\r\n\t\tcreateModel();\r\n\r\n\t\t// Only creates the other pages if there is something that can be edited\r\n\t\t//\r\n\t\t// if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {\r\n\t\tif (editorModel != null) {\r\n\t\t\t// Create a page for the selection tree view.\r\n\t\t\t//\r\n\r\n\t\t\t/*\r\n\t\t\t * Tree tree = new Tree(getContainer(), SWT.MULTI); selectionViewer\r\n\t\t\t * = new TreeViewer(tree); setCurrentViewer(selectionViewer);\r\n\t\t\t * \r\n\t\t\t * selectionViewer.setContentProvider(new\r\n\t\t\t * AdapterFactoryContentProvider(adapterFactory));\r\n\t\t\t * selectionViewer.setLabelProvider(new\r\n\t\t\t * AdapterFactoryLabelProvider(adapterFactory));\r\n\t\t\t * selectionViewer.setInput(editingDomain.getResourceSet());\r\n\t\t\t * selectionViewer.setSelection(new\r\n\t\t\t * StructuredSelection(editingDomain\r\n\t\t\t * .getResourceSet().getResources().get(0)), true);\r\n\t\t\t * \r\n\t\t\t * new AdapterFactoryTreeEditor(selectionViewer.getTree(),\r\n\t\t\t * adapterFactory);\r\n\t\t\t * \r\n\t\t\t * createContextMenuFor(selectionViewer);\r\n\t\t\t */\r\n\t\t\tComposite parent = getContainer();\r\n\t\t\tformToolkit = new FormToolkit(parent.getDisplay());\r\n\t\t\tform = formToolkit.createForm(parent);\r\n//\t\t\tform.setText(\"SETTINGS - View and modify setting values in \"\r\n//\t\t\t\t\t+ editorModel.getName() + \".\");\r\n\t\t\tComposite client = form.getBody();\r\n\t\t\t// client.setBackground(Display.getCurrent().getSystemColor(\r\n\t\t\t// SWT.COLOR_WHITE));\r\n\t\t\tclient.setLayout(new FillLayout());\r\n\t\t\tfeatureViewer = new FeatureViewer(client);\r\n\r\n\t\t\tfeatureViewer.setContentProvider(new FeatureViewerContentProvider(\r\n\t\t\t\t\teditingDomain.getCommandStack(), this));\r\n\t\t\tfeatureViewer.setInput(editorModel);\r\n\t\t\tfeatureViewer.setLabelProvider(new FeatureViewerLabelProvider(CrmlBuilder.getResourceModelRoot()));\r\n\t\t\t// featureViewer.refresh();\r\n\r\n\t\t\tfeatureViewer.addSelectionChangedListener(new ISelectionChangedListener(){\r\n\t\t\t\t\r\n\t\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\r\n\t\t\t\t\tIStructuredSelection selection = (IStructuredSelection) event\r\n\t\t\t\t\t.getSelection();\r\n\r\n\t\t\t\t\tsetSelection(selection);\r\n\t\t\t\t\t\r\n\t\t\t\t/*\tISelection convertSelection = convertSelectionToMainModel(selection);\r\n\t\t\t\t\tSelectionChangedEvent newEvent = new SelectionChangedEvent(\r\n\t\t\t\t\t\t\tConfmlEditor.this, convertSelection);\r\n\t\t\t\t\tfireSelection(newEvent);*/\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tgetSite().setSelectionProvider(featureViewer);\r\n\t\t\t// create pop up menu actions\r\n\t\t\tresetToDefaults = new ResetToDefaultAction(featureViewer);\r\n\t\t\tmoveUpAction = new MoveUpAction(featureViewer,this);\r\n\t\t\tmoveDownAction = new MoveDownAction(featureViewer,this);\r\n\t\t\tduplicateAction = new DuplicateSequencesAction(featureViewer,this);\r\n\t\t\topenDataConfmlAction = new OpenDataConfmlAction(featureViewer);\r\n\t\t\topenConfmlAction = new OpenConfmlAction(featureViewer);\r\n\t\t\topenImplAction = new OpenImplementationAction(featureViewer);\r\n\t\t\t\r\n\t\t\tIWorkbenchWindow window = getSite().getWorkbenchWindow();\r\n\t\t\tresetToDefaults.init(window);\r\n\t\t\tmoveUpAction.init(window);\r\n\t\t\tmoveDownAction.init(window);\r\n\t\t\tduplicateAction.init(window);\r\n\t\t\topenDataConfmlAction.init(window);\r\n\t\t\topenConfmlAction.init(window);\r\n\t\t\topenImplAction.init(window);\r\n\t\t\tdisableActions();\r\n\t\t\t\r\n\t\t\t// create pop up menu with actions\r\n\t\t\tcontextMenuListener = contextMenuListener(form);\r\n\t\t\tmenuManager = new MenuManager();\r\n\t\t\tmenuManager.addMenuListener(contextMenuListener);\r\n\t\t\tmenuManager.setRemoveAllWhenShown(true);\r\n\t\t\tMenu menu = menuManager.createContextMenu(form);\r\n\t\t\tform.setMenu(menu);\r\n\t\t\t\r\n\t\t\tint pageIndex = addPage(form);\r\n\t\t\tsetPageText(pageIndex, getString(\"_UI_SelectionPage_label\"));\r\n\r\n\t\t\tgetSite().getShell().getDisplay().asyncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tsetActivePage(0);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// featureViewer.addDirtyButtonListener(new MouseListener() {\r\n\t\t//\r\n\t\t// public void mouseDoubleClick(MouseEvent e) {\r\n\t\t//\r\n\t\t// }\r\n\t\t//\r\n\t\t// public void mouseDown(MouseEvent e) {\r\n\t\t// LeafGroup selectedGroup = getSelectedGroup();\r\n\t\t// if (selectedGroup != null\r\n\t\t// && !(selectedGroup instanceof SummaryLeafGroup)) {\r\n\t\t// UIGroup group = createDirtyForGroup(selectedGroup);\r\n\t\t// settingsViewer.setInput(group);\r\n\t\t// refreshAndHandleWidgetState();\r\n\t\t// // settingsViewer.refresh();\r\n\t\t// dirtySorting = true;\r\n\t\t// errorSorting = false;\r\n\t\t// notesSorting = false;\r\n\t\t// }\r\n\t\t// }\r\n\t\t//\r\n\t\t// public void mouseUp(MouseEvent e) {\r\n\t\t//\r\n\t\t// }\r\n\t\t//\r\n\t\t// });\r\n\r\n\t\t// Ensures that this editor will only display the page's tab\r\n\t\t// area if there are more than one page\r\n\t\t//\r\n\t\tgetContainer().addControlListener(new ControlAdapter() {\r\n\t\t\tboolean guard = false;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void controlResized(ControlEvent event) {\r\n\t\t\t\tif (!guard) {\r\n\t\t\t\t\tguard = true;\r\n\t\t\t\t\thideTabs();\r\n\t\t\t\t\tguard = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n//\t\tgetSite().getShell().getDisplay().asyncExec(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tupdateProblemIndication();\r\n//\t\t\t}\r\n//\t\t});\r\n\t\t\r\n\t\tupdateErrors();\r\n\t}", "public void correcto( Editor<Tipo> editor );", "public MyTextPane getEditor() {\n\t\treturn editor;\n\t}", "public TideParametersDialog(Dialog owner, java.awt.Frame parent, TideParameters tideParameters, boolean editable) {\n super(owner, true);\n this.editable = editable;\n initComponents();\n setUpGUI();\n populateGUI(tideParameters);\n validateInput(false);\n setLocationRelativeTo(owner);\n setVisible(true);\n }", "public void setActivePage(IEditorPart activeEditor) {\n\r\n\t}", "public SInspirationalPeople() {\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 300);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\r\n\t\tJPanel cmbopanel = new JPanel();\r\n\t\tJLabel personlbl = new JLabel(\"Person\");\r\n\r\n\t\tcomboBox = new JComboBox();\r\n\t\tfillComboBox();\r\n\r\n\t\tcomboBox.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e1) {\r\n\t\t\t\tfillTextArea();\r\n\t\t\t}\r\n\t\t});\r\n\t\t// code generated by windows builder\r\n\t\tGroupLayout gl_cmbopanel = new GroupLayout(cmbopanel);\r\n\t\tgl_cmbopanel.setHorizontalGroup(\r\n\t\t\tgl_cmbopanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_cmbopanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_cmbopanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addGroup(gl_cmbopanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t.addGap(38))\r\n\t\t\t\t\t\t.addComponent(personlbl))\r\n\t\t\t\t\t.addContainerGap(187, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tgl_cmbopanel.setVerticalGroup(\r\n\t\t\tgl_cmbopanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_cmbopanel.createSequentialGroup()\r\n\t\t\t\t\t.addGap(22)\r\n\t\t\t\t\t.addGroup(gl_cmbopanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(gl_cmbopanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(3)\r\n\t\t\t\t\t\t\t.addComponent(comboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addComponent(personlbl))\r\n\t\t\t\t\t.addContainerGap(23, Short.MAX_VALUE))\r\n\t\t);\r\n\r\n\t\tJScrollPane scrollPane = new JScrollPane();\r\n\r\n\t\tGroupLayout gl_contentPane = new GroupLayout(contentPane);\r\n\t\tgl_contentPane\r\n\t\t\t\t.setHorizontalGroup(gl_contentPane\r\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\tgl_contentPane\r\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcmbopanel,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t424,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscrollPane,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t328,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(0, Short.MAX_VALUE)));\r\n\t\tgl_contentPane.setVerticalGroup(gl_contentPane.createParallelGroup(\r\n\t\t\t\tAlignment.LEADING).addGroup(\r\n\t\t\t\tgl_contentPane\r\n\t\t\t\t\t\t.createSequentialGroup()\r\n\t\t\t\t\t\t.addComponent(cmbopanel, GroupLayout.PREFERRED_SIZE, 57,\r\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t\t.addComponent(scrollPane, GroupLayout.DEFAULT_SIZE,\r\n\t\t\t\t\t\t\t\t150, Short.MAX_VALUE).addContainerGap()));\r\n\r\n\t\tparagraphtextArea = new JTextArea();\r\n\t\tparagraphtextArea.setLineWrap(true);\r\n\t\tscrollPane.setViewportView(paragraphtextArea);\r\n\t\tcontentPane.setLayout(gl_contentPane);\r\n\t}", "public CurveEditorPanel(RavenEditor editor)\n {\n this.editor = editor;\n initComponents();\n\n coordToDeviceXform.setToScale(1, -1);\n\n selection.addSelectionListener(this);\n ToolTipManager.sharedInstance().registerComponent(this);\n }", "private void editTextEditorButton(){\n TextEditorTextfield.setText(textEditorPref);\n TextEditorDialog.setVisible(true);\n }", "public TextComposeBasePopup(CodeEditor editor) {\n if (editor == null) {\n throw new IllegalArgumentException();\n }\n mLocation = new int[2];\n mEditor = editor;\n super.setTouchable(true);\n textSizePx = mEditor.getTextSizePx();\n }", "public void createFieldEditors() {\n\t\t\n\t\tList<String> listOfValues = PreferenceOptions.GetTreeEditorFeatureOptions();\n\t\tint count = listOfValues.size();\n\t\tpreviously = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.FeatureEditor_CHOICE);\t\t\n\t\t\n\t\tString[][] labelAndvalues = new String[count][2];\n\t\tfor (int i = 0; i < count; i++)\n\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\tlabelAndvalues[i][j] = listOfValues.get(i);\t\t\t\n\t\t\n\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\tPreferenceOptions.FeatureEditor_CHOICE,\n\t\t\t\t\"Tree Editor Feature Wizard\",\n\t\t\t\t1,\n\t\t\t\tlabelAndvalues, \n\t\t\t\tgetFieldEditorParent()));\t\n\n\t\t/*Select the Engine to execute constraint*/\n\t\t\n\t\tList<String> listOfEngines = PreferenceOptions.getEngineOptions();\n\t\tint countEngines = listOfEngines.size();\t\t\n\t\t\n\t\tif (listOfEngines.size() != 0) {\n\t\t\t\n\t\t\tpreviouslyEngine = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.ENGINE_CHOICE);\n\t\t\t\n\t\t\tString[][] labelAndvaluesEngine = new String[countEngines][2];\n\t\t\tfor (int i = 0; i < countEngines; i++)\n\t\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\t\tlabelAndvaluesEngine[i][j] = listOfEngines.get(i);\n\t\t\t\t\n\t\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\t\tPreferenceOptions.ENGINE_CHOICE,\n\t\t\t\t\t\"Engine for the execution of constraints\",\n\t\t\t\t\t1,\n\t\t\t\t\tlabelAndvaluesEngine, \n\t\t\t\t\tgetFieldEditorParent()));\t\t\t\n\t\t}\t\n\t}", "@Override\r\n protected void onTriggerClick(ComponentEvent ce)\r\n {\r\n showEditor(ConceptPicker.this);\r\n }", "public void createFieldEditors() {\t\t\n\t\t\n//\t\taddField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, \n//\t\t\t\tMessages.UMAPPreferencePage_1, getFieldEditorParent()));\n\t\tgroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n\t\tgroup.setText(Messages.UMAPPreferencesHeader);\n\t\tgroup.setLayout(new GridLayout());\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgd.horizontalSpan = 1;\n\t\tgroup.setLayoutData(gd);\t\t\n\t\t\n//\t\tgroup2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n//\t\tgroup2.setText(Messages.UmapStringButtonFieldEditor_0);\n//\t\tgd.horizontalSpan = 2;\n//\t\tgroup2.setLayoutData(gd);\n//\t\tgroup2.setLayout(new GridLayout());\n\t\t\n\t\t\n\t\tvalidation = new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN,\tMessages.UMAPPreferencePage_2, group);\n\t\taddField( validation );\n\n\t\tclassAbreviation = new StringFieldEditor(PreferenceConstants.P_CLASS_NAME, Messages.UMAPPreferencePage_3, group);\n\t\tclassAbreviation.setEmptyStringAllowed(false);\n\t\tclassAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\tintfAbreviation = new StringFieldEditor(PreferenceConstants.P_INTF_NAME, Messages.UMAPPreferencePage_4, group);\n\t\tintfAbreviation.setEmptyStringAllowed(false);\n\t\tintfAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\texcAbreviation = new StringFieldEditor(PreferenceConstants.P_EXCP_NAME, Messages.UMAPPreferencePage_5, group);\n\t\texcAbreviation.setEmptyStringAllowed(false);\n\t\texcAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\t\n//\t\tprojectAbbreviation = new StringFieldEditor(PreferenceConstants.P_PROJ_NAME, Messages.UMAPPreferencePage_6, group);\n//\t\tprojectAbbreviation.setEmptyStringAllowed(true);\n\n//\t\tStringFieldEditor name = new StringFieldEditor(PreferenceConstants.P_USER_NAME, Messages.UmapStringButtonFieldEditor_2, group2);\n//\t\t\n//\t\tStringFieldEditor pass = new StringFieldEditor(PreferenceConstants.P_PWD, Messages.UmapStringButtonFieldEditor_3, group2);\n\t\t\n//\t\tURIStringButtonFieldEditor button = new URIStringButtonFieldEditor(PreferenceConstants.P_URI, Messages.UmapStringButtonFieldEditor_1, group2);\n\t\t\n//\t\taddField(name);\n//\t\taddField(pass);\n//\t\taddField(button);\n\t\t\n\t\taddField( classAbreviation );\n\t\taddField( intfAbreviation );\n\t\taddField( excAbreviation );\n//\t\taddField( projectAbbreviation );\t\t\n\t}", "public BaseEditorPanel getEditorPanel ()\n {\n return _epanel;\n }", "public StandardDialog() {\n super();\n init();\n }", "public EditTokenDialog() {\r\n \t\tsuper(\"net/rptools/maptool/client/ui/forms/tokenPropertiesDialog.jfrm\");\r\n \r\n \t\tpanelInit();\r\n \t}", "@NotNull\n private Editor createEditor(@NotNull Project project, @NotNull Document document) {\n Editor editor = EditorFactory.getInstance().createEditor(document, project, LatexFileType.INSTANCE, false);\n this.mouseListener = new MouseListener();\n\n ActionToolbar actionToolbar = createActionsToolbar();\n actionToolbar.setTargetComponent(editor.getComponent());\n editor.setHeaderComponent(actionToolbar.getComponent());\n editor.addEditorMouseListener(mouseListener);\n\n return editor;\n }", "public static JEntityEditor createDialog(java.awt.Window owner, Entity entity, String title,\n\t\t\tSecurityLevel securityLevel, WorldView view) {\n\n\t\t// Check if there's already an open editor for this entity. If so, just\n\t\t// return that editor.\n\t\tif (openEditors.containsKey(entity)) {\n\t\t\tJEntityEditor existing = openEditors.get(entity);\n\t\t\texisting.requestFocus();\n\t\t\treturn existing;\n\t\t}\n\n\t\t// Build the dialog.\n\t\tJDialog dialog = new JDialog(owner, title, Dialog.ModalityType.MODELESS);\n\t\tJEntityEditor jee = createEntityEditorPane(entity, securityLevel, dialog, view, false);\n\t\t\n\t\t// Create the dialog that contains the editor.\n\t\topenEditors.put(entity, jee);\n\t\tif(jee.getTabCount() > 0) {\n\t\t\tjee.dialog = dialog;\n\t\t\t\n\t\t\t\n\t\t\t// If a dialog is disposed, it should remove the entity from the\n\t\t\t// already-open dialog list, and dispose of any help frames so they're\n\t\t\t// not orphans.\n\t\t\tdialog.addWindowListener(new WindowListenerAdapter() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tprotected void event(WindowEvent e) {\n\t\t\t\t\tif (e.getID() != WindowEvent.WINDOW_CLOSING && e.getID() != WindowEvent.WINDOW_CLOSED)\n\t\t\t\t\t\treturn;\n\t\t\t\t\topenEditors.remove(entity);\n\t\t\t\t\tif (jee._OpenHelpFrame != null)\n\t\t\t\t\t\tjee._OpenHelpFrame.dispose();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tdialog.setSize(600, 500);\n\t\t} else {\n\t\t\tdialog.dispose();\n\t\t}\n\n\t\treturn jee;\n\t}", "public abstract void initDialog();", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "public void switchToEditor() {\r\n\t\teditPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"editPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public Gui() {\n this.baseDir = Utils.getBaseDir(Gui.this);\n try {\n UIManager.setLookAndFeel(prefs.get(\"lookAndFeel\", UIManager.getSystemLookAndFeelClassName()));\n } catch (Exception e) {\n // keep default LAF\n logger.log(Level.WARNING, e.getMessage(), e);\n }\n bundle = ResourceBundle.getBundle(\"net.sourceforge.tessboxeditor.Gui\"); // NOI18N\n initComponents();\n\n boxPages = new ArrayList<TessBoxCollection>();\n\n // DnD support\n new DropTarget(this.jSplitPaneEditor, new FileDropTargetListener(Gui.this, this.jSplitPaneEditor));\n\n this.addWindowListener(\n new WindowAdapter() {\n\n @Override\n public void windowClosing(WindowEvent e) {\n quit();\n }\n\n @Override\n public void windowOpened(WindowEvent e) {\n updateSave(false);\n setExtendedState(prefs.getInt(\"windowState\", Frame.NORMAL));\n populateMRUList();\n }\n });\n\n setSize(\n snap(prefs.getInt(\"frameWidth\", 500), 300, screen.width),\n snap(prefs.getInt(\"frameHeight\", 360), 150, screen.height));\n setLocation(\n snap(\n prefs.getInt(\"frameX\", (screen.width - getWidth()) / 2),\n screen.x, screen.x + screen.width - getWidth()),\n snap(\n prefs.getInt(\"frameY\", screen.y + (screen.height - getHeight()) / 3),\n screen.y, screen.y + screen.height - getHeight()));\n\n KeyEventDispatcher dispatcher = new KeyEventDispatcher() {\n\n @Override\n public boolean dispatchKeyEvent(KeyEvent e) {\n if (e.getID() == KeyEvent.KEY_PRESSED) {\n if (e.getKeyCode() == KeyEvent.VK_F3) {\n jButtonFind.doClick();\n }\n }\n return false;\n }\n };\n DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(dispatcher);\n }", "public EditorialBean() {\r\n editorialDAOImp = new EditorialDAOImp();\r\n editorial = new Editorial();\r\n }", "@Override\r\n\tpublic void setActiveEditor(IEditorPart editor) {\n\t\tsuper.setActiveEditor(editor);\r\n\r\n\t\tif (editor instanceof DiagramEditor) {\r\n\t\t\tgetActionBars().getStatusLineManager().setMessage(\r\n\t\t\t\t\t((DiagramEditor) editor).getPartName());\r\n\t\t}\r\n\t}", "protected JComponent createEditor() {\n return spinner.getEditor(); }", "public PersonInformationDialog() {\n\t\tthis.setModal(true);\n\t\tthis.setTitle(\"Saisie\");\n\t\tthis.setSize(350, 140);\n\t\tthis.setResizable(false);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n\t\tJPanel pan = new JPanel();\n\t\tpan.setBorder(BorderFactory\n\t\t\t\t.createTitledBorder(\"Informations de la personne\"));\n\t\tpan.setLayout(new GridLayout(2, 2));\n\t\tthis.name = new JTextField();\n\t\tJLabel nomLabel = new JLabel(\"Saisir un nom :\");\n\t\tpan.add(nomLabel);\n\t\tpan.add(this.name);\n\t\tthis.firstName = new JTextField();\n\t\tJLabel prenomLabel = new JLabel(\"Saisir un prenom :\");\n\t\tpan.add(prenomLabel);\n\t\tpan.add(this.firstName);\n\n\t\tJPanel control = new JPanel();\n\t\tthis.okButton = new JButton(\"Valider\");\n\t\tthis.okButton.setPreferredSize(new Dimension(90, 30));\n\t\tcontrol.add(this.okButton);\n\t\tthis.okButton.addActionListener(this);\n\n\t\tthis.cancelButton = new JButton(\"Annuler\");\n\t\tthis.cancelButton.setPreferredSize(new Dimension(90, 30));\n\t\tcontrol.add(this.cancelButton);\n\t\tthis.cancelButton.addActionListener(this);\n\n\t\tJSplitPane split = new JSplitPane();\n\t\tsplit.setOrientation(JSplitPane.VERTICAL_SPLIT);\n\t\tsplit.setTopComponent(pan);\n\t\tsplit.setBottomComponent(control);\n\t\tsplit.setDividerSize(0);\n\t\tsplit.setEnabled(false);\n\t\tthis.add(split);\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "Builder addEditor(Person.Builder value);", "protected EditDialog(Shell parentShell, AdapterFactory adapterFactory,\n IItemPropertyDescriptor itemPropertyDescriptor, EObject eObject) {\n super(parentShell);\n this.adapterFactory = adapterFactory;\n this.itemPropertyDescriptor = itemPropertyDescriptor;\n this.eObject = eObject;\n\n }", "public void initializeEditingBox() {\r\n //editing mode elements\r\n editBox.setWidth(200);\r\n editBox.setHeight(380);\r\n editBox.setArcHeight(10);\r\n editBox.setArcWidth(10);\r\n editBox.setFill(Color.WHITESMOKE);\r\n editBox.setStroke(Color.BLACK);\r\n editBox.setOpacity(0.98);\r\n\r\n DiverseUtils.initializeTextField(nameField, editBox, 10, 30, nameText, 0, -5, state.getName());\r\n nameField.textProperty().addListener(nameChangeListener);\r\n nameField.setOnAction(nameChangeEventHandler);\r\n nameField.focusedProperty().addListener(nameFocusChangeListener);\r\n\r\n DiverseUtils.initializeTextField(commentField, editBox, 10, 90, commentText, 0, -5, state.getComment(), state.commentProperty());\r\n\r\n DiverseUtils.initializeTextField(enterField, editBox, 10, 150, enterText, 0, -5, state.getEnter(), state.enterProperty());\r\n\r\n DiverseUtils.initializeTextField(leaveField, editBox, 10, 210, leaveText, 0, -5, state.getLeave(), state.leaveProperty());\r\n\r\n //TODO use the mousewheel for changing elements in comboboxes\r\n typeComboBox.getItems().addAll(\"Normal\", \"Final\", \"Initial\");\r\n typeComboBox.setValue(\"Normal\");\r\n DiverseUtils.initializeComboBox(typeComboBox, editBox, 50, 330, typeText, 0, -5);\r\n typeComboBox.valueProperty().addListener(typeChangeListener);\r\n\r\n colorComboBox.getItems().addAll(\"Blue\", \"Green\", \"Red\", \"Yellow\", \"Orange\", \"Brown\");\r\n colorComboBox.setValue(\"Blue\");\r\n DiverseUtils.initializeComboBox(colorComboBox, editBox, 10, 270, colorText, 0, -5);\r\n colorComboBox.valueProperty().addListener(colorChangeListener);\r\n\r\n sizeComboBox.getItems().addAll(40, 50, 60, 75, 90, 120);\r\n sizeComboBox.setValue((int) state.getSize());\r\n DiverseUtils.initializeComboBox(sizeComboBox, editBox, 120, 270, sizeText, 0, -5);\r\n sizeComboBox.valueProperty().addListener(sizeChangeListener);\r\n\r\n editingPane.getChildren().add(editBox);\r\n editingPane.getChildren().add(nameField);\r\n editingPane.getChildren().add(nameText);\r\n editingPane.getChildren().add(commentField);\r\n editingPane.getChildren().add(commentText);\r\n editingPane.getChildren().add(enterField);\r\n editingPane.getChildren().add(enterText);\r\n editingPane.getChildren().add(leaveField);\r\n editingPane.getChildren().add(leaveText);\r\n editingPane.getChildren().add(colorComboBox);\r\n editingPane.getChildren().add(colorText);\r\n editingPane.getChildren().add(sizeComboBox);\r\n editingPane.getChildren().add(sizeText);\r\n editingPane.getChildren().add(typeComboBox);\r\n editingPane.getChildren().add(typeText);\r\n }", "public void createFieldEditors() {\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SPACES_PER_TAB, \"Spaces per tab (Re-open editor to take effect.)\", getFieldEditorParent(), 2 ) );\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.SECONDS_TO_REEVALUATE, \"Seconds between syntax reevaluation\", getFieldEditorParent(), 3 ) );\n\t\t\n\t\taddField(new IntegerFieldEditor(PreferenceConstants.OUTLINE_SCALAR_MAX_LENGTH, \"Maximum display length of scalar\", getFieldEditorParent(), 4 ) );\n\t\taddField(new BooleanFieldEditor(PreferenceConstants.OUTLINE_SHOW_TAGS, \"Show tags in outline view\", getFieldEditorParent() ) );\n\n addField(new BooleanFieldEditor(PreferenceConstants.SYMFONY_COMPATIBILITY_MODE, \"Symfony compatibility mode\", getFieldEditorParent() ) );\t\t\n\t\n addField(new BooleanFieldEditor(PreferenceConstants.AUTO_EXPAND_OUTLINE, \"Expand outline on open\", getFieldEditorParent() ) );\n \n String[][] validationValues = new String[][] {\n \t\t{\"Error\", PreferenceConstants.SYNTAX_VALIDATION_ERROR}, \n \t\t{\"Warning\", PreferenceConstants.SYNTAX_VALIDATION_WARNING}, \n \t\t{\"Ignore\", PreferenceConstants.SYNTAX_VALIDATION_IGNORE}\n };\n addField(new ComboFieldEditor(PreferenceConstants.VALIDATION, \"Syntax validation severity\", validationValues, getFieldEditorParent()));\n\t\n\t}", "private synchronized void handleShow()\n{\n BaleEditorPane be = for_editor;\n\n if (be == null) return;\t// no longer relevant\n\n the_panel = new RenamePanel();\n\n if (for_editor == null) return;\n\n try {\n int soff = be.getCaretPosition();\n Rectangle r = be.modelToView(soff);\n Window w = null;\n for (Component c = be; c != null; c = c.getParent()) {\n\t if (w == null && c instanceof Window) {\n\t w = (Window) c;\n\t break;\n\t }\n }\n cur_menu = new JDialog(w);\n cur_menu.setUndecorated(true);\n cur_menu.setContentPane(the_panel);\n try {\n\t Point p0 = be.getLocationOnScreen();\n\t cur_menu.setLocation(p0.x + r.x + X_DELTA,p0.y + r.y + r.height + Y_DELTA);\n\t cur_menu.pack();\n\t cur_menu.setVisible(true);\n\t rename_field.grabFocus();\n\t BoardLog.logD(\"BALE\",\"Show rename\");\n }\n catch (IllegalComponentStateException e) {\n\t // Editor no longer on the screen -- ignore\n }\n }\n catch (BadLocationException e) {\n removeContext();\n }\n}", "public ViewSavingAccountJPanel(Person person) {\n initComponents();\n DisplaySavingAccount(person);\n \n }", "public Object open() {\n // Create a new shell object and set the text for the dialog.\n Shell parent = getParent();\n shell = new Shell(parent, SWT.DIALOG_TRIM);\n shell.setText(\"Edit Colormaps\");\n\n // Setup all of the layouts and the controls.\n setup();\n\n // Open the shell to display the dialog.\n shell.open();\n\n // Wait until the shell is disposed.\n Display display = parent.getDisplay();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n\n return null;\n }", "private void initDialog() {\n }", "@Test\n\tpublic void test5_verifyEditor() throws GeneralLeanFtException {\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor Started\");\n\t\t\t\n\t\t\t//Check that the Main window should exist\n\t\t\tassertTrue(mySet.appExistsorNot());\t\t\t\n\n\t\t\t//Toolbar Object\n\t\t\tToolBar toolbar = mySet.OR.MainWindow().ToolBar(); \n\n\t\t\t// Clicking the JEditorPane button displays the Editor test object.\n\t\t\ttoolbar.getButton(\"JEditorPane\").press();\n\n\t\t\t// Create a description for the Editor test object.\n\t\t\tEditor edit = mySet.OR.MainWindow().JEditor();\n\n\t\t\t// Verify that the editor in this AUT is read-only HTML with links.\n\t\t\tassertTrue(edit.isReadOnly());\n\n\t\t\t// Click the link to king.html.\n\t\t\tedit.clickLink(\"king.html\");\n\n\t\t\t// Verify that the correct page loaded by checking the text. \n\t\t\tString expectedTextPrefix = \"Do here most humbly lay this small Present\";\n\t\t\tString text = edit.getText().trim().replaceAll(\"[\\n\\r]\", \"\").replaceAll(Character.toString((char)160), \"\");\n\n\t\t\tSystem.out.println(\"Text fetched - \" + text); \n\n\t\t\tassertTrue(text.startsWith(expectedTextPrefix));\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unexpected Error Occurred. Message = \" + e.getMessage());\n\t\t\tassertTrue(false);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tSystem.out.println(\"Test 5 - Verify Editor finished\");\t\n\t\t}\n\t}", "private static JEditorPane editorPane()\n {\n try\n {\n JEditorPane editor = new JEditorPane(); //this will be the editor returned\n editor.setPage(Resources.getResource(filename)); //gives the editor the URL of the HTML file\n editor.setEditable(false); //prevents the about page from being edited\n return editor; //return the editor which is now displaying the HTML file\n } catch(Exception e){\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, \"ERROR: could not access about.HTML file\");\n return null; //if the editor could not be built\n }\n }", "public AuthorDialog(javax.swing.JFrame parent, boolean modal) {\r\n super(parent, modal);\r\n authorDialog = this;\r\n initComponents();\r\n }", "public Edit() {\n initComponents();\n }", "public TableEditorWizard(Table table) {\t\n\t\tcreateDialog(table);\n\t}", "protected abstract IEditorPreferences getPreferences();", "Builder addEditor(String value);", "public edit() {\n initComponents();\n }", "private void init() {\n\t\tClassLoader loader = LegalDialog.class.getClassLoader();\n\t\tthisURL = loader.getResource(\"disclaimer.htm\");\n\t\ttry {\n\t\t\tthisEditor = new JEditorPane( thisURL );\n\t\t\tthisEditor.setEditable( false );\n\t\t\t// needed to open browser via clicking on a link\n\t\t\tthisEditor.addHyperlinkListener(new HyperlinkListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void hyperlinkUpdate(HyperlinkEvent e) {\n\t\t\t\t\tURL url = e.getURL();\n\t\t\t\t\tif (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (url.sameFile(thisURL))\n\t\t\t\t\t\t\t\tthisEditor.setPage(url);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tDesktop.getDesktop().browse(url.toURI());\n\t\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\t} catch (URISyntaxException ex) {\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (e.getEventType() == HyperlinkEvent.EventType.ENTERED) {\n\t\t\t\t\t\tif (url.sameFile(thisURL))\n\t\t\t\t\t\t\tthisEditor.setToolTipText(url.getRef());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthisEditor.setToolTipText(url.toExternalForm());\n\t\t\t\t\t} else if (e.getEventType() == HyperlinkEvent.EventType.EXITED) {\n\t\t\t\t\t\tthisEditor.setToolTipText(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tjScrollPane.setViewportView(thisEditor); // Generated\n\t\t} catch (IOException ex) {ex.printStackTrace();};\n\t}", "@Override\n \tpublic void createFieldEditors() {\n\t\t\n\t\t\n\t\tGraphics3DRegistry.resetDescriptors();\n\t\tList<Graphics3DDescriptor> descr = Graphics3DRegistry.getRenderersForType(Graphics3DType.SCREEN);\n\t\tString[][] renderers = new String[descr.size()][2];\n\t\tfor (int i=0; i<descr.size(); i++) {\n\t\t\trenderers[i][0] = descr.get(i).getName();\n\t\t\trenderers[i][1] = descr.get(i).getRendererID();\n\t\t}\n\t\t\n\t\tComboFieldEditor rendererCombo = new ComboFieldEditor(PrefNames.DEFAULT_SCREEN_RENDERER, \"Default screen renderer\", \n\t\t\trenderers, getFieldEditorParent());\n\t\taddField(rendererCombo);\n\t\t\n\t\t// TODO enable\n\t\trendererCombo.setEnabled(false, getFieldEditorParent());\n\t\t\n \n \t\tString[][] cameraTypes =\n \t\t\tnew String[][] {\n \t\t\t\t{ \"Default first person camera\",\n \t\t\t\t\tFirstPersonCamera.class.getName() },\n \t\t\t\t{ \"Restricted first person camera\",\n \t\t\t\t\tRestrictedFirstPersonCamera.class.getName() } };\n \n \t\taddField(new RadioGroupFieldEditor(PrefNames.LWS_CAMERA_TYPE,\n \t\t\t\"Camera type:\", 1, cameraTypes, getFieldEditorParent()));\n \n \t\taddField(new ColorFieldEditor(PrefNames.LWS_BACKGROUND,\n \t\t\t\"Background color\", getFieldEditorParent()));\n \n \t\taddField(new BooleanFieldEditor(PrefNames.LWS_DRAW_AXES, \"Draw axes\",\n \t\t\tgetFieldEditorParent()));\n \n \t\taddField(new BooleanFieldEditor(PrefNames.LWS_DEBUG, \"Debug\",\n \t\t\tgetFieldEditorParent()));\n \n \t\tString[][] fontOptions =\n \t\t\tnew String[][] {\n \t\t\t\tnew String[] { \"Editor setting\", PrefNames.FONT_AA_EDITOR },\n \t\t\t\tnew String[] { \"Always on (ignore editor setting)\",\n \t\t\t\t\tPrefNames.FONT_AA_ON },\n \t\t\t\tnew String[] { \"Always off (ignore editor setting)\",\n \t\t\t\t\tPrefNames.FONT_AA_OFF } };\n \t\taddField(new ComboFieldEditor(PrefNames.LWS_FONT_AA,\n \t\t\t\"Font antialiasing\", fontOptions, getFieldEditorParent()));\n \t}", "public void prepareEditor(){\n System.out.println(\"Prepare editor to be used !\");\r\n ((EditorScene)map.getScene()).initScene(20,20,map);\r\n ((EditorScene)map.getScene()).setController(this);\r\n builder.registerBasicEffect();\r\n ((EditorScene)map.getScene()).initListView(builder.getEffects(),selectEffects);\r\n\r\n\r\n\r\n }", "private void loadEditWindow(DonorReceiver account, AnchorPane pane, Stage stage)\n throws IOException {\n\n // Set the selected account for the profile pane and confirm child.\n EditPaneController.setAccount(account);\n EditPaneController.setIsChild(true);\n\n // Create new pane.\n FXMLLoader loader = new FXMLLoader();\n AnchorPane editPane = loader.load(getClass().getResourceAsStream(PageNav.EDIT));\n // Create new scene.\n Scene editScene = new Scene(editPane);\n TabPane tabPane = (TabPane) editPane.lookup(\"#mainTabPane\");\n TabPane profileViewTabbedPane = (TabPane) pane.lookup(\"#profileViewTabbedPane\");\n int tabIndex = profileViewTabbedPane.getSelectionModel().getSelectedIndex();\n tabIndex += 5;\n tabPane.getSelectionModel().clearAndSelect(tabIndex);\n // Retrieve current stage and set scene.\n Stage current = (Stage) stage.getScene().getWindow();\n current.setScene(editScene);\n\n }", "public test(java.awt.Window parent, boolean modal, PartyDaoInterface dao) {\n super(parent);\n super.setModal(modal);\n\n initComponents();\n this.dao = dao;\n// tagText.setEditable(true);\n// txtCategory.setModel(categoryHolder);\n// validation.addTypeFormatter(txtID, \"#0\", Integer.class);\n\n partyName.setName(\"txtID\");\n partyWebsite.setName(\"txtName\");\n saveButton.setName(\"saveButton\");\n CancelButton.setName(\"CancelButton\");\n }", "void onNewTextSet(CodeEditor editor);", "public void createFieldEditors() {\n\t\tString[][] namespaceComboData = getSynapseNamespaceComboData();\n\t\taddField(new ComboFieldEditor(PreferenceConstants.PREF_NAMESPACE,\n\t\t \"Default namespace\",namespaceComboData,\n\t\t getFieldEditorParent()));\n\t}", "@Override\n protected void createFieldEditors() {\n /* ------------------------ CLI setup ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsCLIFieldEditors();\n\n /* -------------------------------------------------------------- */\n /* ------------------------ Log action ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsWaitForLogsInSeconds(getFieldEditorParent());\n /* -------------------------------------------------------------- */\n /* ------------------------ ERROR LEVEL ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsLinterErrorLevelComboBox(getFieldEditorParent());\n\n /* -------------------------------------------------------------- */\n /* ------------------------ APPEARANCE -------------------------- */\n /* -------------------------------------------------------------- */\n GridData appearanceLayoutData = new GridData();\n appearanceLayoutData.horizontalAlignment = GridData.FILL;\n appearanceLayoutData.verticalAlignment = GridData.BEGINNING;\n appearanceLayoutData.grabExcessHorizontalSpace = true;\n appearanceLayoutData.grabExcessVerticalSpace = false;\n appearanceLayoutData.verticalSpan = 2;\n appearanceLayoutData.horizontalSpan = 3;\n\n Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.numColumns = 2;\n appearanceComposite.setLayout(layout);\n appearanceComposite.setLayoutData(appearanceLayoutData);\n\n createOtherFieldEditors(appearanceComposite);\n\n createBracketsFieldEditors(appearanceComposite);\n }", "public ScriptEditor() { \n }", "@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }", "public void createPartControl(Composite parent)\n {\n if (Workbench.getInstance().isClosing()) return;\n \n super.createPartControl(parent);\n \n installProjectionSupport();\n installBracketInserter();\n installCaretMoveListener();\n installModuleCompletionHelper();\n installIdleTimer();\n installSyntaxValidationThread();\n installFoldReconciler();\n installTasksReconciler();\n installAnnotationListener();\n \n source = new SourceFile(\n PerlEditorPlugin.getDefault().getLog(),\n getViewer().getDocument());\n \n reconcile();\n }" ]
[ "0.69010323", "0.6743957", "0.6616054", "0.6532404", "0.6506336", "0.63762486", "0.63578814", "0.6330309", "0.62972885", "0.6296153", "0.62680304", "0.6254306", "0.6232905", "0.6220628", "0.62199193", "0.62039584", "0.6202664", "0.61862266", "0.61439943", "0.61229527", "0.612044", "0.6107341", "0.6080153", "0.606995", "0.6052455", "0.6038935", "0.6028141", "0.6021543", "0.6010322", "0.599503", "0.5988776", "0.59782946", "0.595582", "0.59505194", "0.59502226", "0.5945003", "0.5941034", "0.59306544", "0.5925336", "0.59223413", "0.5919044", "0.5883592", "0.5867024", "0.5862076", "0.5853704", "0.5852676", "0.5842867", "0.5834654", "0.5814501", "0.581397", "0.5809203", "0.5806069", "0.57998335", "0.5792628", "0.57776845", "0.5769342", "0.5747559", "0.574611", "0.57419217", "0.5741631", "0.5739156", "0.5719696", "0.5718684", "0.56911504", "0.5670058", "0.5658495", "0.5658143", "0.56573594", "0.5641753", "0.564083", "0.5632647", "0.5623986", "0.5615256", "0.56110835", "0.56108505", "0.56105703", "0.56070405", "0.55979884", "0.55956185", "0.55814296", "0.5571276", "0.55704427", "0.5570442", "0.55604833", "0.55508137", "0.55489606", "0.5547581", "0.55353326", "0.55324477", "0.5529058", "0.5526081", "0.5525839", "0.5520708", "0.5519624", "0.5517723", "0.551448", "0.5512933", "0.5509897", "0.5508375", "0.55057997", "0.55045044" ]
0.0
-1
Setter for the field order.
public void setOrder(int order) { this.order = order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFieldOrder(java.lang.Integer fieldOrder) {\n this.fieldOrder = fieldOrder;\n }", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "public void setOrder(int order) {\n mOrder = order;\n }", "public void setOrder(int value) {\n this.order = value;\n }", "void setOrder(Order order);", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public java.lang.Integer getFieldOrder() {\n return fieldOrder;\n }", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "public void setOrder(Order order){\n this.order = order;\n }", "public void setOrder(final Integer order) {\n this.order = order;\n }", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "public void setOrder(Order order) {\n this.order = order;\n notifyChanged();\n }", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "public void setOrder(String Order) {\n this.Order = Order;\n }", "public void setNewFieldOrder(List<Field> newOrder)\n\t{\n\t\tif (newOrder.size()!=fieldList.size())\n\t\t\tthrow new IllegalArgumentException(\"Field lists have different sizes\");\n\t\tfor (Field f: newOrder)\n\t\t\tif (!fieldList.contains(f))\n\t\t\t\tthrow new IllegalArgumentException(\"New field list has unexpected field: \"+f);\n\t\tfieldList=newOrder;\n\t}", "public int getOrder() {\n return mOrder;\n }", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "private void setOrderField() \n\t{\n\t\tString size = currentOrder.get(\"size\");\n\t\tString temperature = currentOrder.get(\"drinkTemperature\");\n\t\tString drinkName = currentOrder.get(\"name\");\n\t\t\n\t\torderField.setText(\"Order Status: \" + size + \" \" + temperature + \" \" + drinkName);\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public int getOrder() {\n\t\treturn order;\n\t}", "public String getOrder() {\n return this.Order;\n }", "@Override\r\n\tpublic void setOrder(int order){\r\n\t\tthis.head.setOrder(order);\r\n\t}", "public void incrementOrder() {\n mOrder++;\n }", "public void setOrder(int o) throws SystemException {\n group.setDisplayItemOrder(o);\n ModelInputGroupLocalServiceUtil.updateModelInputGroup(group);\n }", "public Integer getOrder() {\n\t\treturn order;\n\t}", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder= new ArrayList<String>();\n FieldOrder.add(\"dsapiVersionNo\");\n FieldOrder.add(\"sessionId\");\n FieldOrder.add(\"valueMark\");\n FieldOrder.add(\"fieldMark\");\n return FieldOrder;\n }", "public final void setOrder(java.lang.Integer order)\r\n\t{\r\n\t\tsetOrder(getContext(), order);\r\n\t}", "public int getOrder() {\n \treturn ord;\n }", "public void setnOrder(Integer nOrder) {\n this.nOrder = nOrder;\n }", "void setOrderType(OrderType inOrderType);", "public void setPositionOrder(Integer positionOrder) {\n this.positionOrder = positionOrder;\n }", "@Override\n\tprotected List<String> getFieldOrder() {\n\t\treturn Arrays.asList(\n\t\t\t\"nType\", \n\t\t\t\"szUnitID\", \n\t\t\t\"szCurID\", \n\t\t\t\"nValues\", \n\t\t\t\"nCount\", \n\t\t\t\"nStatus\" \n\t\t);\n\t}", "public final Integer getOrder() {\n return this.order;\n }", "public void setOrdered(final boolean argOrdered) {\n mOrdered = argOrdered;\n }", "@Override\r\n\tpublic int getOrder() {\n\t\treturn 0;\r\n\t}", "public int getOrder() {\n\t\treturn 0;\n\t}", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder=new ArrayList<>();\n FieldOrder.add(\"defaultValue\");\n FieldOrder.add(\"helpText\");\n FieldOrder.add(\"paramPrompt\");\n FieldOrder.add(\"paramType\");\n FieldOrder.add(\"desDefaultValue\");\n FieldOrder.add(\"listValues\");\n FieldOrder.add(\"desListValues\");\n FieldOrder.add(\"promptAtRun\");\n return FieldOrder;\n }", "@Override\n\tpublic void setPositionOrder(int positionOrder) {\n\t\t_dmGTShipPosition.setPositionOrder(positionOrder);\n\t}", "@Override\n\tpublic int getOrder() {\n\t\treturn 1;\n\t}", "protected void setTableOrder(int num)\n\t\t{\n\t\t\tOrder = num ;\n\t\t}", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder=new ArrayList<>();\n FieldOrder.add(\"infoType\");\n FieldOrder.add(\"info\");\n return FieldOrder;\n }", "public void setOrder(final Order value)\n\t{\n\t\tsetOrder( getSession().getSessionContext(), value );\n\t}", "@Override\n public int getOrder() {\n return 4;\n }", "public static void changeOrder(String order){\n switch (order) {\n case \"delais\":\n ordered = \"delais DESC\";\n break;\n case \"date\":\n ordered = \"date_creation DESC\";\n break;\n case \"nom\":\n ordered = \"nom_annonce\";\n break;\n }\n }", "@Override\n public int getOrder() {\n return 0;\n }", "public void reorder(String field){\n\t\tsetOrderFields(new String[] {\n\t\t\tfield\n\t\t});\n\t\tdj.launch(20);\n\t}", "public SortObj(String field, int order) {\n super();\n this.field = field;\n this.order = order;\n }", "public void setSortOrder(int value) {\r\n this.sortOrder = value;\r\n }", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setDateOrder(DateOrder dateOrder)\r\n {\r\n m_dateOrder = dateOrder;\r\n }", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder= new ArrayList<String>();\n FieldOrder.add(\"hProject\");\n FieldOrder.add(\"serverJobHandle\");\n FieldOrder.add(\"logData\");\n FieldOrder.add(\"logDataLen\");\n FieldOrder.add(\"logDataPsn\");\n return FieldOrder;\n }", "public void setSortOrder(String sortOrder);", "public void setOrderNumber(int value) {\n this.orderNumber = value;\n }", "public Integer getPositionOrder() {\n return positionOrder;\n }", "public void setOrder(int order) {\n this.order = order;\n paint();\n }", "public static final Comparator fieldOrder()\n {\n return new Comparator()\n {\n public int compare(Object o1, Object o2)\n {\n int v1 = ((ReportField) o1).getPk().intValue();\n int v2 = ((ReportField) o2).getPk().intValue();\n return v1 - v2;\n }\n };\n }", "@Override\n protected List<String> getFieldOrder() {\n ArrayList<String> FieldOrder=new ArrayList<>();\n FieldOrder.add(\"eventId\");\n FieldOrder.add(\"timestamp\");\n FieldOrder.add(\"type\");\n FieldOrder.add(\"username\");\n FieldOrder.add(\"fullMessage\");\n return FieldOrder;\n }", "public Integer getnOrder() {\n return nOrder;\n }", "@Override\n\tpublic void UpdateOrder(Order order) {\n\t\t\n\t}", "public final void setOrder(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer order)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Order.toString(), order);\r\n\t}", "public void setOrder(final SessionContext ctx, final Order value)\n\t{\n\t\tsetProperty(ctx, ORDER,value);\n\t}", "public void setSortOrder(java.math.BigInteger sortOrder)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SORTORDER$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SORTORDER$0);\n }\n target.setBigIntegerValue(sortOrder);\n }\n }", "public Integer getOrder();", "public void setOrderIndex(Integer orderIndex) {\n this.orderIndex = orderIndex;\n }", "@Override\r\n\tprotected List<String> getFieldOrder() {\r\n\t\treturn Arrays.asList(\"n\", \"nalloc\", \"refcount\", \"x\", \"y\");\r\n\t}", "@Override\n\tpublic String getOrder() {\n\t\treturn \"zjlxdm,asc\";\n\t}", "public void setOrderNo(String orderNo)\n\t{\n\t\tsetColumn(orderNo, OFF_ORDER_NO, LEN_ORDER_NO) ;\n\t}", "default int getOrder() {\n\treturn 0;\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public ImagingStudy setOrder(java.util.List<ResourceReferenceDt> theValue) {\n\t\tmyOrder = theValue;\n\t\treturn this;\n\t}", "public Order getOrder() {\n return order;\n }", "public int getOrder();", "public Order getOrder() {\n return this.order;\n }", "public void changeSortOrder();", "public void setViewOrder(int viewOrder) {\n this.viewOrder = viewOrder;\n }", "public StatementBuilder setOrder(OrderSql orderSql) {\n this.orderSql = orderSql;\n return this;\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 }", "@DISPID(14)\n\t// = 0xe. The runtime will prefer the VTID if present\n\t@VTID(26)\n\tvoid order(int pVal);", "public Builder setOrderId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00002000;\n orderId_ = value;\n onChanged();\n return this;\n }", "public final native void setOrderBy(String orderBy) /*-{\n this.setOrderBy(orderBy);\n }-*/;", "public void setSortOrder(Integer sortOrder) {\n this.sortOrder = sortOrder;\n }", "public List<Order> getOrder() {\n return order;\n }", "private Order(String value){\r\n\t\t\tthis.value = value;\r\n\t\t}", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "@Override\n\tpublic int getOrder() {\n\t\treturn CoreEvent.DEFAULT_ORDER - 1;\n\t}", "public final void order(ByteOrder byteOrder) {\n this.data.order(byteOrder);\n }", "public void setOrderNo (Long orderNo) {\r\n\t\tthis.orderNo = orderNo;\r\n\t}", "public void setOrder(String column, int num, boolean bool)\n\t{\n\t\t//#CM708944\n\t\t// Disregard it when the key which does not exist in Effective is specified. \n\t\tKey Eky = getKey(column) ;\n\t\tif (Eky == null)\n\t\t\treturn ;\n\n\t\tEky.setTableOrder(num) ;\n\t\tEky.setTableDesc(bool) ;\n\t\tsetSortKey(Eky) ;\n\t}", "public String getDefaultOrder() {\n return defaultOrder;\n }", "public Integer getOrderIndex() {\n return orderIndex;\n }", "public String removeOrderByFieldValue() {\n String f = fieldToSort;\n fieldToSort = null;\n return f;\n }" ]
[ "0.78692526", "0.73496455", "0.73266643", "0.730296", "0.7165419", "0.71167785", "0.7030805", "0.7030805", "0.6955363", "0.691408", "0.6876311", "0.6867472", "0.67966616", "0.6734956", "0.66894513", "0.660359", "0.6591337", "0.65901476", "0.6586484", "0.6575569", "0.6575569", "0.65707815", "0.65422285", "0.6537981", "0.65239805", "0.65239805", "0.6518349", "0.6494497", "0.64641005", "0.6456221", "0.64481634", "0.6432461", "0.64260596", "0.6418709", "0.6417031", "0.63837117", "0.629649", "0.6281739", "0.6275811", "0.6273633", "0.62660116", "0.62247103", "0.6199504", "0.6198511", "0.61875445", "0.6167057", "0.6160903", "0.612196", "0.6114737", "0.6087794", "0.6056044", "0.60457087", "0.6044325", "0.59992963", "0.5990385", "0.5966673", "0.59620506", "0.5935403", "0.59264797", "0.5924103", "0.5923875", "0.59207565", "0.59205586", "0.5919376", "0.5911953", "0.58899015", "0.58760566", "0.58737385", "0.5867804", "0.58564514", "0.58498675", "0.5820366", "0.58160037", "0.5792725", "0.57848376", "0.57838047", "0.57708514", "0.5763885", "0.57587564", "0.57477343", "0.5713649", "0.57098544", "0.5686101", "0.56654775", "0.565219", "0.56452876", "0.56321585", "0.56318456", "0.56306684", "0.56004864", "0.5597614", "0.55973244", "0.55947536", "0.55929714", "0.5589544", "0.5579515", "0.5564385", "0.55627304", "0.55357814" ]
0.7129695
6
Newly added method to fetch root area by name
public RootArea getAssessmentDataByRootArea(String name) { RootArea rootAreas = assessmentDao.getRootAreaByName(name); return updateWithCategories(rootAreas); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRoot();", "java.lang.String getRoot();", "String getRootAlias();", "public SafetyNetArea findAreaByName(String typeId, String name) {\n try {\n return em.createNamedQuery(\"SafetyNetArea.findByName\", SafetyNetArea.class)\n .setParameter(\"typeId\", typeId)\n .setParameter(\"name\", name)\n .getSingleResult();\n } catch (Exception e) {\n return null;\n }\n }", "List<AreaMaster> findByName(String areaName);", "AreaMaster findById(long areaId) throws NoSuchAreaException;", "public String describeRoot();", "public I_LogicalAddress getRoot() {\n return root;\n }", "@Override\n\tpublic Goodsarea findAreaByName(String goodsName) {\n\t\treturn null;\n\t}", "public String getAreaName()\n {\n return this.areaName;\n }", "@Override\n\tpublic java.lang.String getAreaName() {\n\t\treturn _locMstLocation.getAreaName();\n\t}", "private NodeRef getompanyHomeFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n return nodeLocatorService.getNode(\"companyhome\", null, null);\n }", "@Override\n @CheckForNull\n public RootElementConfigurator lookupRootElement(String name) {\n return registry.lookupRootElement(name);\n }", "protected String getRootName() {\r\n\t\treturn ROOT_NAME;\r\n\t}", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public String getRoot() {\n\t\treturn null;\n\t}", "String getRootId();", "String getRootId();", "public Region getRoot() {\r\n return root;\r\n }", "public Rectangle getLocationRectangle(String name)throws UnknownLocationException {\n\t\tif(rootEndpointSet.contains(name)) {\n\t\t\treturn root.getRectangle();\n\t\t}\n\t\telse if(subEndpointTable.containsKey(name)) {\n\t\t\treturn ((DeviceMover)\n\t\t\t\t(subEndpointTable.get(name))).getRectangle();\n\t\t}\n\t\telse {\n\t\t\tthrow new UnknownLocationException(\"the location '\" + name +\n\t\t\t\t\"' does not exist.\");\n\t\t}\t\n\t}", "String rootPath();", "BorderPane getRoot();", "public String getRootName() {\n\t\treturn rootName;\n\t}", "protected VcsRoot getRoot(String branchName) throws IOException {\n return getRoot(branchName, false);\n }", "private HtmlElement getRoot()\n\t{\n\t\treturn getBaseRootElement( ROOT_BY );\n\t}", "public abstract String getArea();", "DiscDirectoryInfo getRoot();", "public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}", "public ProgramModule getRootModule(String treeName);", "public StorageUnit getRoot();", "ILitePackCollection getRoot();", "Path getRootPath();", "public Pane getRoot() {\n \treturn _root;\n }", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public String getRoot() {\n return root;\n }", "protected abstract Widget getRootWidget();", "MenuBar getRootMenuBar();", "private NodeRef getCabinetFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n List<String> pathElements = new ArrayList<String>();\n pathElements.add(TradeMarkModel.CABINET_FOLDER_NAME);\n NodeRef nr = null;\n try {\n nr = fileFolderService.resolveNamePath(repositoryHelper.getCompanyHome(), pathElements).getNodeRef();\n } catch (FileNotFoundException e) {\n if(LOG.isInfoEnabled()){\n LOG.info(e.getMessage(), e);\n } \n LOG.error(e.getMessage(), e);\n }\n return nr;\n }", "abstract void findArea();", "abstract void findArea();", "public File getWorldRegionFolder(String worldName);", "public native int kbAreaGetBorderAreaID(int areaID, long index);", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "private TreeObject find(String name, int type) {\n\t return widgetRoots[type - 1].find(name);\n\t}", "public Object getRoot(){\r\n\t\treturn _root;\r\n\t}", "private void mapAreaOne()\n\n {\n\n Area area = areaIDMap.get(Constants.FIRST_AREA_ID);\n\n area.areaMap.put(Constants.North, areaIDMap.get(Constants.SECOND_AREA_ID));\n\n area.areaMap.put(Constants.South, areaIDMap.get(Constants.FIFTH_AREA_ID));\n\n area.areaMap.put(Constants.East, areaIDMap.get(Constants.FOURTH_AREA_ID));\n\n area.areaMap.put(Constants.West, areaIDMap.get(Constants.SIXTH_AREA_ID));\n\n area.paths = Constants.NorthSouthEastAndWest;\n\n }", "public MappingRoot getRoot() { return _root; }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public Node getNode(String root, String name){\n\t\tNodeList userData = returnChildNodes(root, name);\n\t\t\n\t\tfor(int i = 0; i < userData.getLength(); i++){ //cycle through the family and find the node that equals to the node parameter\n\t\t\tNode node = userData.item(i);\n\t\t\tif(name.equals(node.getNodeName())){\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n public String getRootURI() {\r\n if (rootUri == null) {\r\n final StringBuilder buffer = new StringBuilder();\r\n appendRootUri(buffer, true);\r\n buffer.append(SEPARATOR_CHAR);\r\n rootUri = buffer.toString().intern();\r\n }\r\n return rootUri;\r\n }", "public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}", "public Object getRoot() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<Areas> queryAllHArea() {\n\t\treturn adi.queryAllHArea();\r\n\t}", "public native vector kbAreaGetCenter(int areaID);", "public @NotNull Category findRootCategory() throws BazaarException;", "public AreaDirectory getAreaDirectory() {\r\n return areaDirectory;\r\n }", "public String getFamilyRoot(String familyId);", "public Container findContainerFor(String name, Container initialScope)\r\n {\r\n if (initialScope == null)\r\n throw new IllegalArgumentException(\"Initial container scope cannot be null\");\r\n\r\n if(initialScope.isRoot())\r\n return initialScope;\r\n\r\n Container c = initialScope;\r\n while (c != null)\r\n {\r\n Map<String, String> p = getPreferences(c, false);\r\n if (p != null)\r\n {\r\n if (p.containsKey(name))\r\n return c;\r\n }\r\n if (c.isRoot())\r\n break;\r\n c = c.getParent();\r\n }\r\n return null;\r\n }", "public Object getRootItem();", "public abstract Entry getRoot() throws IOException;", "public Object\tgetRoot() {\n \treturn root;\n }", "public File getWorldFolder(String worldName);", "public Area getBankArea(String c){\n for (AreaInfo a : AreaInfo.values()){\n if(a.getLocation().equalsIgnoreCase(c)){\n return a.getBankArea();\n }\n }\n return null;\n }", "public void testGetContainerForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertEquals(\"1.0\", root, root.getContainerForLocation(root.getLocation()));\n \n \t}", "W getRootElement();", "protected IsamIndexNode getRoot() {\n\t\treturn root;\n\t}", "private AbstractArea getAbstractAreaByActivitiID(String strID)\r\n\t{\r\n\t\tfor(AbstractArea abstractAres : getElements())\r\n\t\t{\r\n\t\t\tif (abstractAres.getActivityId().equals(strID))\r\n\t\t\t{\r\n\t\t\t\treturn abstractAres;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public String getNombreArea() { return (this.nombreArea == null) ? \"\" : this.nombreArea; }", "public abstract int getRootView();", "@GetMapping(value = \"/area/{bid}\")\n JsonResp<AreaVO> getArea(@PathVariable int bid,\n @RequestParam(value = \"parent\", defaultValue = \"false\") boolean parent,\n @RequestParam(value = \"children\", defaultValue = \"false\") boolean children);", "private static OspfArea areaDetails(JsonNode areaNode) {\n OspfArea area = new OspfAreaImpl();\n String areaId = areaNode.path(AREAID).asText();\n if (isValidIpAddress(areaId)) {\n area.setAreaId(Ip4Address.valueOf(areaId));\n } else {\n log.debug(\"Wrong areaId: {}\", areaId);\n return null;\n }\n String routerId = areaNode.path(ROUTERID).asText();\n if (isValidIpAddress(routerId)) {\n area.setRouterId(Ip4Address.valueOf(routerId));\n } else {\n log.debug(\"Wrong routerId: {}\", routerId);\n return null;\n }\n String routingCapability = areaNode.path(EXTERNALROUTINGCAPABILITY).asText();\n if (isBoolean(routingCapability)) {\n area.setExternalRoutingCapability(Boolean.valueOf(routingCapability));\n } else {\n log.debug(\"Wrong routingCapability: {}\", routingCapability);\n return null;\n }\n String isOpaqueEnabled = areaNode.path(ISOPAQUE).asText();\n if (isBoolean(isOpaqueEnabled)) {\n area.setIsOpaqueEnabled(Boolean.valueOf(isOpaqueEnabled));\n } else {\n log.debug(\"Wrong isOpaqueEnabled: {}\", isOpaqueEnabled);\n return null;\n }\n area.setOptions(OspfUtil.HELLO_PACKET_OPTIONS);\n\n return area;\n }", "public String getSubAdminArea(Context context, double latitude, double longitude, int maxAddresses) {\n List<Address> addresses = getGeocoderAddress(context, latitude, longitude, maxAddresses);\n\n if (addresses != null && addresses.size() > 0) {\n Address address = addresses.get(0);\n String locality = address.getSubAdminArea();\n\n return locality;\n }\n else {\n return null;\n }\n }", "public WAVLNode getRoot() // return the root of the tree\r\n {\r\n return root;\r\n }", "public abstract int getArea();", "public void setRoot(String root);", "public native int kbGetTownAreaID();", "public abstract MetricTreeNode getRoot();", "public ProgramModule getRootModule(long treeID);", "CyRootNetwork getRootNetwork();", "public HBox getMyRoot(){\n return myRoot;\n }", "RootNode getRootNode();", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder getAreaBuilder(\n int index) {\n return getAreaFieldBuilder().getBuilder(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder getAreaBuilder(\n int index) {\n return getAreaFieldBuilder().getBuilder(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder getAreaBuilder(\n int index) {\n return getAreaFieldBuilder().getBuilder(index);\n }", "@Override\r\n \tpublic File getLoadPath(String subArea) {\n \t\treturn null;\r\n \t}", "public DefaultMutableTreeNode getRoot()\n {\n return root;\n }", "Preferences userRoot();", "public String getAdminArea(Context context, double latitude, double longitude, int maxAddresses) {\n List<Address> addresses = getGeocoderAddress(context, latitude, longitude, maxAddresses);\n\n if (addresses != null && addresses.size() > 0) {\n Address address = addresses.get(0);\n String locality = address.getAdminArea();\n\n return locality;\n }\n else {\n return null;\n }\n }", "public String getLgcsAreaName() {\n return lgcsAreaName;\n }", "public BorderPane getRoot() {\n\t\treturn _root;\n\t}", "public BorderPane getRoot() {\n\t\treturn _root;\n\t}", "void getCurrentCourseLocalPathRoot(String phoneGapCallback, GetCourseLocalPathRootCompleted callback);", "public String[] getRoots() {\n return roots;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "@Override\r\n \tpublic File getScratchArea(String subArea) {\n \t\treturn null;\r\n \t}", "private void fetchArea() {\n \t\t// Fetch the isNew.\n \t\tIntent i = this.getIntent();\n \t\tthis.isNew = i.getBooleanExtra( EXTRAS_AREA_IS_NEW, true );\n \n \t\t// Fetch ID.\n \t\tint id = i.getIntExtra( EXTRAS_AREA_ID, -1 );\n \t\tif ( id == -1 ) {\n \t\t\tToast.makeText( this, \"No area ID provided, finishing!\", Toast.LENGTH_LONG ).show();\n \t\t\tthis.finish();\n \t\t}\n \n \t\t// Get the set from application.\n \t\tthis.set = SFApplication.get().getGPSSet();\n \n \t\t// For some weird reason, NullPointerException will happen if we don't do this.\n \t\tthis.set.setMessageBus( SFApplication.get().getBus() );\n \n \t\t// Find area in set.\n \t\tthis.area = this.set.getById( id );\n \n \t\tLog.d( TAG, this.area.toString() );\n \n\t\tToast.makeText( this, \"The area ID provided did not exist in set.\", Toast.LENGTH_LONG ).show();\n\t\tthis.finish();\n \t}" ]
[ "0.63618", "0.60349375", "0.5970584", "0.5941243", "0.5884879", "0.58635926", "0.58226377", "0.5673913", "0.5663355", "0.56374836", "0.56320167", "0.5584675", "0.5579623", "0.5578262", "0.55682266", "0.55682266", "0.5566689", "0.554884", "0.554884", "0.55445516", "0.5524633", "0.55129904", "0.5505126", "0.54866594", "0.54845434", "0.5463908", "0.54425615", "0.5416537", "0.53934026", "0.5336191", "0.5332158", "0.53225946", "0.53043926", "0.5287164", "0.52869374", "0.528323", "0.528074", "0.5266576", "0.52511674", "0.5249547", "0.5249547", "0.5239497", "0.51744354", "0.5161501", "0.5161501", "0.51574147", "0.51365036", "0.5126602", "0.5122523", "0.51207876", "0.51207876", "0.51207876", "0.5105549", "0.5097069", "0.508774", "0.5083632", "0.5072905", "0.5072494", "0.5068689", "0.5058573", "0.50539625", "0.5044156", "0.50405765", "0.50330734", "0.50304514", "0.5020415", "0.5018804", "0.5012647", "0.5011956", "0.5004527", "0.5002011", "0.4998631", "0.49883962", "0.49827743", "0.49763766", "0.49728248", "0.49711832", "0.49700832", "0.49651754", "0.49606135", "0.49496135", "0.49396595", "0.4936066", "0.49154538", "0.49153915", "0.49139312", "0.49139312", "0.49139312", "0.4911168", "0.48955613", "0.48911464", "0.48903808", "0.48677987", "0.48655754", "0.48655754", "0.4864952", "0.4859253", "0.48566994", "0.4853428", "0.4849825" ]
0.6554062
0
fetch testId for a assessment
public Project saveAssessmentData(ResponseAssessment response) { long testId = assessmentDao.getTestId(response.getProjectId()); // check whether the assessment of that project has been started, if // testId=0 start test for that project if (testId == 0) { assessmentDao.beginAssessment(response.getProjectId()); testId = assessmentDao.getTestId(response.getProjectId()); } // Delete previous records of that assessment deleteAssessmentData(testId); // Saving process begins per subcategory wise for (SubCatAssessment subcat : response.getSubCat()) { // saving user comments of a subCategory for a respective assessment assessmentDao.saveComments(testId, subcat.getId(), subcat.getComments()); // saving maturity_level of a subCategory for a respective // assessment assessmentDao.saveMaturityLevel(testId, subcat.getId(), subcat.getMaturityLevel()); // saving the response details per subCategoty wise, for (Long ques : subcat.getCheckedQuestion()) { assessmentDao.saveResponseDetails(testId, subcat.getId(), ques); } } // All the question id are now saved String projectName = projectDao.getProjectName(response.getProjectId()); Project projectSaved = new Project(response.getProjectId(),testId,projectName); return projectSaved; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Assessment getTest(Long assessmentId);", "private int getTestId(String testName) {\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tStatement statement = dbConnection.createStatement();\r\n\t\t\tResultSet resultSet = statement.executeQuery(\"select id_test from tests where name = '\" + testName + \"'\");\r\n\r\n\t\t\tif (resultSet.next()) {\r\n\t\t\t\treturn resultSet.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} \r\n\t\t\r\n\t\treturn -1;\r\n\t}", "public Integer getTestId() {\n return testId;\n }", "public Long getTestId() {\n return testId;\n }", "public int getTestId() {\n return this._TestId;\n }", "public String getTestSetId() {\n return this.testSetId;\n }", "public String getTestSetId() {\n return this.testSetId;\n }", "public int getTestCaseId(String testName) {\r\n\t\tif (testCaseId != null) {\r\n\t\t\treturn testCaseId;\r\n\t\t}\r\n\t\tcreateTestCase(testName);\r\n\t\treturn testCaseId;\r\n\t}", "private int getExperimentId(Comparable accession) {\n String query = \"SELECT experiment_id FROM pride_experiment WHERE accession= ?\";\n return jdbcTemplate.queryForInt(query, accession);\n }", "@Override\n\t\tpublic BigInteger getTestByStudentId(BigInteger studentId)\n\t\t\t\tthrows RecordNotFoundException {\n\n\t\t\tBigInteger id1= studentrepo.getTestByStudentId(studentId);\n\t\t\treturn id1;\n\t\t}", "public int getTestCaseId() {\n return testCaseId;\n }", "public static String getTestId() {\n\t\t\trandomTestId+=1;\n\t\t\treturn Integer.toString(randomTestId);\n\t\t}", "@Test\n public void getID() {\n\n }", "public String getContestId() ;", "String experimentId();", "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "public int getExamId();", "@Override\n\tpublic MedicalTest findTestById(String testId) {\n\n\t\tOptional<MedicalTest> optional = testDao.findById(testId);\n\t\tif (optional.isPresent()) {\n\t\t\tMedicalTest test = optional.get();\n\t\t\treturn test;\n\t\t}\n\t\tthrow new MedicalTestNotFoundException(\"Test not found for Test Id= \" + testId);\n\t}", "@Test\n\tpublic void getSurveyIdTest() throws Exception {\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getsurveybyid/962\")\n\t\t .contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON))\n\t\t\t\t.andExpect(status().isFound());\n\t}", "public Long getStudentsTestsId() {\n return studentsTestsId;\n }", "long getEncounterId();", "public String getTestExecutionId() {\n return this.testExecutionId;\n }", "@Test\n\tpublic void getIdTest() {\n\t}", "public void testGetId(){\n exp = new Experiment(\"10\");\n assertEquals(\"getId does not work\", \"10\", exp.getId());\n }", "@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }", "@Test\n public void testSelectById() {\n disciplineTest = disciplineDao.selectById(1);\n boolean result = disciplineTest.getId() == 1;\n assertTrue(result);\n }", "@Test\n public void idTest() {\n // TODO: test id\n }", "@Test\n public void idTest() {\n // TODO: test id\n }", "@Test\n public void testGetMyAsid() {\n System.out.println(\"getMyAsid\");\n String expResult = MY_ASID;\n String result = instance.getMyAsid();\n assertEquals(expResult, result);\n }", "@Override\n\t\t\tpublic TestEntity findById(BigInteger testId)\n\t\t\t{\n\t\t\t\t Optional<TestEntity>optional=testDao.findById(testId);\n\t\t\t if(optional.isPresent())\n\t\t\t {\n\t\t\t TestEntity test=optional.get();\n\t\t\t return test;\n\t\t\t }\n\t\t\t throw new TestNotFoundException(\"Test not found for id=\"+testId);\n\t\t\t }", "public long getTestId(long projectKey) {\n\t\treturn 0;\n\t}", "@Test\n public void identifierTest() {\n assertEquals(\"ident1\", authResponse.getIdentifier());\n }", "int getAId();", "@Test\n public void test012() {\n List<Integer> id = response.extract().path(\"data.id\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + id);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n\tpublic void testGetID() {\n\t}", "@Test\n public void subjectIdTest() {\n // TODO: test subjectId\n }", "public void setTestId(Integer testId) {\n this.testId = testId;\n }", "public Cursor getassessmentcmp(String stageid)\n {\n \ttry\n \t{\n \t\tString sql=\"SELECT * FROM assessment where stageId='\"+stageid+\"' and result='true'\";\n \t\t\n \t\tCursor mCur=mDb.rawQuery(sql, null);\n \t\tif(mCur!=null)\n \t\t{\n \t\t\tmCur.moveToNext();\n \t\t}\n \t\treturn mCur;\n \t}\n \tcatch(SQLException mSQLException)\n \t{\n \t\tLog.e(TAG, \"getTestData >>\"+ mSQLException.toString());\n \t\tthrow mSQLException;\n \t}\n }", "public Test getTestByKey(Long key) throws Exception {\r\n return this.testMapper.selectByPrimaryKey(key);\r\n }", "@Test\n public void testGetCardID() {\n DevCard devCard = new DevCard(cost, level, color, victoryPoints, productionPower);\n String s = devCard.getCardID();\n }", "Identifications loadExperimentIdentifications(String experimentAccession);", "java.lang.String getAoisId();", "@Test\r\n public void testGetId() {\r\n System.out.println(\"getId\");\r\n \r\n int expResult = 0;\r\n int result = instance.getId();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "@Test\n void getByIdSuccess () {\n TestEntity testEntity = buildEntity();\n Api2 instance = new Api2();\n Long result = instance.save(testEntity);\n System.out.println(\"Result\" + result);\n\n if (result != null) {\n Optional<TestEntity> optionalEntity = instance.getById(TestEntity.class, result);\n\n TestEntity entity = optionalEntity.orElse(null);\n\n if (entity != null) {\n Assertions.assertEquals(result, entity.getId());\n Assertions.assertNotNull(result);\n } else {\n Assertions.fail();\n }\n } else {\n Assertions.fail();\n }\n }", "@Test\n public void testGetId() {\n System.out.println(\"getId\");\n DTO_Ride instance = dtoRide;\n long expResult = 1L;\n long result = instance.getId();\n assertEquals(expResult, result);\n }", "public void testGetId_Default_Accuracy() {\r\n assertEquals(\"The id value should be got properly.\", -1, auditDetail.getId());\r\n }", "TestEntity selectByPrimaryKey(Integer id);", "public long getExecutionForTest() throws IOException, URISyntaxException {\n ConnectionManager.refreshSession();\n executionCycleDOM = ConnectionManager.getTestExecutionForIssue(issue.getIdAsLong());\n executionId = executionCycleDOM.getIdByVersion(versionId);\n logger.info(\"EXECUTION ID : \" + executionId);\n return executionId;\n }", "public long getContestId() {\n return this.contestId;\n }", "public int getStudentId();", "ExperimenterId getExperimenterId();", "private int createNewTest(String testName) {\r\n\t\tint newTestId = -1;\r\n\t\ttry {\r\n\t\t\tconnect();\r\n\t\t\tPreparedStatement pStat = dbConnection.prepareStatement(\"insert into tests (name) VALUES (?)\", Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tpStat.setString(1, testName);\r\n\t\t\tpStat.execute();\r\n\r\n\t\t\tResultSet rs = pStat.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tnewTestId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tpStat.close();\r\n\t\t} catch (SQLException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn newTestId;\r\n\t}", "@Override\n\t public String assignTest(BigInteger studentId,BigInteger testId)\n\t\t{\n\t\t\tOptional<Student>findById=studentrepo.findById(studentId);\n\t\t\tOptional<Test>test=testrepo.findById(testId);\n\t\t\tif(findById.isPresent()&& test.isPresent())\n\t\t\t{\n\t\t\t\tStudent student=findById.get();\n\t\t\t\tstudent.setTestId(testId);\n\t\t\t\tstudentrepo.save(student);\n\t\t\t\treturn \"Test Assigned\";\n\t\t\t\t\n\t\t\t}\n\t\t\treturn \"User or Test does not exist\";\n\t\t\t\n\t\t}", "@Test\r\n\tpublic void Test_ID() {\r\n\t\tResponse resp = given().\r\n\t\t\t\tparam(\"nasa_id\", \"PIA12235\").\r\n\t\t\t\twhen().\r\n\t\t\t\tget(endpoint);\r\n\t\t\t\tSystem.out.println(resp.getStatusCode());\r\n\t\t\t\tAssert.assertEquals(resp.getStatusCode(), 200);\r\n\t}", "io.dstore.values.IntegerValue getUnitId();", "CrawlTest selectByPrimaryKey(Integer crawlId);", "@Test\n public void selectById() {\n }", "@Test(priority=2)\r\n\t\tpublic void getStudentIDSerialization() {\r\n\t\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)\r\n\t\t\t.when()\r\n\t\t\t\t.get(\"http://localhost:8085/student/102\")\r\n\t\t\t.then()\r\n\t\t\t\t.statusCode(200)\r\n\t\t\t\t.assertThat()\r\n\t\t\t\t.body(\"id\",equalTo(\"102\"));\r\n\t\t\t\t\r\n\t\t}", "public void testGetInvoiceStatusByIdAccuracy() throws Exception {\n InvoiceStatus invoiceStatus = invoiceSessionBean.getInvoiceStatus(1);\n\n assertEquals(\"The id of the returned value is not as expected\", 1, invoiceStatus.getId());\n }", "public int getId() \r\n {\r\n return studentId;\r\n }", "int getSkillId();", "long getProposalId();", "public String getMeetingIdByEventId(String eventId) throws Exception;", "public String getId() { return studentId; }", "TrainingCourse selectByPrimaryKey(String id);", "java.lang.String getPatientId();", "public void setTestId(Long testId) {\n this.testId = testId;\n }", "@Test\n\tpublic void testGetAssignmentID()\n\t{\n\t\tAssignmentHandler ah = new AssignmentHandler();\n\t\tassertEquals(1,ah.getAssignmentID(\"testAssignment\"));\n\t\tassertEquals(2,ah.getAssignmentID(\"Assignment2\"));\n\t}", "@Test\n public void test4FindPk() {\n SpecialityFactory factory = new MysqlSpecialityDAOFactry();\n SpecialityDAO dao = factory.create();\n SpecialityDTO respuesta = dao.findPk(\"telecomunicaciones\");\n assertEquals(respuesta,spec2);\n }", "public long getStudentID();", "public Test getTestByCode(String test_code) {\n\t\tTest t=testRepository.getTestByCode(test_code);\n\t\treturn t;\n\t}", "String getIdNumber();", "@Test\n public void testGetId_edificio() {\n System.out.println(\"getId_edificio\");\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n int expResult = 1;\n int result = instance.getId_edificio();\n assertEquals(expResult, result);\n \n }", "int getQuestId();", "int getQuestId();", "int getQuestId();", "int getQuestId();", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "java.lang.String getDataId();", "java.lang.String getDataId();", "String getGameId();", "@Test\r\n public void testGetStudentID() {\r\n System.out.println(\"getStudentID\");\r\n Student instance = new Student();\r\n String expResult = \"\";\r\n String result = instance.getStudentID();\r\n assertEquals(expResult, result);\r\n \r\n }", "public abstract java.lang.Integer getEspe_id();", "public String getEventidforAssigning(String eventId){\n System.out.println(\"hello\" + eventId);\n ViewObjectImpl usersVO = this.getEventCandidateDatawithName1();\n usersVO.setApplyViewCriteriaName(\"EventCandidateDatawithNameCriteria\");\n usersVO.setNamedWhereClauseParam(\"pid\",eventId);\n usersVO.executeQuery();\n // System.out.println(usersVO);\n Row usersVORow = usersVO.first();\n // System.out.println(usersVORow);\n // System.out.println(usersVORow.getAttribute(\"EVENT_ID\").toString());\n return (usersVORow != null) ? usersVORow.getAttribute(\"EVENT_ID\").toString(): null;\n }", "@Test\n public void campaignIdTest() {\n // TODO: test campaignId\n }", "TestEnum selectByPrimaryKey(String id);", "int getDoctorId();", "int getDoctorId();", "public String getDatanestId() {\n return datanestId;\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();" ]
[ "0.7447649", "0.73407346", "0.68354493", "0.68102956", "0.6722879", "0.652059", "0.652059", "0.6456018", "0.62766266", "0.6266398", "0.6260394", "0.62394685", "0.61348504", "0.60698485", "0.6067091", "0.6043718", "0.6025673", "0.5978743", "0.5941024", "0.59299445", "0.58644366", "0.5850749", "0.5840154", "0.57836235", "0.5722334", "0.56518304", "0.56379944", "0.56379944", "0.5625486", "0.56123376", "0.5604095", "0.5600839", "0.55925596", "0.55663836", "0.55600876", "0.5549739", "0.55482346", "0.55428505", "0.5531847", "0.55292594", "0.5527082", "0.5523701", "0.5519834", "0.55184263", "0.5516889", "0.54993176", "0.5484937", "0.5457732", "0.5455198", "0.54504156", "0.5440811", "0.54311615", "0.5415064", "0.5389425", "0.53830993", "0.5369361", "0.53527707", "0.53348625", "0.5334467", "0.53342944", "0.5333437", "0.5329435", "0.5319214", "0.5306258", "0.5301926", "0.52994215", "0.5292694", "0.5289669", "0.5289631", "0.5285232", "0.5280676", "0.5269874", "0.5267568", "0.52659154", "0.52659154", "0.52659154", "0.52659154", "0.5263451", "0.52631223", "0.52631223", "0.52618", "0.52594763", "0.5256777", "0.52560943", "0.5249764", "0.52482367", "0.52438456", "0.52438456", "0.52388144", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216", "0.5236216" ]
0.0
-1
Newly added method to fetch questions by subcat
public List<Question> getQuestionBySubCat(long project_key, String subcat_name) { List<Question> question_subcat = assessmentDao.getSubCategoryQuestion(subcat_name); long subCatId = assessmentDao.getSubCatID(subcat_name); List<Question> question_checked_subcat = assessmentDao.getCheckedQuestionSubCat(project_key, subCatId); for (Question ques : question_checked_subcat) { if (question_subcat.contains(ques)) { int i = question_subcat.indexOf(ques); question_subcat.get(i).setChecked(true); } } return question_subcat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Question> getQuestions();", "public static List<Question> getAllCategoryQuestions(Category cat) {\n List<Question> questions = getQuestions(); //get all the questions\n List<Question> categoryQuestions = new ArrayList<Question>(); //make new list of questions\n for (Question q : questions) {\n if (q.getCategory().getId() == cat.getId()) {\n categoryQuestions.add(q);\n }\n }\n return categoryQuestions;\n }", "public List<MultQuestion> multChoiceQuestions(int qid);", "List<Question> getQuestions();", "List<SecurityQuestion> getCustomerQuestions(String locale)throws EOTException;", "public List<Question> getQuestions(Category category) {\n List<Question> questions = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n questions = dbb.getQuestion(category);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return questions;\n }", "List<Question> getQuestions(String surveyId);", "public Question getQuestionbyId(int sid,int qid);", "private void addSubquestions(Question q, String type)\n\t{\n\t\tList<String> sqids = getSqIds(q.getQid());\n\t\tfor (String sqid : sqids) {\n\t\t\tString question = q_l10ns_node.selectSingleNode(\"row[qid=\" + sqid + \"]/question\").getText();\n\t\t\tString sq_title = sq_node.selectSingleNode(\"row[qid=\" + sqid + \"]/title\").getText();\n\t\t\tQuestion sq = new Question(q.qid + sq_title,\n\t\t\t\t\tq.gid,\n\t\t\t\t\ttype,\n\t\t\t\t\tq.question + \" \" + question,\n\t\t\t\t\tsqid,\n\t\t\t\t\tq.mandatory,\n\t\t\t\t\tq.language);\n\t\t\tsq.setHelp(q.help);\n\n\t\t\tsurvey.addQuestion(sq);\n\t\t}\n\t}", "public String getQuestion(int idType, int idQuest) throws SQLException{ \r\n String query= (\"select question from \"+Database.Table.TABLE_PRETEST_QUESTION+\" where idtype = '\"+idType+\"' AND idquest = '\"+idQuest+\"'\");\r\n ResultSet rs = q.querySelect(query);\r\n while(rs.next()){\r\n question=rs.getString(\"question\");\r\n }\r\n return question;\r\n }", "private void addSubquestionsWithCL(Question q, String oid, HashMap<String, String> ans, String t, boolean b, String qid_append)\n\t{\n\t\tList<String> sqids = getSqIds(q.getQid());\n\t\tfor (String sqid : sqids) {\n\t\t\tString question = q_l10ns_node.selectSingleNode(\"row[qid=\" + sqid + \"]/question\").getText();\n\t\t\tString sq_title = sq_node.selectSingleNode(\"row[qid=\" + sqid + \"]/title\").getText();\n\t\t\tQuestion sq = new Question(q.qid + sq_title + qid_append,\n\t\t\t\t\tq.gid,\n\t\t\t\t\t\"A\",\n\t\t\t\t\tq.question + \" \" + question,\n\t\t\t\t\tsqid,\n\t\t\t\t\tq.mandatory,\n\t\t\t\t\tq.language);\n\t\t\tsq.setHelp(q.help);\n\t\t\tsq.setAnswers(new AnswersList(oid, ans, t, b));\n\n\t\t\tsurvey.addQuestion(sq);\n\n\t\t\t// If the type is \"Multiple Choice with Comments\"\n\t\t\tif (q.getType().equals(\"P\")) {\n\t\t\t\t// Add comment question\n\t\t\t\taddComment(sq);\n\t\t\t}\n\t\t}\n\t}", "public List<Question> getQuestionbySid(int sid);", "Question getQuestion();", "public static List<Question> getQuestions() {\n if (QUESTION == null) {\n QUESTION = new ArrayList<>();\n List<Option> options = new ArrayList<Option>();\n options.add(new Option(1, \"Radio Waves\"));\n options.add(new Option(2, \"Sound Waves\"));\n options.add(new Option(3, \"Gravity Waves\"));\n options.add(new Option(4, \"Light Waves\"));\n QUESTION.add(new Question(1, \"Which kind of waves are used to make and receive cellphone calls?\", getCategory(4), options, options.get(0)));\n\n List<Option> options2 = new ArrayList<Option>();\n options2.add(new Option(1, \"8\"));\n options2.add(new Option(2, \"6\"));\n options2.add(new Option(3, \"3\"));\n options2.add(new Option(4, \"1\"));\n QUESTION.add(new Question(2, \"How many hearts does an octopus have?\", getCategory(4), options2, options2.get(2)));\n\n List<Option> options3 = new ArrayList<Option>();\n options3.add(new Option(1, \"Newton's Law\"));\n options3.add(new Option(2, \"Hooke's law\"));\n options3.add(new Option(3, \"Darwin's Law\"));\n options3.add(new Option(4, \"Archimedes' principle\"));\n QUESTION.add(new Question(3, \"Whose law states that the force needed to extend a spring by some distance is proportional to that distance?\", getCategory(4), options3, options3.get(1)));\n\n List<Option> options4 = new ArrayList<Option>();\n options4.add(new Option(1, \"M\"));\n options4.add(new Option(2, \"$\"));\n options4.add(new Option(3, \"W\"));\n options4.add(new Option(4, \"#\"));\n QUESTION.add(new Question(4, \"What is the chemical symbol for tungsten?\", getCategory(4), options4, options4.get(2)));\n\n List<Option> options5 = new ArrayList<Option>();\n options5.add(new Option(1, \"Pulsar\"));\n options5.add(new Option(2, \"Draconis\"));\n options5.add(new Option(3, \"Aludra\"));\n options5.add(new Option(4, \"Alwaid\"));\n QUESTION.add(new Question(5, \"What is a highly magnetized, rotating neutron star that emits a beam of electromagnetic radiation?\", getCategory(4), options5, options5.get(0)));\n\n List<Option> options6 = new ArrayList<Option>();\n options6.add(new Option(1, \"2\"));\n options6.add(new Option(2, \"4\"));\n options6.add(new Option(3, \"7\"));\n options6.add(new Option(4, \"10\"));\n QUESTION.add(new Question(6, \"At what temperature is Centigrade equal to Fahrenheit?\", getCategory(4), options6, options6.get(2)));\n\n List<Option> options7 = new ArrayList<Option>();\n options7.add(new Option(1, \"Temperature\"));\n options7.add(new Option(2, \"Distance\"));\n options7.add(new Option(3, \"Light Intensity\"));\n options7.add(new Option(4, \"Noise\"));\n QUESTION.add(new Question(7, \"Kelvin is a unit to measure what?\", getCategory(4), options7, options7.get(2)));\n\n List<Option> options8 = new ArrayList<Option>();\n options8.add(new Option(1, \"Mars\"));\n options8.add(new Option(2, \"Jupiter\"));\n options8.add(new Option(3, \"Saturn\"));\n options8.add(new Option(4, \"Neptune\"));\n QUESTION.add(new Question(8, \"Triton is the largest moon of what planet?\", getCategory(4), options8, options8.get(3)));\n\n List<Option> options9 = new ArrayList<Option>();\n options9.add(new Option(1, \"Brain\"));\n options9.add(new Option(2, \"Heart\"));\n options9.add(new Option(3, \"Lungs\"));\n options9.add(new Option(4, \"Skin\"));\n QUESTION.add(new Question(9, \"What is the human body’s biggest organ?\", getCategory(4), options9, options9.get(3)));\n\n List<Option> options10 = new ArrayList<Option>();\n options10.add(new Option(1, \"Skull\"));\n options10.add(new Option(2, \"Knee Cap\"));\n options10.add(new Option(3, \"Shoulder Joint\"));\n options10.add(new Option(4, \"Backbone\"));\n QUESTION.add(new Question(10, \"What is the more common name for the patella?\", getCategory(4), options10, options10.get(1)));\n\n List<Option> options11 = new ArrayList<Option>();\n options11.add(new Option(1, \"Mother India\"));\n options11.add(new Option(2, \"The Guide\"));\n options11.add(new Option(3, \"Madhumati\"));\n options11.add(new Option(4, \"Amrapali\"));\n QUESTION.add(new Question(11, \"Which was the 1st Indian movie submitted for Oscar?\", getCategory(1), options11, options11.get(0)));\n\n List<Option> options12 = new ArrayList<Option>();\n options12.add(new Option(1, \"Gunda\"));\n options12.add(new Option(2, \"Sholey\"));\n options12.add(new Option(3, \"Satte pe Satta\"));\n options12.add(new Option(4, \"Angoor\"));\n QUESTION.add(new Question(12, \"Which film is similar to Seven Brides For Seven Brothers?\", getCategory(1), options12, options12.get(2)));\n\n List<Option> options13 = new ArrayList<Option>();\n options13.add(new Option(1, \"Rocky\"));\n options13.add(new Option(2, \"Pancham\"));\n options13.add(new Option(3, \"Chichi\"));\n options13.add(new Option(4, \"Chintu\"));\n QUESTION.add(new Question(13, \"Music Director R.D. Burman is also known as?\", getCategory(1), options13, options13.get(1)));\n\n List<Option> options14 = new ArrayList<Option>();\n options14.add(new Option(1, \"Nagarjuna\"));\n options14.add(new Option(2, \"Chiranjeevi\"));\n options14.add(new Option(3, \"Rajinikanth\"));\n options14.add(new Option(4, \"NTR\"));\n QUESTION.add(new Question(14, \"Shivaji Rao Gaikwad is the real name of which actor?\", getCategory(1), options14, options14.get(2)));\n\n List<Option> options15 = new ArrayList<Option>();\n options15.add(new Option(1, \"Geraftaar\"));\n options15.add(new Option(2, \"Hum\"));\n options15.add(new Option(3, \"Andha kanoon\"));\n options15.add(new Option(4, \"Agneepath\"));\n QUESTION.add(new Question(15, \"Name the film in which Amitabh Bachchan, Rajinikanth and Kamal Hasan worked together.\", getCategory(1), options15, options15.get(0)));\n\n List<Option> options16 = new ArrayList<Option>();\n options16.add(new Option(1, \"AR Rahman\"));\n options16.add(new Option(2, \"Bhanu Athaiya\"));\n options16.add(new Option(3, \"Gulzar\"));\n options16.add(new Option(4, \"Rasul Pookutty\"));\n QUESTION.add(new Question(16, \"First Indian to win Oscar award?\", getCategory(1), options16, options16.get(1)));\n\n List<Option> options17 = new ArrayList<Option>();\n options17.add(new Option(1, \"Jab tak hai jaan\"));\n options17.add(new Option(2, \"Rab ne bana di jodi\"));\n options17.add(new Option(3, \"Veer zara\"));\n options17.add(new Option(4, \"Ek tha tiger\"));\n QUESTION.add(new Question(17, \"Which was the last movie directed by Yash Chopra?\", getCategory(1), options17, options17.get(0)));\n\n\n List<Option> options18 = new ArrayList<Option>();\n options18.add(new Option(1, \"‘Thala’ Ajith\"));\n options18.add(new Option(2, \"Arjun Sarja\"));\n options18.add(new Option(3, \"Ashutosh Gawariker\"));\n options18.add(new Option(4, \"AK Hangal\"));\n QUESTION.add(new Question(18, \"\\\"Itna sannata kyun hai bhai?\\\" Who said this, now legendary words, in 'Sholay'?\", getCategory(1), options18, options18.get(3)));\n\n List<Option> options19 = new ArrayList<Option>();\n options19.add(new Option(1, \"Tommy\"));\n options19.add(new Option(2, \"Tuffy\"));\n options19.add(new Option(3, \"Toffy\"));\n options19.add(new Option(4, \"Timmy\"));\n QUESTION.add(new Question(19, \"What was the name of Madhuri Dixit’s dog in Hum Aapke Hain Koun?\", getCategory(1), options19, options19.get(1)));\n\n List<Option> options20 = new ArrayList<Option>();\n options20.add(new Option(1, \"Premnath\"));\n options20.add(new Option(2, \"Dilip Kumar\"));\n options20.add(new Option(3, \"Raj Kapoor\"));\n options20.add(new Option(4, \"Kishore Kumar\"));\n QUESTION.add(new Question(20, \"Beautiful actress Madhubala was married to?\", getCategory(1), options20, options20.get(3)));\n\n\n List<Option> options21 = new ArrayList<Option>();\n options21.add(new Option(1, \"Sher Khan\"));\n options21.add(new Option(2, \"Mufasa\"));\n options21.add(new Option(3, \"Simba\"));\n options21.add(new Option(4, \"Sarabi\"));\n QUESTION.add(new Question(21, \"What is the name of the young lion whose story is told in the musical 'The Lion King'?\", getCategory(2), options21, options21.get(2)));\n\n List<Option> options22 = new ArrayList<Option>();\n options22.add(new Option(1, \"Scotland\"));\n options22.add(new Option(2, \"England\"));\n options22.add(new Option(3, \"Germany\"));\n options22.add(new Option(4, \"Netherland\"));\n QUESTION.add(new Question(22, \"Which country's freedom struggle is portrayed in the Mel Gibson movie 'Braveheart'?\", getCategory(2), options22, options22.get(0)));\n\n List<Option> options23 = new ArrayList<Option>();\n options23.add(new Option(1, \"Letters to Juliet\"));\n options23.add(new Option(2, \"Saving Private Ryan\"));\n options23.add(new Option(3, \"Forest Gump\"));\n options23.add(new Option(4, \"Gone With The Wind\"));\n QUESTION.add(new Question(23, \"Which movie had this dialogue \\\"My mama always said, life was like a box of chocolates. You never know what you're gonna get.\", getCategory(2), options23, options23.get(2)));\n\n List<Option> options24 = new ArrayList<Option>();\n options24.add(new Option(1, \"Die\"));\n options24.add(new Option(2, \"Golden\"));\n options24.add(new Option(3, \"Casino\"));\n options24.add(new Option(4, \"Never\"));\n QUESTION.add(new Question(24, \"Excluding \\\"the\\\", which word appears most often in Bond movie titles?\", getCategory(2), options24, options24.get(3)));\n\n List<Option> options25 = new ArrayList<Option>();\n options25.add(new Option(1, \"Bishop\"));\n options25.add(new Option(2, \"Ash\"));\n options25.add(new Option(3, \"Call\"));\n options25.add(new Option(4, \"Carlos\"));\n QUESTION.add(new Question(25, \"Name the android in movie Alien \", getCategory(2), options25, options25.get(1)));\n\n List<Option> options26 = new ArrayList<Option>();\n options26.add(new Option(1, \"Gone with the wind\"));\n options26.add(new Option(2, \"Home footage\"));\n options26.add(new Option(3, \"With Our King and Queen Through India\"));\n options26.add(new Option(4, \"Treasure Island\"));\n QUESTION.add(new Question(26, \"Which was the first colour film to win a Best Picture Oscar?\", getCategory(2), options26, options26.get(0)));\n\n List<Option> options27 = new ArrayList<Option>();\n options27.add(new Option(1, \"Robert Redford\"));\n options27.add(new Option(2, \"Michael Douglas\"));\n options27.add(new Option(3, \"Harrison Ford\"));\n options27.add(new Option(4, \"Patrick Swayze\"));\n QUESTION.add(new Question(27, \"Who played the male lead opposite Sharon Stone in the hugely successful movie 'The Basic Instinct'?\", getCategory(2), options27, options27.get(1)));\n\n List<Option> options28 = new ArrayList<Option>();\n options28.add(new Option(1, \"10,000 BC\"));\n options28.add(new Option(2, \"Day after tomorrow\"));\n options28.add(new Option(3, \"2012\"));\n options28.add(new Option(4, \"The Noah's Ark Principle\"));\n QUESTION.add(new Question(28, \"Which Roland Emmerich movie portrays fictional cataclysmic events that were to take place in early 21st century?\", getCategory(2), options28, options28.get(2)));\n\n List<Option> options29 = new ArrayList<Option>();\n options29.add(new Option(1, \"Finding Nemo\"));\n options29.add(new Option(2, \"The Incredibles\"));\n options29.add(new Option(3, \"Monsters, Inc.\"));\n options29.add(new Option(4, \"Toy Story\"));\n QUESTION.add(new Question(29, \"What was the first movie by Pixar to receive a rating higher than G in the United States?\", getCategory(2), options29, options29.get(1)));\n\n List<Option> options30 = new ArrayList<Option>();\n options30.add(new Option(1, \"Draco\"));\n options30.add(new Option(2, \"Harry\"));\n options30.add(new Option(3, \"Hermione\"));\n options30.add(new Option(4, \"Ron\"));\n QUESTION.add(new Question(30, \"In the 'Prisoner of Azkaban', who throws rocks at Hagrid's hut so that Harry, Ron and Hermione can leave?\", getCategory(2), options30, options30.get(2)));\n\n List<Option> options31 = new ArrayList<Option>();\n options31.add(new Option(1, \"Brett Lee\"));\n options31.add(new Option(2, \"Adam Gilchrist\"));\n options31.add(new Option(3, \"Jason Gillespie\"));\n options31.add(new Option(4, \"Glenn McGrath\"));\n QUESTION.add(new Question(31, \"'Dizzy' is the nickname of what Australian player?\", getCategory(3), options31, options31.get(2)));\n\n List<Option> options32 = new ArrayList<Option>();\n options32.add(new Option(1, \"1883 between Australia and Wales\"));\n options32.add(new Option(2, \"1844 between Canada and the USA\"));\n options32.add(new Option(3, \"1869 between England and Australia\"));\n options32.add(new Option(4, \"1892 between England and India\"));\n QUESTION.add(new Question(32, \"In what year was the first international cricket match held?\", getCategory(3), options32, options32.get(1)));\n\n List<Option> options33 = new ArrayList<Option>();\n options33.add(new Option(1, \"Salim Durrani\"));\n options33.add(new Option(2, \"Farooq Engineer\"));\n options33.add(new Option(3, \"Vijay Hazare\"));\n options33.add(new Option(4, \"Mansur Ali Khan Pataudi\"));\n QUESTION.add(new Question(33, \"Which former Indian cricketer was nicknamed 'Tiger'?\", getCategory(3), options33, options33.get(3)));\n\n List<Option> options34 = new ArrayList<Option>();\n options34.add(new Option(1, \"Piyush Chawla\"));\n options34.add(new Option(2, \"Gautam Gambhir\"));\n options34.add(new Option(3, \"Irfan Pathan\"));\n options34.add(new Option(4, \"Suresh Raina\"));\n QUESTION.add(new Question(34, \"Who was named as the ICC Emerging Player of the Year 2004?\", getCategory(3), options34, options34.get(2)));\n\n List<Option> options35 = new ArrayList<Option>();\n options35.add(new Option(1, \"Subhash Gupte\"));\n options35.add(new Option(2, \"M.L.Jaisimha\"));\n options35.add(new Option(3, \"Raman Lamba\"));\n options35.add(new Option(4, \"Lala Amarnath\"));\n QUESTION.add(new Question(35, \"Which cricketer died on the field in Bangladesh while playing for Abahani Club?\", getCategory(3), options35, options35.get(2)));\n\n List<Option> options36 = new ArrayList<Option>();\n options36.add(new Option(1, \"V. Raju\"));\n options36.add(new Option(2, \"Rajesh Chauhan\"));\n options36.add(new Option(3, \"Arshad Ayub\"));\n options36.add(new Option(4, \"Narendra Hirwani\"));\n QUESTION.add(new Question(36, \"In 1987-88, which Indian spinner took 16 wickets on his Test debut?\", getCategory(3), options36, options36.get(3)));\n\n List<Option> options37 = new ArrayList<Option>();\n options37.add(new Option(1, \"Ravi Shastri\"));\n options37.add(new Option(2, \"Dilip Vengsarkar\"));\n options37.add(new Option(3, \"Sachin Tendulkar\"));\n options37.add(new Option(4, \"Sanjay Manjrekar\"));\n QUESTION.add(new Question(37, \"Which former Indian Test cricketer equalled Gary Sobers world record of six sixes in an over in a Ranji Trophy match?\", getCategory(3), options37, options37.get(0)));\n\n List<Option> options38 = new ArrayList<Option>();\n options38.add(new Option(1, \"Mohsin khan\"));\n options38.add(new Option(2, \"Wasim Akram\"));\n options38.add(new Option(3, \"Naveen Nischol\"));\n options38.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(38, \"Reena Roy the Indian film actress married a cricketer?\", getCategory(3), options38, options38.get(0)));\n\n List<Option> options39 = new ArrayList<Option>();\n options39.add(new Option(1, \"London, England\"));\n options39.add(new Option(2, \"Mumbai, India\"));\n options39.add(new Option(3, \"Lahore, Pakistan\"));\n options39.add(new Option(4, \"Nairobi, Kenya\"));\n QUESTION.add(new Question(39, \"Where did Yuvraj Singh make his ODI debut?\", getCategory(3), options39, options39.get(3)));\n\n List<Option> options40 = new ArrayList<Option>();\n options40.add(new Option(1, \"Arvind De Silva\"));\n options40.add(new Option(2, \"Roshan Mahanama\"));\n options40.add(new Option(3, \"Harshan Tilakaratne\"));\n options40.add(new Option(4, \"None Of The Above\"));\n QUESTION.add(new Question(40, \"Kapil Dev's 432 (world) record breaking victim was?\", getCategory(3), options40, options40.get(2)));\n\n List<Option> options41 = new ArrayList<Option>();\n options41.add(new Option(1, \"Vatican\"));\n options41.add(new Option(2, \"Iceland\"));\n options41.add(new Option(3, \"Netherlands\"));\n options41.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(41, \"Which country has the lowest population density of any country in Europe?\", getCategory(5), options41, options41.get(1)));\n\n List<Option> options42 = new ArrayList<Option>();\n options42.add(new Option(1, \"Cambodia\"));\n options42.add(new Option(2, \"Thailand\"));\n options42.add(new Option(3, \"Mynamar\"));\n options42.add(new Option(4, \"Bhutan\"));\n QUESTION.add(new Question(42, \"Angkor Wat, the largest religious monument in the world, is in which country?\", getCategory(5), options42, options42.get(0)));\n\n List<Option> options43 = new ArrayList<Option>();\n options43.add(new Option(1, \"Southern\"));\n options43.add(new Option(2, \"Northern and Southern\"));\n options43.add(new Option(3, \"Northern\"));\n options43.add(new Option(4, \"None of the above\"));\n QUESTION.add(new Question(43, \"Is the Tropic of Cancer in the northern or southern hemisphere?\", getCategory(5), options43, options43.get(2)));\n\n List<Option> options44 = new ArrayList<Option>();\n options44.add(new Option(1, \"Bangladesh\"));\n options44.add(new Option(2, \"Nepal\"));\n options44.add(new Option(3, \"Pakistan\"));\n options44.add(new Option(4, \"China\"));\n QUESTION.add(new Question(44, \"The Ganges flows through India and which other country?\", getCategory(5), options44, options44.get(0)));\n\n List<Option> options45 = new ArrayList<Option>();\n options45.add(new Option(1, \"Indian\"));\n options45.add(new Option(2, \"Pacific\"));\n options45.add(new Option(3, \"Arctic\"));\n options45.add(new Option(4, \"Atlantic\"));\n QUESTION.add(new Question(45, \"Which ocean lies on the east coast of the United States?\", getCategory(5), options45, options45.get(3)));\n\n List<Option> options46 = new ArrayList<Option>();\n options46.add(new Option(1, \"Prime Axis\"));\n options46.add(new Option(2, \"Lambert Line\"));\n options46.add(new Option(3, \"Prime Meridian\"));\n options46.add(new Option(4, \"Greenwich\"));\n QUESTION.add(new Question(46, \"What is the imaginary line called that connects the north and south pole?\", getCategory(5), options46, options46.get(2)));\n\n List<Option> options47 = new ArrayList<Option>();\n options47.add(new Option(1, \"Tropic of Cancer\"));\n options47.add(new Option(2, \"Tropic of Capricorn\"));\n QUESTION.add(new Question(47, \"The most northerly circle of latitude on the Earth at which the Sun may appear directly overhead at its culmination is called?\", getCategory(5), options47, options47.get(0)));\n\n List<Option> options48 = new ArrayList<Option>();\n options48.add(new Option(1, \"Nevada\"));\n options48.add(new Option(2, \"Arizona\"));\n options48.add(new Option(3, \"New Mexico\"));\n options48.add(new Option(4, \"San Fransisco\"));\n QUESTION.add(new Question(48, \"Which U.S. state is the Grand Canyon located in?\", getCategory(5), options48, options48.get(1)));\n\n List<Option> options49 = new ArrayList<Option>();\n options49.add(new Option(1, \"Indian Ocean\"));\n options49.add(new Option(2, \"Atlantic Ocean\"));\n options49.add(new Option(3, \"Pacific Ocean\"));\n options49.add(new Option(4, \"Arctic Ocean\"));\n QUESTION.add(new Question(49, \"Which is the largest body of water?\", getCategory(5), options49, options49.get(2)));\n\n List<Option> options50 = new ArrayList<Option>();\n options50.add(new Option(1, \"Maldives\"));\n options50.add(new Option(2, \"Monaco\"));\n options50.add(new Option(3, \"Tuvalu\"));\n options50.add(new Option(4, \"Vatican City\"));\n QUESTION.add(new Question(50, \"Which is the smallest country, measured by total land area?\", getCategory(5), options50, options50.get(3)));\n\n List<Option> options51 = new ArrayList<Option>();\n options51.add(new Option(1, \"1923\"));\n options51.add(new Option(2, \"1938\"));\n options51.add(new Option(3, \"1917\"));\n options51.add(new Option(4, \"1914\"));\n QUESTION.add(new Question(51, \"World War I began in which year?\", getCategory(6), options51, options51.get(3)));\n\n List<Option> options52 = new ArrayList<Option>();\n options52.add(new Option(1, \"France\"));\n options52.add(new Option(2, \"Germany\"));\n options52.add(new Option(3, \"Austria\"));\n options52.add(new Option(4, \"Hungary\"));\n QUESTION.add(new Question(52, \"Adolf Hitler was born in which country?\", getCategory(6), options52, options52.get(2)));\n\n List<Option> options53 = new ArrayList<Option>();\n options53.add(new Option(1, \"1973\"));\n options53.add(new Option(2, \"Austin\"));\n options53.add(new Option(3, \"Dallas\"));\n options53.add(new Option(4, \"1958\"));\n QUESTION.add(new Question(53, \"John F. Kennedy was assassinated in?\", getCategory(6), options53, options53.get(2)));\n\n List<Option> options54 = new ArrayList<Option>();\n options54.add(new Option(1, \"Johannes Gutenburg\"));\n options54.add(new Option(2, \"Benjamin Franklin\"));\n options54.add(new Option(3, \"Sir Isaac Newton\"));\n options54.add(new Option(4, \"Martin Luther\"));\n QUESTION.add(new Question(54, \"The first successful printing press was developed by this man.\", getCategory(6), options54, options54.get(0)));\n\n List<Option> options55 = new ArrayList<Option>();\n options55.add(new Option(1, \"The White Death\"));\n options55.add(new Option(2, \"The Black Plague\"));\n options55.add(new Option(3, \"Smallpox\"));\n options55.add(new Option(4, \"The Bubonic Plague\"));\n QUESTION.add(new Question(55, \"The disease that ravaged and killed a third of Europe's population in the 14th century is known as\", getCategory(6), options55, options55.get(3)));\n\n List<Option> options56 = new ArrayList<Option>();\n options56.add(new Option(1, \"Panipat\"));\n options56.add(new Option(2, \"Troy\"));\n options56.add(new Option(3, \"Waterloo\"));\n options56.add(new Option(4, \"Monaco\"));\n QUESTION.add(new Question(56, \"Napoleon was finally defeated at the battle known as?\", getCategory(6), options56, options56.get(2)));\n\n List<Option> options57 = new ArrayList<Option>();\n options57.add(new Option(1, \"Magellan\"));\n options57.add(new Option(2, \"Cook\"));\n options57.add(new Option(3, \"Marco\"));\n options57.add(new Option(4, \"Sir Francis Drake\"));\n QUESTION.add(new Question(57, \"Who was the first Western explorer to reach China?\", getCategory(6), options57, options57.get(2)));\n\n List<Option> options58 = new ArrayList<Option>();\n options58.add(new Option(1, \"Shah Jahan\"));\n options58.add(new Option(2, \"Chandragupta Maurya\"));\n options58.add(new Option(3, \"Humayun\"));\n options58.add(new Option(4, \"Sher Shah Suri\"));\n QUESTION.add(new Question(58, \"Who built the Grand Trunk Road?\", getCategory(6), options58, options58.get(3)));\n\n List<Option> options59 = new ArrayList<Option>();\n options59.add(new Option(1, \"Jawaharlal Nehru\"));\n options59.add(new Option(2, \"M. K. Gandhi\"));\n options59.add(new Option(3, \"Dr. Rajendra Prasad\"));\n options59.add(new Option(4, \"Dr. S. Radhakrishnan\"));\n QUESTION.add(new Question(59, \"Who was the first President of India?\", getCategory(6), options59, options59.get(2)));\n\n List<Option> options60 = new ArrayList<Option>();\n options60.add(new Option(1, \"8\"));\n options60.add(new Option(2, \"10\"));\n options60.add(new Option(3, \"5\"));\n options60.add(new Option(4, \"18\"));\n QUESTION.add(new Question(60, \"How many days did the battle of Mahabharata last?\", getCategory(6), options60, options60.get(3)));\n }\n return QUESTION;\n }", "Question getQuestion(String questionId);", "@RequestMapping(value = \"/getQuestion/{test}/{question}\")\n\tpublic Questions getSingleQuestion(@PathVariable(\"test\") int testid,@PathVariable(\"question\") int question) {\n\t\tTest test = testDao.gettestStatus(testid);\n\t\tif(test!=null) {\n\t\t\t\n\t\t\tfor(Questions testQueList : test.getQuestions()) {\n\t\t\t\tif(testQueList.getQid()==question) {\n\t\t\t\t\t//System.out.println(\"test id : \"+testQueList.getTest());\n//\t\t\t\t\ttestQueList.setTest(test.getTestid());\n\t\t\t\t\treturn testQueList;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public List<TemplateExamQuestion> getQuestions(Group group);", "List<SurveyQuestion> getSurveyQuestionsByQuestions(List<Question> questions);", "public List<Question> getCategory(String category) {\n List<Question> questions = loadQuestions(\"quiz/\" + category + \".txt\");\n return questions;\n }", "public objData getAnswerCategory(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT AC_REFID, AC_CATEGORY FROM ANS_CATEGORY WHERE AC_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "List<Question> getQuestionsUsed();", "private void generalKnowledgeQuestions(){\n QuestionUtils.generalKnowledgeQuestions(); //all the questions now are stored int the QuestionUtils class\n }", "public List<Question> listQuestions(DataSource ds){\n\t ArrayList<Question> questions = new ArrayList<Question>();\n ResultSet rs = null;\n Statement stmt = null;\n try{\n conn = ds.getConnection();\n stmt = conn.createStatement();\n rs = stmt.executeQuery(\n \"SELECT id, name, image, sound, category, level, easy, medium, hard FROM questions\");\n while(rs.next()){\n Question currentQuestion = new Question();\n currentQuestion.setQuestionId(rs.getInt(1));\n currentQuestion.setWord(rs.getString(2));\n currentQuestion.setImage(rs.getString(3));\n currentQuestion.setSound(rs.getString(4));\n currentQuestion.setCategory(rs.getString(5));\n currentQuestion.setLevel(rs.getInt(6));\n String difficulty = \"\";\n if (rs.getInt(7)==1)\n difficulty = \"easy\";\n else \n if(rs.getInt(8)==1)\n difficulty = \"medium\";\n else\n if(rs.getInt(9)==1)\n difficulty = \"hard\";\n currentQuestion.setDifficulty(difficulty);\n questions.add(currentQuestion);\n }\n conn.close();\n }\n catch(Exception ex){ex.printStackTrace();}\n finally {\n try {if (rs != null) rs.close();} catch (SQLException e) {}\n try {if (stmt != null) stmt.close();} catch (SQLException e) {}\n try {if (conn != null) conn.close();} catch (SQLException e) {}\n }\n System.out.println(\"TMA...All qns count: \" + questions.size());\n \n\t return questions;\n\t}", "public List<Question> getQuestionsTopic(int tId){\r\n List<Question> questions = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_QUESTIONS + \" AS q INNER JOIN \" +\r\n TABLE_TOPICS_QUESTIONS + \" AS tq ON q.\" +\r\n KEY_ID + \" = tq.\" + KEY_QID +\r\n \" WHERE tq.\" + KEY_TID + \" = \" + tId + \" ORDER BY RANDOM()\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Question question = new Question();\r\n question.setId(cursor.getInt(cursor.getColumnIndex(KEY_QID)));\r\n question.setQuestion(cursor.getString(cursor.getColumnIndex(KEY_QUESTION)));\r\n question.setAnswer(cursor.getString(cursor.getColumnIndex(KEY_ANSWER)));\r\n question.setExplanation(cursor.getString(cursor.getColumnIndex(KEY_EXPLANATION)));\r\n question.setOptA(cursor.getString(cursor.getColumnIndex(KEY_OPT_A)));\r\n question.setOptB(cursor.getString(cursor.getColumnIndex(KEY_OPT_B)));\r\n question.setOptC(cursor.getString(cursor.getColumnIndex(KEY_OPT_C)));\r\n question.setOptD(cursor.getString(cursor.getColumnIndex(KEY_OPT_D)));\r\n\r\n questions.add(question);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n\r\n\r\n cursor.close();\r\n db.close();\r\n return questions;\r\n }", "EmailTemplateSubCategoryMaster findbyId(long subcategoryId);", "List<Question11> selectByExample(Question11Example example);", "public objData getQuestion(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT TBD_REFID, TSDB_REFID, TDB_QNO, TDB_QUEST FROM TEST_DB WHERE TDB_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "@Test\n\tpublic void testGetAllQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getAllQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(5, questions.size());\n\t\tAssert.assertTrue(questions.contains(tdp.question1_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question3_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question4_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question5_location1));\n\t}", "List<Question> selectByExample(QuestionExample example);", "List<Question> selectByExample(QuestionExample example);", "List<Question> selectByExample(QuestionExample example);", "List<Question> selectByExample(QuestionExample example);", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Questions> getTenQuestion(String tag){\n\t\tResponsesDao rdao = new ResponsesDao();\n\t\tTagsDao tdao = new TagsDao();\n\t\tTags tags = tdao.getTagByString(tag);\n\t\tList<Questions> quest = new ArrayList<>();\n\t\tList<Questions> retquest = new ArrayList<>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tquest =\tsession.\tcreateQuery(\"from Questions where tid = :namevar\").\n\t\t\t\tsetInteger(\"namevar\", tags.getTagId()).list();\n\t\tif(quest.size() != 0) {\n\t\tfor(int i = 0; i <10; i++) {\n\t\t\tint rand = (int) (Math.random() * quest.size());\n\t\t\tretquest.add(rdao.getResponses(quest.get(rand)));\n\t\t}\n\t\t}\n\t\tsession.close();\n\t\treturn retquest;\n\t}", "Question getFirstQuestion();", "@Test\n\tpublic void testGetQuestionsWithPrivateReplies() {\n\t\tList<QnaQuestion> questions = questionLogic.getQuestionsWithPrivateReplies(LOCATION1_ID);\n\t\tAssert.assertEquals(1, questions.size());\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t}", "Question getQuestionInPick(String questionId);", "public List<TextQuestion> TextQuestions(int aid);", "@Override\n\tpublic List<Questions> listQuestion(long testId1) {\n\t\treturn null;\n\t}", "String getCategoryBySubCategory(String subCategory) throws DataBaseException;", "@Test\r\n\tpublic void questionTest() throws Throwable {\n\t\tString category=eUtil.getExcelData(\"smoke\", 1, 2);\r\n\t\tString subcategory=eUtil.getExcelData(\"smoke\", 1, 3);\r\n\t\tString question_title=eUtil.getExcelData(\"smoke\", 1, 4);\r\n\t\tString description=eUtil.getExcelData(\"smoke\", 1, 5);\r\n\t\tString expectedresult=eUtil.getExcelData(\"smoke\", 1, 6);\r\n\r\n\t\t//Navigate to QuestionPage\r\n\t\tQuestionsPage questionpage=new QuestionsPage(driver);\r\n\t\tquestionpage.questionPage(category, subcategory, question_title, description);\r\n\t\t\r\n\t\t//Verification\r\n\t\tString actual = questionpage.questionsLink();\r\n\t\tAssert.assertTrue(actual.contains(expectedresult));\r\n\t}", "private void parseQuestions()\n\t{\n\t\tlog.info(\"Parsing questions\");\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Element> questions_list = doc.selectNodes(\"//document/questions/rows/row\");\n\t\tq_l10ns_node = doc.selectSingleNode(\"//document/question_l10ns/rows\");\n\t\tsq_node = doc.selectSingleNode(\"//document/subquestions/rows\");\n\t\tq_node = doc.selectSingleNode(\"//document/questions/rows\");\n\t\ta_node = doc.selectSingleNode(\"//document/answers/rows\");\n\n\t\tfor (Element question : questions_list) {\n\t\t\tString qid = question.element(\"qid\").getText();\n\t\t\tlog.debug(\"Working on question: \" + qid);\n\t\t\tQuestion q = new Question(qid,\n\t\t\t\t\t\t\t\t\t Integer.parseInt(question.element(\"gid\").getText()),\n\t\t\t\t\t\t\t\t\t question.element(\"type\").getText(),\n\t\t\t\t\t\t\t\t\t q_l10ns_node.selectSingleNode(\"row[qid=\" + qid + \"]/question\").getText(),\n\t\t\t\t\t\t\t\t\t question.element(\"title\").getText(),\n\t\t\t\t\t\t\t\t\t question.element(\"mandatory\").getText().equals(\"N\") ? \"No\" : \"Yes\",\n\t\t\t\t\t\t\t\t\t q_l10ns_node.selectSingleNode(\"row[qid=\" + qid + \"]/language\").getText());\n\n\t\t\t// Add a description, if there is one\n\t\t\tNode desc = q_l10ns_node.selectSingleNode(\"row[qid=\" + q.getQid() + \"]/help\");\n\t\t\tif (desc != null) {\n\t\t\t\tq.setDescription(desc.getText());\n\t\t\t}\n\n\t\t\taddCondition(q);\n\n\t\t\tswitch (q.type) {\n\t\t\t\t// Normal Text Fields\n\t\t\t\tcase \"S\":\n\t\t\t\tcase \"T\":\n\t\t\t\tcase \"U\":\n\t\t\t\t\tq.setType(\"T\");\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Date/Time\n\t\t\t\tcase \"D\":\n\t\t\t\t\tdate_time_qids.add(q.getQid());\n\t\t\t\t\tbreak;\n\t\t\t\t// Numeric Input\n\t\t\t\tcase \"N\":\n\t\t\t\t\tif (check_int_only(q)) {\n\t\t\t\t\t\tq.setType(\"I\");\n\t\t\t\t\t}\n\t\t\t\t\tadd_range(q);\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Single 5-Point Choice\n\t\t\t\tcase \"5\":\n\t\t\t\t\tq.setType(\"A\");\n\t\t\t\t\tq.setAnswers(new AnswersList(\"5pt.cl\", ClGenerator.getIntCl(5), \"string\", true));\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Yes/No\n\t\t\t\tcase \"Y\":\n\t\t\t\t\tq.setType(\"A\");\n\t\t\t\t\tq.setAnswers(new AnswersList(\"YN.cl\", ClGenerator.getYNCl(), \"string\", false));\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Gender\n\t\t\t\tcase \"G\":\n\t\t\t\t\tq.setType(\"A\");\n\t\t\t\t\tq.setAnswers(new AnswersList(\"Gender.cl\", ClGenerator.getGenderCl(), \"string\", false));\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// List with comment\n\t\t\t\tcase \"O\":\n\t\t\t\t\taddComment(q);\n\t\t\t\t// Radio List\n\t\t\t\tcase \"L\":\n\t\t\t\t// Dropdown List\n\t\t\t\tcase \"!\":\n\t\t\t\t\tboolean oth = question.elementText(\"other\").equals(\"Y\");\n\t\t\t\t\tif(oth) {\n\t\t\t\t\t\taddOtherQuestion(q);\n\t\t\t\t\t}\n\t\t\t\t\tq.setType(\"A\");\n\t\t\t\t\tq.setAnswers(new AnswersList(q.getQid() + \".cl\", getAnswerCodesByID(q.getQid(), oth), \"string\", false));\n\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Multiple Texts\n\t\t\t\t// Input On Demand\n\t\t\t\tcase \"Q\":\n\t\t\t\t\taddSubquestions(q, \"T\");\n\t\t\t\t\tbreak;\n\t\t\t\t// Multiple Numeric Inputs\n\t\t\t\tcase \"K\":\n\t\t\t\t\tadd_range(q);\n\t\t\t\t\tif (check_int_only(q)){\n\t\t\t\t\t\taddSubquestions(q, \"I\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\taddSubquestions(q, \"N\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// Dual scale array\n\t\t\t\tcase \"1\":\n\t\t\t\t\tHashMap<String, String>[] code_lists = ClGenerator.getDualScaleCls(q.getQid(), getAnswerIdsByID(q.getQid()), a_node);\n\t\t\t\t\taddSubquestionsWithCL(q, q.getQid() + \".0\", code_lists[0], \"string\", false, \"-0\");\n\t\t\t\t\taddSubquestionsWithCL(q, q.getQid() + \".1\", code_lists[1], \"string\", false, \"-1\");\n\t\t\t\t\tbreak;\n\t\t\t\t// Array by column\n\t\t\t\tcase \"H\":\n\t\t\t\t// Flexible Array\n\t\t\t\tcase \"F\":\n\t\t\t\t\taddSubquestionsWithCL(q, q.getQid().concat(\".cl\"), getAnswerCodesByID(q.getQid(), false), \"string\", false, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t// 5pt Array\n\t\t\t\tcase \"A\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"5pt.cl\", ClGenerator.getIntCl(5), \"integer\", true, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t// 10pt Array\n\t\t\t\tcase \"B\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"10pt.cl\", ClGenerator.getIntCl(10), \"integer\", true, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t// Increase/Same/Decrease Array\n\t\t\t\tcase \"E\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"ISD.cl\", ClGenerator.getISDCL(), \"string\", false, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t// 10pt Array\n\t\t\t\tcase \"C\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"YNU.cl\", ClGenerator.getYNUCL(), \"string\", false, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\t// Matrix with numerical input\n\t\t\t\tcase \":\":\n\t\t\t\t\tq.setType(\"N\");\n\t\t\t\t\taddQuestionMatrix(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Matrix with text input\n\t\t\t\tcase \";\":\n\t\t\t\t\tq.setType(\"T\");\n\t\t\t\t\taddQuestionMatrix(q);\n\t\t\t\t\tbreak;\n\t\t\t\t// Multiple Choice (Normal, Bootstrap, Image select)\n\t\t\t\tcase \"M\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"MC.cl\", ClGenerator.getMCCL(), \"string\", false, \"\");\n\t\t\t\t\tif (question.elementTextTrim(\"other\").equals(\"Y\")) {\n\t\t\t\t\t\tq.setQid(q.getQid().concat(\"other\"));\n\t\t\t\t\t\tq.setType(\"T\");\n\t\t\t\t\t\tsurvey.addQuestion(q);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t// MC with comments\n\t\t\t\tcase \"P\":\n\t\t\t\t\taddSubquestionsWithCL(q, \"MC.cl\", ClGenerator.getMCCL(), \"string\", false, \"\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.error(\"Question type not supported: \" + q.type);\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testGetPublishedQuestions() {\n\t\tList<QnaQuestion> questions = questionLogic.getPublishedQuestions(LOCATION1_ID);\n\t\tAssert.assertEquals(questions.size(), 3);\n\t\t\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question3_location1));\n\t\tAssert.assertTrue(questions.contains(tdp.question4_location1));\n\t}", "public List<Questions> getQuestionByUser(int uid) {\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tList<Questions> quest = session.createQuery(\"from Questions where userid =:uid\").setInteger(\"uid\", uid).list();\n\t\tsession.close();\n\t\treturn quest;\n\t}", "public String getQuestions(int a){\n String question = questions[a];\n return question;\n }", "QuestionResponse getResponses(String questionId);", "List<ExamGrSubMeta> getAnswerSheetMeta();", "@Override\n\tpublic List<Questions> listQuestion(int testId) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Result<Studentscore> getAllChoiceTopic(int studentId,int examId, int page, int row) {\n\t\treturn studentExamScoreDAO.getAllChoiceTopic(studentId,examId, page, row);\r\n\t}", "@Test\n\tpublic void getSubCategoryTest() {\n\t\tList<Map<String, String>> list = new ArrayList<Map<String, String>>();\n\t\tMap<String, String> map = new HashMap<String, String>();\n\t\tmap.put(\"subcategory\", \"Skype\");\n\t\tlist.add(map);\n\t\twhen(TicketDao.getSubCategory(Mockito.anyString())).thenReturn(list);\n\t\tassertEquals(list, Service.getSubCategory(Mockito.anyString()));\n\t}", "private boolean chekForDubl(TCase tc) throws MyCustException {\n if (chkRowExists(tc.getQuestion().getQuestionHash(), Storage.TABLE_QUESTIONS)) {\n List<Question> questions = getQuestion(0, tc.getQuestion().getQuestionHash());\n for (Question question : questions) {\n List<Answer> answers = getAnswers(question.getQuestionId(), question.getQuestionHash());\n\n List<String> answersInDb = new ArrayList<String>();\n String answersInDbCorect = \"\";\n for (Answer answer : answers) {\n answersInDb.add(answer.getAnswerHash());\n if (answer.isCorrect())\n answersInDbCorect = answer.getAnswerHash();\n }\n\n List<String> answersInCurTestCase = new ArrayList<String>();\n String corectAnswersInCurTestCase = \"\";\n for (Answer answer : tc.getAnswers()) {\n answersInCurTestCase.add(answer.getAnswerHash());\n if (answer.isCorrect())\n corectAnswersInCurTestCase = answer.getAnswerHash();\n }\n\n Boolean gotQuestionsAnswers = false;\n if ((answersInDb.containsAll(answersInCurTestCase)) &&\n (answersInDbCorect.contentEquals(corectAnswersInCurTestCase))) {\n gotQuestionsAnswers = true;\n } else {\n continue;\n }\n\n Boolean gotQuestionsImages = false;\n if (tc.getPics() != null) {\n Images imagesInDb = getImages(question.getQuestionId(), question.getQuestionHash());\n if (imagesInDb == null) {\n gotQuestionsImages = false;\n } else {\n if ((tc.getPics().getImageLargeHash().contentEquals(imagesInDb.getImageLargeHash())) &&\n (tc.getPics().getImageSmallHash().contentEquals(imagesInDb.getImageSmallHash())))\n gotQuestionsImages = true;\n }\n }\n\n if ((gotQuestionsAnswers) && (tc.getPics() == null))\n return true;\n else if ((gotQuestionsAnswers) && (tc.getPics() != null) && (gotQuestionsImages))\n return true;\n else\n return false;\n }\n }\n return false;\n\n /*\n\n\n\n\n boolean gotQuestion = chkRowExists(tc.getQuestion().getQuestionHash(), Storage.TABLE_QUESTIONS);\n boolean gotAnswer = false;\n\n for (Answer answer : tc.getAnswers()) {\n if (chkRowExists(answer.getAnswerHash(), Storage.TABLE_ANSWERS)) {\n gotAnswer = true;\n break;\n }\n }\n\n Boolean gotPicL = null;\n Boolean gotPicS = null;\n if (tc.getPics() != null) {\n gotPicL = false;\n gotPicS = false;\n if (chkRowExists(tc.getPics().getImageLargeHash(), Storage.TABLE_PICTURES_LARGE))\n gotPicL = true;\n\n if (chkRowExists(tc.getPics().getImageSmallHash(), Storage.TABLE_PICTURES_SMALL))\n gotPicS = true;\n }\n\n if ((gotAnswer) && (gotQuestion))\n if ((gotPicL != null) && (gotPicS != null)) {\n if ((gotPicL) && (gotPicS))\n return true;\n\n } else\n return true;\n\n return false;\n */\n }", "private static ArrayList<Question> extractQuestions(Context context, String level) {\n\n // Create an empty ArrayList to store the questions.\n ArrayList<Question> questionList = new ArrayList<>();\n\n try{\n //Create a JSON object to deal with question data\n JSONObject jsonObject = JsonUtils.jsonFileToJSONObject(context, EXTERNAL);\n JSONArray questionArray = jsonObject.getJSONArray(level.toLowerCase());\n\n int numberOfQuestions = questionArray.length();\n for(int i = 0; i < numberOfQuestions; i++){\n JSONObject jsonQuestion = questionArray.getJSONObject(i);\n\n questionList.add(JsonUtils.convertJsonObjectToQuestionObject(jsonQuestion));\n\n }\n\n }catch(IOException | JSONException e){\n // If an error is thrown when executing any of the above statements in the \"try\" block,\n // catch the exception here, so the app doesn't crash. Print a log message\n // with the message from the exception.\n Log.e(\"QueryUtils\", \"Problem parsing the question JSON results\", e);\n }\n\n return questionList;\n }", "List<SubCategory> getSubCategory(Category category) throws DataBaseException;", "List<Product> getProductBySubCategory(String subCategory) throws DataBaseException;", "public Observable<PracticeQuestionResponse> fetchQuestions(final PracticeParent practiceParent) {\n return Observable.create(new ObservableOnSubscribe<PracticeQuestionResponse>() {\n @Override\n public void subscribe(ObservableEmitter<PracticeQuestionResponse> e) throws Exception {\n\n\n Call<PracticeQuestionResponse> call = mNetworkModel.fetchQuestions(practiceParent);\n Response<PracticeQuestionResponse> response = call.execute();\n if (response != null && response.isSuccessful()) {\n PracticeQuestionResponse body = response.body();\n Log.e(\"fetchQuestions--\", \"Successful\");\n e.onNext(body);\n } else if (response.code() == 404) {\n throw new Exception(mContext.getString(R.string.messageQuestionFetchFailed));\n } else if ((response.code() == 401) && SyncServiceHelper.refreshToken(mContext)) {\n Response<PracticeQuestionResponse> response2 = call.clone().execute();\n if (response2 != null && response2.isSuccessful()) {\n PracticeQuestionResponse body = response2.body();\n Log.e(\"fetchQuestions--\", \"Successful\");\n e.onNext(body);\n } else if ((response2.code() == 401)) {\n mContext.startActivity(LoginActivity.getUnauthorizedIntent(mContext));\n } else if (response2.code() == 404) {\n throw new Exception(mContext.getString(R.string.messageQuestionFetchFailed));\n } else {\n Log.e(\"fetchQuestions--\", \"Failed\");\n throw new Exception(mContext.getString(R.string.messageQuestionFetchFailed));\n }\n } else {\n Log.e(\"fetchQuestions--\", \"Failed\");\n throw new Exception(mContext.getString(R.string.messageQuestionFetchFailed));\n }\n\n e.onComplete();\n }\n });\n }", "protected static List<Question> fetch(Connection connection, int id)\n throws ApplicationException {\n // LOGGER.fine(\"Perform 'SELECT' on table \" +\n // QuestionDatabaseAccess.TABLE);\n\n List<Question> result = new LinkedList<>();\n\n StringBuilder sqlQuery = new StringBuilder(\"\");\n sqlQuery.append(\"SELECT * FROM \" + TABLE);\n sqlQuery.append(\" WHERE \" + COL_USER_ID);\n sqlQuery.append(\" <> ? AND \" + COL_QUESTION_ID);\n sqlQuery.append(\" NOT IN (SELECT \" + COL_QUESTION_ID);\n sqlQuery.append(\" FROM \" + RoundsDatabaseAccess.TABLE);\n sqlQuery.append(\" WHERE \" + COL_USER_ID);\n sqlQuery.append(\" = ?)\");\n // and not deleted, reported or followUps\n sqlQuery.append(\" AND \" + COL_QUESTION_ID);\n sqlQuery.append(\" NOT IN (SELECT \" + COL_QUESTION_ID);\n sqlQuery.append(\" FROM \" + QuestionDatabaseAccess.TABLE);\n sqlQuery.append(\" WHERE \" + QuestionDatabaseAccess.COL_REPORTED);\n sqlQuery.append(\" >= 3 OR \" + QuestionDatabaseAccess.COL_PREVIOUS_ID);\n sqlQuery.append(\" != 0);\");\n\n PreparedStatement statement = null;\n try {\n try {\n statement = connection.prepareStatement(sqlQuery.toString());\n statement.setInt(1, id);\n statement.setInt(2, id);\n ResultSet resultSet = statement.executeQuery();\n result = convertToInstances(resultSet);\n } finally {\n if (statement != null) {\n statement.close();\n }\n }\n } catch (SQLException e) {\n throw new ApplicationException(\"Failed to fetch\", e);\n }\n\n return result;\n }", "@Test\n public void testGetAnswersByQuestion(){\n Survey survey = createSurvey();\n Question question = createQuestion(survey);\n Answer answer = createAnswer(question);\n\n long testQuestionId = question.getId();\n List<Answer> testAnswers = answerDAO.getAnswersByQuestion(testQuestionId);\n // hiç cevap gelebiliyor mu kontrol, en az 1 cevap yukarda verdik çünkü.\n Assert.assertTrue(testAnswers != null && testAnswers.size() >= 1);\n }", "public List<Question> getQuestionsExamTopic(int eId, int tId){\r\n List<Question> questions = new ArrayList<>();\r\n String selectQuery = \"SELECT * FROM \" + TABLE_QUESTIONS + \" AS q INNER JOIN \" +\r\n TABLE_EXAMS_TOPICS_QUESTIONS + \" AS etq ON q.\" +\r\n KEY_ID + \" = etq.\" + KEY_QID +\r\n \" WHERE etq.\" + KEY_EID + \" = \" + eId + \" AND etq.\" + KEY_TID + \" = \" + tId + \" ORDER BY RANDOM()\";\r\n SQLiteDatabase db = this.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n if(cursor.moveToFirst()){\r\n do{\r\n Question question = new Question();\r\n question.setId(cursor.getInt(cursor.getColumnIndex(KEY_QID)));\r\n question.setQuestion(cursor.getString(cursor.getColumnIndex(KEY_QUESTION)));\r\n question.setAnswer(cursor.getString(cursor.getColumnIndex(KEY_ANSWER)));\r\n question.setExplanation(cursor.getString(cursor.getColumnIndex(KEY_EXPLANATION)));\r\n question.setOptA(cursor.getString(cursor.getColumnIndex(KEY_OPT_A)));\r\n question.setOptB(cursor.getString(cursor.getColumnIndex(KEY_OPT_B)));\r\n question.setOptC(cursor.getString(cursor.getColumnIndex(KEY_OPT_C)));\r\n question.setOptD(cursor.getString(cursor.getColumnIndex(KEY_OPT_D)));\r\n\r\n questions.add(question);\r\n\r\n } while (cursor.moveToNext());\r\n }\r\n\r\n\r\n\r\n cursor.close();\r\n db.close();\r\n return questions;\r\n }", "public QuestionElement getQuestion(){\r\n\t\treturn ques;\r\n\t}", "@Override\r\n\tpublic List<Yquestion> queryYquestion(int qid) {\n\t\treturn ym.queryYquestion(qid);\r\n\t}", "public String get_question(){return this._question;}", "List<Question14> selectByExample(Question14Example example);", "@Test\n public void testGetQuestions() throws Exception {\n\n LinkedMultiValueMap<String, String> requestParams = new LinkedMultiValueMap<>();\n requestParams.add(\"category\", \"10\");\n requestParams.add(\"difficulty\", \"easy\");\n\n mvc.perform(get(\"/questions\").params(requestParams)).andExpect(status().isOk())\n .andExpect(jsonPath(\"$\").isArray()).andExpect(jsonPath(\"$\", hasSize(5)));\n }", "public List<DataQuestion> getAllAnswer(){\n return items;\n }", "@Override\n\t@Query(\"SELECT category FROM NFBCheckList WHERE nfb_qn_id= :nfb_qn_id\")\n String getCategoryByQnID(@Param(\"nfb_qn_id\") int category);", "public void answerQuestion(){\n for (int i = 0; i < questionList.size(); i++){\r\n if (questionList.get(i).question.startsWith(\"How\")){\r\n howQuestions.add(new Question(questionList.get(i).id, questionList.get(i).question, questionList.get(i).answer));\r\n }\r\n }\r\n\r\n // Print All When Questions\r\n System.out.println(\"How Questions\");\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n System.out.println(howQuestions.get(i).question);\r\n }\r\n\r\n //==== Question Entities ====\r\n // Split All When Question to only questions that have the entities\r\n if (!howQuestions.isEmpty()){\r\n if (!questionEntities.isEmpty()){\r\n for (int c = 0; c < questionEntities.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionEntities.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n if (!questionTags.isEmpty()){\r\n for (int c = 0; c < questionTags.size(); c++){\r\n for (int i = 0; i < howQuestions.size(); i++){\r\n if (howQuestions.get(i).question.contains(questionTags.get(c))){\r\n answers.add(new Question(howQuestions.get(i).id, howQuestions.get(i).question, howQuestions.get(i).answer));\r\n }\r\n }\r\n }\r\n }\r\n else{\r\n System.out.println(\"There no answer for your question !\");\r\n System.exit(0);\r\n }\r\n }\r\n }\r\n\r\n // Print All Entities Questions\r\n System.out.println(\"Questions of 'How' that have entities and tags :\");\r\n for (int i = 0; i < answers.size(); i++){\r\n for (int j = 1; j < answers.size(); j++){\r\n if (answers.get(i).id == answers.get(j).id){\r\n answers.remove(j);\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < answers.size(); i++){\r\n System.out.println(answers.get(i).question);\r\n }\r\n\r\n\r\n //==== Question Tags ====\r\n for (int i = 0; i < questionTags.size(); i++){\r\n for (int k = 0; k < answers.size(); k++){\r\n if (answers.get(k).question.contains(questionTags.get(i))){\r\n continue;\r\n }\r\n else{\r\n answers.remove(k);\r\n }\r\n }\r\n }\r\n }", "public List<String> getTierOneAnswersCategories(Integer productId) {\n\tList<String> list = getHibernateTemplate().find(\"select cat.name from Category cat , Response resp, Request req where resp.requestId = req.id and req.productId=? and req.tier=1 and cat.categoryCode= resp.answer)\", productId); \n\treturn list;\n\n }", "@Override\n\t@Transactional\n\tpublic List<Question> getQuestionsByTestId(int id) {\n\t\treturn questionDao.getQuestionsByTestId(id);\n\t}", "public abstract void selectQuestion();", "public Map<String ,String> GetMultipleChoiceQ(int AssessmentId) {\n Map<String, String> map = new HashMap<String, String>();\n List<String> indexes = GetAssessmentIndexes(AssessmentId);\n\n for (String index : indexes) {\n try {\n Statement stmt = Con.createStatement();\n String query = String.format(\"SELECT qora, content FROM dqs_qanda WHERE \" +\n \"((SELECT content FROM dqs_qanda WHERE qora = 'question%s_t') = 'm') AND (qora='question%s' OR qora = 'question%s_q1' \" +\n \"OR qora = 'question%s_q2' OR qora = 'question%s_q3' or qora = 'question%s_c')\", index, index, index, index, index, index);\n //System.out.println(query);\n ResultSet rs = stmt.executeQuery(query);\n while(rs.next()) {\n map.put(rs.getString(\"qora\"), rs.getString(\"content\"));\n }\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }\n return map;\n }", "public void printQuestions()\r\n\t{\r\n\t\tfor(int i = 0; i < questions.size(); i++)\r\n\t\t{\r\n\t\t\tString q = questions.get(i).toString();\r\n\t\t\tSystem.out.println( (i+1) + \". \" + q);\r\n\t\t}\r\n\t}", "List<Question27> selectByExample(Question27Example example);", "@GetMapping(\"/quiz/all/{qid}\")\n\tpublic ResponseEntity<?> getQuestionsOfQuizAdmin(@PathVariable(\"qid\") Long qid){\n\t\tQuiz quiz = new Quiz();\n\t\tquiz.setqId(qid);\n\t\tSet<Question> questionsOfQuiz = this.questionService.getQuestionOfQuiz(quiz);\n\t\treturn ResponseEntity.ok(questionsOfQuiz);\t\t\n\t}", "ArrayList<Integer> getAnswers (Integer q) {\n\t\tif (results.containsKey(q)) {\n\t\t\treturn results.get(q);\n\t\t} else {\n\t\t\tSystem.out.println(\"No answers found.\");\n\t\t\treturn null;\n\t\t}\n\t}", "public SurveyQuestion getQuestion (int idx)\n {\n if (idx >= 0 && idx < questions.size()) {\n return questions.get(idx);\n }\n return null;\n }", "public ArrayList<Integer> getQuestionIDs(int cID) {\n ArrayList<Integer> questions = new ArrayList<Integer>();\n String query;\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT question_ID FROM question WHERE category_ID='\" + cID + \"';\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n questions.add(rs.getInt(\"question_ID\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n return questions;\n }", "protected IQuestionCollection getQuestions() {\n\t\treturn fQuestions;\n\t}", "public Questions getQuestion(int qid) {\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tQuestions quest = (Questions) session.get(Questions.class, qid);\n\t\tsession.close();\n\t\treturn quest;\n\t}", "public List<Questions> getAllQuestionsMedium() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 11 AND 20\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public QuestionDetailExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "List<Discuss> selectByExample(DiscussExample example);", "public static synchronized ArrayList<QAQuestions> fetchAllQuestions(\n\t\t\tContext context, String query) throws SQLException,\n\t\t\tNullPointerException {\n\n\t\tQADatabaseHelper dbHelper = QADatabaseHelper.getInstance(context);\n\t\tSQLiteDatabase db = dbHelper.getReadableDatabase();\n\n\t\tArrayList<QAQuestions> questionsList = null;\n\n\t\tCursor cursor = null;\n\t\ttry {\n\t\t\tcursor = db.rawQuery(query, null);\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t\tcursor.moveToFirst();\n\t\tif (cursor != null && cursor.getCount() > 0) {\n\t\t\tquestionsList = new ArrayList<QAQuestions>();\n\t\t\tfor (cursor.moveToFirst(); !cursor.isAfterLast(); cursor\n\t\t\t\t\t.moveToNext()) {\n\n\t\t\t\tQAQuestions question = new QAQuestions();\n\n\t\t\t\tquestion.setPrimaryKey(cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_PRIMARY_KEY)));\n\t\t\t\tquestion.setQuestion(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_QUESTION)));\n\t\t\t\tquestion.setOptionOne(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_OPTION1)));\n\t\t\t\tquestion.setOptionTwo(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_OPTION2)));\n\t\t\t\tquestion.setOptionThree(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_OPTION3)));\n\t\t\t\tquestion.setOptionFour(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_OPTION4)));\n\t\t\t\tquestion.setAnswer(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_ANSWER)));\n\t\t\t\tquestion.setUpdatedAt(cursor.getString(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_UPDATED_AT)));\n\t\t\t\tquestion.setFetched((cursor.getInt(cursor\n\t\t\t\t\t\t.getColumnIndex(COLUMN_NAME_IS_FETCHED)) == 1) ? true\n\t\t\t\t\t\t: false);\n\t\t\t\tquestionsList.add(question);\n\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn questionsList;\n\t}", "@Override\n\tpublic ArrayList<String> fetchAnswer(HttpServletRequest request, int questionNum) {\n\t\tArrayList<String> ansList = new ArrayList<String> ();\n\t\tString ans = request.getParameter(\"answer\" + Integer.toString(questionNum));\n if (ans == null) {\n \tSystem.out.println(\"answer\" + Integer.toString(questionNum));\n \tans = (String)request.getSession().getAttribute(\"answer\" + Integer.toString(questionNum)) ;\n \tSystem.out.println(\"hello\");\n \tif (ans == null || ans.equals(\"null\")) {\n ans = \"\";\n \t}\n }\n ansList.add(ans);\n return ansList;\n\t}", "public Observable<QuestionContainer> getQuestions(String title) {\n return stackoverflowApiService.getQuestions(title)\n .toObservable();\n }", "public List<Questions> getAllQuestionsHard() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 1 AND 10\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public List<Survey> getSurveybyTid(int tid);", "private void setFAQs () {\n\n QuestionDataModel question1 = new QuestionDataModel(\n \"What is Psychiatry?\", \"Psychiatry deals with more extreme mental disorders such as Schizophrenia, where a chemical imbalance plays into an individual’s mental disorder. Issues coming from the “inside” to “out”\\n\");\n QuestionDataModel question2 = new QuestionDataModel(\n \"What Treatments Do Psychiatrists Use?\", \"Psychiatrists use a variety of treatments – including various forms of psychotherapy, medications, psychosocial interventions, and other treatments (such as electroconvulsive therapy or ECT), depending on the needs of each patient.\");\n QuestionDataModel question3 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"A psychiatrist is a medical doctor (completed medical school and residency) with special training in psychiatry. A psychologist usually has an advanced degree, most commonly in clinical psychology, and often has extensive training in research or clinical practice.\");\n QuestionDataModel question4 = new QuestionDataModel(\n \"What is Psychology ?\", \"Psychology is the scientific study of the mind and behavior, according to the American Psychological Association. Psychology is a multifaceted discipline and includes many sub-fields of study such areas as human development, sports, health, clinical, social behavior, and cognitive processes.\");\n QuestionDataModel question5 = new QuestionDataModel(\n \"What is psychologists goal?\", \"Those with issues coming from the “outside” “in” (i.e. lost job and partner so feeling depressed) are better suited with psychologists, they offer guiding you into alternative and healthier perspectives in tackling daily life during ‘talk therapy’\");\n QuestionDataModel question6 = new QuestionDataModel(\n \"What is the difference between psychiatrists and psychologists?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question7 = new QuestionDataModel(\n \"What is a behavioural therapist?\", \"A behavioural therapist such as an ABA (“Applied Behavioural Analysis”) therapist or an occupational therapist focuses not on the psychological but rather the behavioural aspects of an issue. In a sense, it can be considered a “band-aid” fix, however, it has consistently shown to be an extremely effective method in turning maladaptive behaviours with adaptive behaviours.\");\n QuestionDataModel question8 = new QuestionDataModel(\n \"Why behavioral therapy?\", \"Cognitive-behavioral therapy is used to treat a wide range of issues. It's often the preferred type of psychotherapy because it can quickly help you identify and cope with specific challenges. It generally requires fewer sessions than other types of therapy and is done in a structured way.\");\n QuestionDataModel question9 = new QuestionDataModel(\n \"Is behavioral therapy beneficial?\", \"Psychiatrists can prescribe and psychologists cannot, they may be able to build a report and suggest medications to a psychiatrist but it is the psychiatrist that has the final say.\");\n QuestionDataModel question10 = new QuestionDataModel(\n \"What is alternative therapy?\", \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\");\n QuestionDataModel question11 = new QuestionDataModel(\n \"Can they treat mental health problems?\", \"Complementary and alternative therapies can be used as a treatment for both physical and mental health problems. The particular problems that they can help will depend on the specific therapy that you are interested in, but many can help to reduce feelings of depression and anxiety. Some people also find they can help with sleep problems, relaxation, and feelings of stress.\");\n QuestionDataModel question12 = new QuestionDataModel(\n \"What else should I consider before starting therapy?\", \"Only you can decide whether a type of treatment feels right for you, But it might help you to think about: What do I want to get out of it? Could this therapy be adapted to meet my needs?\");\n\n ArrayList<QuestionDataModel> faqs1 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs2 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs3 = new ArrayList<>();\n ArrayList<QuestionDataModel> faqs4 = new ArrayList<>();\n faqs1.add(question1);\n faqs1.add(question2);\n faqs1.add(question3);\n faqs2.add(question4);\n faqs2.add(question5);\n faqs2.add(question6);\n faqs3.add(question7);\n faqs3.add(question8);\n faqs3.add(question9);\n faqs4.add(question10);\n faqs4.add(question11);\n faqs4.add(question12);\n\n\n CategoryDataModel category1 = new CategoryDataModel(R.drawable.psychaitry,\n \"Psychiatry\",\n \"Psychiatry is the medical specialty devoted to the diagnosis, prevention, and treatment of mental disorders.\",\n R.drawable.psychiatry_q);\n\n CategoryDataModel category2 = new CategoryDataModel(R.drawable.psychology,\n \"Psychology\",\n \"Psychology is the science of behavior and mind which includes the study of conscious and unconscious phenomena.\",\n R.drawable.psychology_q);\n\n CategoryDataModel category3 = new CategoryDataModel(R.drawable.behavioral_therapy,\n \"Behavioral Therapy\",\n \"Behavior therapy is a broad term referring to clinical psychotherapy that uses techniques derived from behaviorism\",\n R.drawable.behaviour_therapy_q);\n CategoryDataModel category4 = new CategoryDataModel(R.drawable.alternative_healing,\n \"Alternative Therapy\",\n \"Complementary and alternative therapies typically take a holistic approach to your physical and mental health.\",\n R.drawable.alternative_therapy_q);\n\n String FAQ1 = \"What is Psychiatry?\";\n String FAQ2 = \"What is Psychology?\";\n String FAQ3 = \"What is Behavioral Therapy?\";\n String FAQ4 = \"What is Alternative Therapy?\";\n String FAQ5 = \"Report a problem\";\n\n FAQsDataModel FAQsDataModel1 = new FAQsDataModel(FAQ1, category1,faqs1);\n FAQsDataModel FAQsDataModel2 = new FAQsDataModel(FAQ2, category2,faqs2);\n FAQsDataModel FAQsDataModel3 = new FAQsDataModel(FAQ3, category3,faqs3);\n FAQsDataModel FAQsDataModel4 = new FAQsDataModel(FAQ4, category4,faqs4);\n FAQsDataModel FAQsDataModel5 = new FAQsDataModel(FAQ5, category4,faqs4);\n\n\n\n if (mFAQs.isEmpty()) {\n\n mFAQs.add(FAQsDataModel1);\n mFAQs.add(FAQsDataModel2);\n mFAQs.add(FAQsDataModel3);\n mFAQs.add(FAQsDataModel4);\n mFAQs.add(FAQsDataModel5);\n\n\n }\n }", "public List<Questions> getAllQuestionsEasy() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 21 AND 30\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public int getQue(Connection con, String queType, Vector queVec, int catId, long steEntId)\n throws SQLException, cwException {\n PreparedStatement stmt = null;\n ResultSet rs = null;\n int recTotal = 0;\n try {\n String conditionSQL = this.getCatIdConditionSQL(catId);\n String sortSQL = getQueSortSQL();\n stmt = con.prepareStatement(GET_QUE + conditionSQL + sortSQL);\n int index = 1;\n stmt.setString(index++, KnowCatalogRelationDAO.QUE_PARENT_KCA);\n stmt.setBoolean(index++, true);\n stmt.setLong(index++, steEntId);\n stmt.setString(index++, KnowAnswerDAO.ANS_STATUS_OK);\n stmt.setString(index++, KnowQuestionDAO.QUE_STATUS_OK);\n stmt.setString(index++, queType);\n if (catId != 0) {\n stmt.setString(index++, KnowCatalogRelationDAO.KCA_PARENT_KCA);\n }\n rs = stmt.executeQuery();\n while (rs.next()) {\n recTotal++;\n if (queVec == null) {\n queVec = new Vector();\n }\n if (recTotal >= page_start_num && recTotal <= page_end_num) {\n KnowQuestionBean knowQueBean = new KnowQuestionBean();\n knowQueBean.setKca_id(rs.getInt(\"kca_id\"));\n knowQueBean.setKca_title(rs.getString(\"kca_title\"));\n knowQueBean.setQue_id(rs.getInt(\"que_id\"));\n knowQueBean.setQue_title(rs.getString(\"que_title\"));\n knowQueBean.setQue_create_timestamp(rs.getTimestamp(\"que_create_timestamp\"));\n knowQueBean.setQue_type(queType);\n knowQueBean.setQue_popular_ind(rs.getBoolean(\"que_popular_ind\"));\n knowQueBean.setAns_count(rs.getInt(\"ans_count\"));\n queVec.add(knowQueBean);\n }\n }\n } finally {\n if (rs != null) {\n rs.close();\n }\n if (stmt != null) {\n stmt.close();\n }\n }\n return recTotal;\n }", "Question getQuestionInDraw(String questionId);", "@Test\n\tpublic void testGetSubCategoryL1() {\n\t\tString subCategoryL1 = rmitAnalyticsModel.getSubCategoryL1();\n\t\tAssert.assertNotNull(subCategoryL1);\n\t\tAssert.assertEquals(\"content\", subCategoryL1);\n\t}", "@GetMapping(\"/quiz/{qid}\")\n\tpublic ResponseEntity<?> getQuestionsOfQuiz(@PathVariable(\"qid\") Long qid){\n\t\tQuiz quiz = this.quizService.getQuiz(qid);\n\t\tSet<Question> questions = quiz.getQuestions();\n\t\tList<Question> list = new ArrayList<>(questions);\n\t\tif(list.size() > Integer.parseInt(quiz.getNumberOfQuestions())) {\n\t\t\tlist = list.subList(0, Integer.parseInt(quiz.getNumberOfQuestions()));\n\t\t}\n\t\t\n\t\tlist.forEach((q)-> {\n\t\t\tq.setAnswer(\"\");\n\t\t});\n\t\t\n\t\tCollections.shuffle(list);\n\t\treturn ResponseEntity.ok(list);\n\t}", "public ArrayList<SingleQuestion> getAllQuestions(String difficulty) {\n ArrayList<SingleQuestion> questionsList = new ArrayList<>();\n String selectQuery = \"SELECT id,question,A,B,C,D,answer,explanation,category,difficulty FROM quizMaster where difficulty='\" + difficulty + \"'\";\n Log.d(\"Select Query\", \"selectQuery\" + selectQuery);\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n SingleQuestion singleQuestion = new SingleQuestion();\n singleQuestion.setId(String.valueOf(cursor.getInt(0)));\n singleQuestion.setQuestion(cursor.getString(1));\n singleQuestion.setOptionA(cursor.getString(2));\n singleQuestion.setOptionB(cursor.getString(3));\n singleQuestion.setOptionC(cursor.getString(4));\n singleQuestion.setOptionD(cursor.getString(5));\n singleQuestion.setAnswer(cursor.getString(6));\n singleQuestion.setExplanation(cursor.getString(7));\n singleQuestion.setCategory(cursor.getString(8));\n singleQuestion.setDifficulty(cursor.getString(9));\n questionsList.add(singleQuestion);\n } while (cursor.moveToNext());\n }\n \n return questionsList;\n }", "protected static List<Question> fetch(Connection connection)\n throws ApplicationException {\n // LOGGER.fine(\"Perform 'SELECT' on table \" +\n // QuestionDatabaseAccess.TABLE);\n\n List<Question> result = new LinkedList<>();\n\n StringBuilder sqlQuery = new StringBuilder(\"\");\n sqlQuery.append(\"SELECT * FROM \" + TABLE);\n\n PreparedStatement statement = null;\n try {\n try {\n statement = connection.prepareStatement(sqlQuery.toString());\n\n ResultSet resultSet = statement.executeQuery();\n result = convertToInstances(resultSet);\n } finally {\n if (statement != null) {\n statement.close();\n }\n }\n } catch (SQLException e) {\n throw new ApplicationException(\"Failed to fetch\", e);\n }\n\n return result;\n }", "@Query(\"SELECT * FROM wellbeing_questions WHERE activity_type == :activityType\")\n List<WellbeingQuestion> getQuestionsByActivityType(String activityType);", "List<FAQModel> getFAQs();", "public static Object[] loadQuestions(String surveyId, String serverBase)\r\n \t\t\tthrows Exception {\r\n \t\tObject[] results = new Object[2];\r\n \t\tMap<String, String> questions = new HashMap<String, String>();\r\n \t\tList<QuestionGroupDto> groups = fetchQuestionGroups(serverBase,\r\n \t\t\t\tsurveyId);\r\n \t\tList<String> keyList = new ArrayList<String>();\r\n \t\tif (groups != null) {\r\n \t\t\tfor (QuestionGroupDto group : groups) {\r\n \t\t\t\tList<QuestionDto> questionDtos = fetchQuestions(serverBase,\r\n \t\t\t\t\t\tgroup.getKeyId());\r\n \t\t\t\tif (questionDtos != null) {\r\n \t\t\t\t\tfor (QuestionDto question : questionDtos) {\r\n \t\t\t\t\t\tkeyList.add(question.getKeyId().toString());\r\n \t\t\t\t\t\tquestions.put(question.getKeyId().toString(), question\r\n \t\t\t\t\t\t\t\t.getText());\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\tresults[0] = keyList;\r\n \t\tresults[1] = questions;\r\n \t\treturn results;\r\n \t}", "@GetMapping(value=\"/getAll\")\n\tpublic List<Question> getAll(){\n\t\tLOGGER.info(\"Viewing all questions\");\n\t\treturn questionObj.viewAllQuestions();\n\t}", "public Question getQuestion(String questionId) {\r\n Question[] questions = currentProcessInstance.getQuestions();\r\n Question foundQuestion = null;\r\n \r\n for (int i = 0; foundQuestion == null && i < questions.length; i++) {\r\n if (questions[i].getId().equals(questionId))\r\n foundQuestion = questions[i];\r\n }\r\n \r\n return foundQuestion;\r\n }", "public List<Subject> getsixthsubj(String course) {\n\t\treturn sub_dao.getsixthsubj(course);\r\n\t}", "public List<Answer> getAnswers(Integer qusetionCsddId, String qusetionHash) throws MyCustException {\n logger.debug(\"qusetionCsddId \" + qusetionCsddId + \"qusetionHash\" + qusetionHash);\n Connection sqlCon = apacheDerbyClient.getSqlConn();\n List<Answer> answers = new ArrayList<Answer>();\n\n try {\n String sql2 = \"select answer, answerCSDDid from \" + Storage.schemName + \".\" + Storage.TABLE_QUESTION_ANSWERS_LINKER + \" \" +\n \"where 1 = 1 \";\n\n if ((qusetionCsddId != null) && (qusetionCsddId != 0))\n sql2 += \" and questionCSDDid = \" + qusetionCsddId;\n\n if (!qusetionHash.isEmpty())\n sql2 += \" and question = '\" + qusetionHash + \"'\";\n logger.debug(sql2);\n PreparedStatement ps = sqlCon.prepareStatement(sql2);\n\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n Answer answer = new Answer();\n answer.setAnswerHash(rs.getString(\"answer\"));\n answer.setAnswerCsddId(rs.getInt(\"answerCsddId\"));\n\n String sql = \"select answtxt, CSDDid, answcor from \" + Storage.schemName + \".\" + Storage.TABLE_ANSWERS + \" \" +\n \"where CSDDid = \" + answer.getAnswerCsddId() + \" and \" +\n \"hash = '\" + answer.getAnswerHash() + \"'\";\n logger.debug(sql2);\n PreparedStatement ps2 = sqlCon.prepareStatement(sql);\n\n ResultSet rs2 = ps2.executeQuery();\n while (rs2.next()) {\n answer.setAnswerText(rs2.getString(\"answtxt\"));\n answer.setCorrect(rs2.getBoolean(\"answcor\"));\n\n if (!answers.contains(answer))\n answers.add(answer);\n else\n logger.warn(\"records in Answers duplicating !!!: \" + answer.toString());\n }\n }\n } catch (Exception ex) {\n logger.error(\"\", ex);\n }\n return answers;\n }" ]
[ "0.6351466", "0.62942266", "0.6090655", "0.60417324", "0.6041002", "0.6038033", "0.60167545", "0.5925638", "0.58299416", "0.580121", "0.5799497", "0.5761837", "0.5745594", "0.5717987", "0.5609953", "0.56011415", "0.5557441", "0.5536663", "0.55302584", "0.5514998", "0.5511217", "0.5509443", "0.55077004", "0.5476343", "0.5472714", "0.5446163", "0.54351586", "0.5426853", "0.54163975", "0.54163975", "0.54163975", "0.54163975", "0.5413957", "0.5400677", "0.53939646", "0.53804016", "0.537817", "0.5359367", "0.53418696", "0.5327007", "0.5326877", "0.5317722", "0.5315161", "0.5283012", "0.52612734", "0.52523476", "0.52506655", "0.5250496", "0.52491045", "0.52482575", "0.5243257", "0.52376866", "0.52260697", "0.5224416", "0.5219647", "0.5208942", "0.52088225", "0.5206702", "0.5191057", "0.51847494", "0.51757663", "0.5172415", "0.5169224", "0.5162807", "0.51587486", "0.51568896", "0.515047", "0.51418215", "0.51381797", "0.5137559", "0.5131008", "0.51107836", "0.5101242", "0.5100252", "0.50980496", "0.5095778", "0.5084517", "0.508283", "0.507971", "0.5073034", "0.5061773", "0.50463957", "0.5035455", "0.50344205", "0.50325567", "0.5026497", "0.50169665", "0.50132984", "0.50086915", "0.50078106", "0.5002487", "0.5000987", "0.4992162", "0.49882606", "0.49816662", "0.4981591", "0.4980843", "0.49805614", "0.49736956", "0.49699205" ]
0.70494723
0
BEGIN ASSESSMENT FOR A PARTICULAR PROJECT
public void beginAssessment(long projectKey) { assessmentDao.beginAssessment(projectKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String enableSubmission(ISubmissionProject project);", "@Given(\"I am on the Project Contact Details Page\")\n public void i_am_on_the_project_contact_details_page(){\n i_logged_into_Tenant_Manager_Project_list_page();\n i_click_on_create_a_new_project();\n\n }", "@Given(\"I am on the Home Page\")\n public void i_am_on_the_home_page(){\n i_logged_into_Tenant_Manager_Project_list_page();\n\n }", "@SystemAPI\n\tboolean needsApproval();", "@Given(\"^customer open the application$\")\r\n\tpublic void customer_open_the_application() throws Throwable {\n\r\n\t\tSystem.out.println(\"my scripts are execting\");\r\n\t\tthrow new PendingException();\r\n\t}", "public static void main(String[] args) throws SessionException, AbpException, NotAuthorizedException {\n ObjectCommunicator objectCommunicator = ObjectCommunicator.getSharedInstance();\n try {\n objectCommunicator.login(\"lvs\", \"a\", \"1\", \"http://localhost:8080/abp\");\n } catch (Exception e) {\n }\n System.getProperties().put(\"exec.url\", \"http://localhost:8080/abp\");\n AbpSettings.getInstance().initForClient();\n\n // AbpManager abpManager = AbpManager.loginAsGuest(\"oracle\");\n\n // ProgrammeHelper.checkCombination(150L, 235L, 2, abpManager.makeWorkspace(\"oracle\"));\n\n }", "void startTA() {\r\n ta_employeeAccount.appendText(\"Are you an employee with the shelter? \\n\" +\r\n \"enter your Last name and First Name \\n\" +\r\n \"Then enter a Password to create an account \\n\\n\" +\r\n \"P.S dont forget the employee code given \\n\" +\r\n \"by the shelter\");\r\n }", "Session begin();", "public FreeStyleProject setupProjectForAuth(WebClient loggedInAdmin) \n throws Exception {\n FreeStyleProject job = this.createFreeStyleProject();\n HtmlPage jobConfigPage = (HtmlPage) loggedInAdmin.\n goTo(job.getShortUrl() + \"configure\");\n jobConfigPage = (HtmlPage) Util.setText(jobConfigPage, PROJECT_ID, \n CN_PROJECT_NAME);\n this.submitForm(jobConfigPage, JOB_FORM_NAME);\n return job;\n }", "@Before\n public void before() {\n Study studyToCreate = TestUtils.getValidStudy(this.getClass());\n studyToCreate.setExternalIdRequiredOnSignup(false);\n studyToCreate.setExternalIdValidationEnabled(false);\n studyToCreate.setTaskIdentifiers(Sets.newHashSet(\"taskId\"));\n study = studyService.createStudy(studyToCreate);\n\n Schedule schedule = new Schedule();\n schedule.setLabel(\"Schedule Label\");\n schedule.setScheduleType(ScheduleType.RECURRING);\n schedule.setInterval(\"P1D\");\n schedule.setExpires(\"P1D\");\n schedule.addTimes(\"10:00\");\n schedule.addActivity(new Activity.Builder().withLabel(\"label\").withTask(\"taskId\").build());\n \n SimpleScheduleStrategy strategy = new SimpleScheduleStrategy(); \n strategy.setSchedule(schedule);\n \n schedulePlan = new DynamoSchedulePlan();\n schedulePlan.setLabel(\"Label\");\n schedulePlan.setStudyKey(study.getIdentifier());\n schedulePlan.setStrategy(strategy);\n schedulePlan = schedulePlanService.createSchedulePlan(study, schedulePlan);\n }", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "private static void finalise_project() {\r\n\t\tDate deadline_date = null;\r\n\t\tint paid = 0;\r\n\t\tint charged = 0;\r\n\t\tString project_name = \"\";\r\n\t\tString email = \"\";\r\n\t\tString number = \"\";\r\n\t\tString full_name = \"\";\r\n\t\tString address = \"\";\r\n\t\tDate completion_date = null;\r\n\t\t\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\t// Allows for user input\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Select a project ID to modify it.\");\r\n\t\t\t\r\n\t\t\t// Prints out all project ids and names that are not complete:\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id INNER JOIN people ON projects.project_id = people.projects \"\r\n\t\t\t\t\t+ \"WHERE project_statuses.status <>'Complete';\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t// This creates a list of project ids to check that the user only selects an available one\r\n\t\t\tArrayList<Integer> project_id_list = new ArrayList<Integer>(); \r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"ID: \" + project_rset.getInt(\"project_id\") + \", Name:\" + project_rset.getString(\"project_name\"));\r\n\t\t\t\tproject_id_list.add(project_rset.getInt(\"project_id\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Allows user to select a project to finalize \r\n\t\t\tBoolean select_project = true;\r\n\t\t\tint project_id = 0;\r\n\t\t\twhile (select_project == true) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \");\r\n\t\t\t\tString project_id_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tproject_id = Integer.parseInt(project_id_str);\r\n\t\t\t\t\tfor (int i = 0; i < project_id_list.size(); i ++) {\r\n\t\t\t\t\t\tif (project_id == project_id_list.get(i)) { \r\n\t\t\t\t\t\t\tselect_project = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (select_project == true) {\r\n\t\t\t\t\t\tSystem.out.println(\"Please only select an available project id.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for project number is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The project number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Gets values needed from the selected project\r\n\t\t\tResultSet project_select_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_select_rset.next()) {\r\n\t\t\t\tif (project_select_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tproject_id = project_select_rset.getInt(\"project_id\");\r\n\t\t\t\t\tproject_name = project_select_rset.getString(\"project_name\");\r\n\t\t\t\t\tdeadline_date = project_select_rset.getDate(\"deadline_date\");\r\n\t\t\t\t\tpaid = project_select_rset.getInt(\"paid\");\r\n\t\t\t\t\tcharged = project_select_rset.getInt(\"charged\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Gets values needed from related customer\r\n // This gets the created project's table id to use to update the people and project_statuses tables \r\n\t\t\tString strSelectCustomer = String.format(\"SELECT * FROM people WHERE projects = '%s'\", project_id);\r\n\t\t\tResultSet customer_rset = stmt.executeQuery(strSelectCustomer);\r\n\t\t\twhile (customer_rset.next()) {\r\n\t\t\t\tfull_name = customer_rset.getString(\"name\") + \" \" + customer_rset.getString(\"surname\");\r\n\t\t\t\taddress = customer_rset.getString(\"address\");\r\n\t\t\t\temail = customer_rset.getString(\"email_address\");\r\n\t\t\t\tnumber = customer_rset.getString(\"telephone_number\");\r\n\t\t\t}\r\n\r\n\t\t\t// This updates the completion date\r\n\t\t\tBoolean update_completion_date = true;\r\n\t\t\twhile (update_completion_date == true) {\r\n\t\t\t\tSystem.out.print(\"Date Complete (YYYY-MM-DD): \");\r\n\t\t\t\tString completion_date_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcompletion_date = Date.valueOf(completion_date_str);\r\n\t\t\t\t\tupdate_completion_date = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for the completion date is in the wrong format\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The date must be in the format YYYY-MM-DD (eg. 2013-01-13). Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Updates the value\r\n\t\t\tPreparedStatement ps_finalise = conn.prepareStatement(\r\n\t\t\t\t\t\"UPDATE project_statuses SET completion_date = ?, status = ? WHERE project_id = ?;\");\r\n\t\t\tps_finalise.setDate(1, completion_date);\r\n\t\t\tps_finalise.setString(2, \"Complete\");\r\n\t\t\tps_finalise.setInt(3, project_id);\r\n\t\t\tps_finalise.executeUpdate();\r\n\t\t\tSystem.out.println(\"\\nUpdated completion date to \" + completion_date + \".\\n\");\r\n\t\t}\t\r\n\t\t/**\r\n\t\t * @exception If the project status table cannot be updated because of field constraints then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\tcatch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t// Calculates the amount due and prints out an invoice\r\n\t\tint due = charged - paid;\r\n\t\tif (due > 0) {\r\n\t\t\tString content = \"\\t\\t\\t\\tInvoice\\n\" + \r\n\t\t\t\t\t\"\\nDate: \" + completion_date +\r\n\t\t\t\t\t\"\\n\\nName: \" + full_name +\r\n\t\t\t\t\t\"\\nContact Details: \" + email + \"\\n\" + number + \r\n\t\t\t\t\t\"\\nAddress: \" + address + \r\n\t\t\t\t\t\"\\n\\nAmount due for \" + project_name + \r\n\t\t\t\t\t\":\\nTotal Cost:\\t\\t\\t\\t\\t\\t\\tR \" + charged + \r\n\t\t\t\t\t\"\\nPaid: \\t\\t\\t\\t\\t\\t\\tR \" + paid +\r\n\t\t\t\t\t\"\\n\\n\\nDue: \\t\\t\\t\\t\\t\\t\\tR \" + due;\r\n\t\t\tCreateFile(project_name);\r\n\t\t\tWriteToFile(project_name, content);\r\n\t\t}\r\n\t}", "protected void saveProject(Project theProject)\n throws HttpPresentationException, webschedulePresentationException\n { \n\n String proj_name = this.getComms().request.getParameter(PROJ_NAME);\n String personID = this.getComms().request.getParameter(PERSONID);\n String password = this.getComms().request.getParameter(PASSWORD);\n String discrib = this.getComms().request.getParameter(DISCRIB);\n String indexnum = this.getComms().request.getParameter(INDEXNUM);\n String thours = this.getComms().request.getParameter(THOURS);\n String dhours = this.getComms().request.getParameter(DHOURS);\n String codeofpay = this.getComms().request.getParameter(CODEOFPAY);\n\nString contactname = this.getComms().request.getParameter(CONTACTNAME);\n\tString contactphone = this.getComms().request.getParameter(CONTACTPHONE);\n\tString contactemail = this.getComms().request.getParameter(CONTACTEMAIL);\n\tString billaddr1 = this.getComms().request.getParameter(BILLADDR1);\n\tString billaddr2 = this.getComms().request.getParameter(BILLADDR2);\n\tString billaddr3 = this.getComms().request.getParameter(BILLADDR3);\n\tString city = this.getComms().request.getParameter(CITY);\n\tString state = this.getComms().request.getParameter(STATE);\n\tString zip = this.getComms().request.getParameter(ZIP);\n\t//String accountid = this.getComms().request.getParameter(ACCOUNTID);\n\t//String isoutside = this.getComms().request.getParameter(OUTSIDE);\n\t//String exp = this.getComms().request.getParameter(EXP);\n\tString expday = this.getComms().request.getParameter(EXPDAY);\n\tString expmonth = this.getComms().request.getParameter(EXPMONTH);\n\tString expyear = this.getComms().request.getParameter(EXPYEAR);\n\t\n\tString iexpday = this.getComms().request.getParameter(IEXPDAY);\n\tString iexpmonth = this.getComms().request.getParameter(IEXPMONTH);\n\tString iexpyear = this.getComms().request.getParameter(IEXPYEAR);\n\t\n\tString notes = this.getComms().request.getParameter(NOTES);\n\n String irbnum = this.getComms().request.getParameter(IRBNUM);\n\n System.out.println(\" Notes off save module \"+ notes);\n\nString notifycontact = this.getComms().request.getParameter(NOTIFYCONTACT);\n\n\njava.sql.Date moddatesql;\n //calculation for the time right now\n \tCalendar cancelinfo = Calendar.getInstance();\n \tint todaydate = cancelinfo.get(cancelinfo.DAY_OF_MONTH);\n \tint todaymonth = cancelinfo.get(cancelinfo.MONTH);\n\ttodaymonth= todaymonth+1;\n \tint todayyear = cancelinfo.get(cancelinfo.YEAR);\n\tString tempmod = todayyear+\"-\"+todaymonth+\"-\"+todaydate;\nmoddatesql=java.sql.Date.valueOf(tempmod);\n\njava.sql.Date iacucsql,didate;\n\nString tempiacuc = iexpyear+\"-\"+iexpmonth+\"-\"+iexpday;\niacucsql=java.sql.Date.valueOf(tempiacuc);\n//get old project information\n// Write to the modification file, format Date, Scanner, Who\n//Which project Header, Proj_name,Description, \n// Old project record\n//New project record\n\ndouble dthours;\n\n String dproj_name,dindex,dcname, dcphone, dfemail, dbilladdr1, dbilladdr3,dcity,dstate, dzip,dnemail;\nint dcode, dexpday, dexpmonth,dexpyear;\n\n\n//f.close(); \n try {\n dproj_name=theProject.getProj_name();\n \t dindex=theProject.getIndexnum();\n\t dthours=theProject.getTotalhours();\n\t dcode=theProject.getCodeofpay();\n\t dcname=theProject.getContactname();\n\t dcphone=theProject.getContactphone();\n\t dfemail=theProject.getFpemail();\n\t dbilladdr1=theProject.getBilladdr1();\n // theProject.setBilladdr2(theProject.getBilladdr2());\n dbilladdr3=theProject.getBilladdr3();\n \n dcity=theProject.getCity();\n dstate=theProject.getState();\n dzip=theProject.getZip();\n //theProject.setAccountid(theProject.getAccountid());\n dnemail=theProject.getNotifycontact();\n\t dexpday=theProject.getExpday();\n\t dexpmonth=\ttheProject.getExpmonth();\t\t\t \n\tdexpyear = theProject.getExpyear();\t\t\t\t \n\n\n\t \ndidate= theProject.getIACUCDate();\n\n } catch(Exception ex) {\n throw new webschedulePresentationException(\"Error adding project\", ex);\n } \n\n\n\nString s = \"\\n proj_name,TotalHours,SchEmail,Code,FCName,FCPhone,FCEmail,BillingAddress,Index,ExpDate,IRBDate\";\n\ntry {\nFileOutputStream f = new FileOutputStream (\"/home/emang/webschlog/projmodlog.txt\",true);\nfor (int i = 0; i < s.length(); ++i)\nf.write(s.charAt(i));\nString s2=\"\\n\"+dproj_name+\",\"+Double.toString(dthours)+\",\"+dnemail+\",\"+Integer.toString(dcode)+\",\"+dcname+\",\"+dcphone+\",\"+dfemail+\",\"+dbilladdr1+\" \"+dbilladdr3+\" \"+dcity+\" \"+dstate+\" \"+dzip+\",\"+dindex+\",\"+\",\";\nfor (int j = 0; j < s2.length(); ++j)\nf.write(s2.charAt(j));\nf.close();\n} catch (IOException ioe) {\n\tSystem.out.println(\"IO Exception\");\n\t}\n\t\n try {\n\tSystem.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setProj_name(proj_name);\n System.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setPassword( theProject.getPassword());\n\t theProject.setDescription(discrib);\n\t theProject.setIndexnum(indexnum);\n\t theProject.setTotalhours(Double.parseDouble(thours));\n\t theProject.setDonehours( theProject.getDonehours());\n theProject.setCodeofpay(Integer.parseInt(codeofpay));\n\t\n\t theProject.setContactname(contactname);\n\t theProject.setContactphone(contactphone);\n\t theProject.setFpemail(contactemail);\n\t theProject.setBilladdr1(billaddr1);\n theProject.setBilladdr2(theProject.getBilladdr2());\n\n theProject.setBilladdr3(billaddr3);\n theProject.setCity(city);\n theProject.setState(state);\n theProject.setZip(zip);\n theProject.setAccountid(theProject.getAccountid());\n theProject.setNotifycontact(notifycontact);\n\t theProject.setOutside(false);\n\t theProject.setExp(false);\n\t theProject.setInstitute(\"UCSD\");\n\t theProject.setNotes(notes);\ntheProject.setIRBnum(irbnum);\n\n//theProject.setCancredit(theProject.getCancredit());\n/*\t if(null != this.getComms().request.getParameter(OUTSIDE)) {\n \ttheProject.setOutside(true);\n \t } else {\n \ttheProject.setOutside(false);\n \t }\n if(null != this.getComms().request.getParameter(EXP)) {\n \ttheProject.setExp(true);\n \t } else {\n \ttheProject.setExp(false);\n\t\t\t \t }*/\n\t\t\t\t\t \n\t\t\t\t\t \ntheProject.setExpday(Integer.parseInt(expday));\ntheProject.setExpmonth(Integer.parseInt(expmonth));\ntheProject.setExpyear(Integer.parseInt(expyear));\n\n\t personID = theProject.getOwner().getHandle(); \n\t\ttheProject.setOwner(PersonFactory.findPersonByID(personID));\n\t\t\n//theProject.setOwner(theProject.getOwner());\n\n\ntheProject.setModDate(moddatesql);\n\ntheProject.setIACUCDate(iacucsql);\ntheProject.setModifiedby(this.getUser().getLastname());\n\n\n\nSystem.out.println(\" trying to saving a project two \"+ proj_name);\n\t theProject.save();\t\nSystem.out.println(\" trying to saving a project three \"+ proj_name);\n\t } catch(Exception ex) {\n throw new webschedulePresentationException(\"Error adding project\", ex);\n } \n }", "public void assertUserHasAccessToProject(String projectId) {\n if (userContextService.isSuperAdmin()) {\n /* a super admin has always access */\n return;\n }\n String userId = userContextService.getUserId();\n\n ProjectAccessCompositeKey key = new ProjectAccessCompositeKey(userId, projectId);\n Optional<ScanAccess> project = accessRepository.findById(key);\n if (!project.isPresent()) {\n securityLogService.log(SecurityLogType.POTENTIAL_INTRUSION, \"Denied user access in domain 'scan'. userId={},projectId={}\", userId,\n logSanitizer.sanitize(projectId, 30));\n // we say \"... or you have no access - just to obfuscate... so it's not clear to\n // bad guys they got a target...\n throw new NotFoundException(\"Project \" + projectId + \" does not exist, or you have no access.\");\n }\n }", "@Test\n\tvoid grantScholarshipApproved() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(166);\n\t\tassertEquals(scholarship,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "public void activateProjector() {\n try {\n //new thread so client and server can run concurrently\n new Thread() {\n public void run() {\n Empty request = Empty.newBuilder().build();\n\n ProjectorOnStatus response = blockingStub.activateProjector(request);\n\n ui.appendProjectorStatus(response.toString() + \"\\n\");\n\n }\n }.start();\n\n } catch (RuntimeException e) {\n System.out.println(\"RPC failed: \" + e);\n return;\n }\n }", "public void executeScript() throws Exception {\n\n nav.ChangeCountry(\"India\");\n nav.SearchFor(\"\");\n pdp.AddToBag();\n pdp.EnterBag();\n bag.CheckOut();\n lgn.LoginWith(\"[email protected]\");\n\n\n\n }", "public void turnInProject(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException,\n IllegalProjectStatusChangeException {\n Project project = getMandatoryProject(projectId);\n User currentUser = getMandatoryCurrentUser();\n if (project.getStatus() != Project.Status.FINISHED\n && project.getStatus() != Project.Status.TURNED_IN) {\n if (userIsAssignee(currentUser, project)) {\n project.setStatus(Project.Status.TURNED_IN);\n projectRepository.updateProject(project);\n } else {\n throw new UnauthorisedOperationException(\n currentUser.getId(), \"turn in project\", \"they \" + \"are not the assignee\");\n }\n } else {\n throw new IllegalProjectStatusChangeException(project.getStatus(), Project.Status.TURNED_IN);\n }\n support.firePropertyChange(\n ProjectChangeablePropertyName.SET_PROJECT_STATUS.toString(), OLD_VALUE, NEW_VALUE);\n }", "public void activate() {\n // PROGRAM 1: Student must complete this method\n if (control == 0) { // run and()\n \t\tand();\n \t} else if (control == 1) { //run or()\n \t\tor();\n \t} else if (control == 2) { //run add()\n \t\tadd();\n \t} else if (control == 6) { //run sub()\n \t\tsub();\n \t} else if (control == 7) { //run passB()\n \t\tpassB();\n \t} else {\n \t\tthrow new RuntimeException(\"invalid control\"); //otherwise, there was an invalid control\n \t}\n }", "@Then(\"^I should be logged in successfully$\")\n public void iShouldBeLoggedInSuccessfully() throws Throwable {\n throw new PendingException();\n }", "@Override\n public String execute() throws MidasJPAException {\n aLog.setUser(getUser().getUserName());\n try {\n aLog.exit();\n } catch (Exception ex) { \n //TODO Log error\n }\n request.getSession().invalidate();\n return SUCCESS;\n }", "void setProject(InternalActionContext ac, HibProject project);", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "@Given(\"^Open SignIn site$\")\t\t\t\t\t\n public void Open_SignIn_site() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.navigate().to(\"https://accounts.google.com/ServiceLogin/identifier?flowName=GlifWebSignIn&flowEntry=AddSession\");\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\t\t\t\n }", "public static void activateProjectScheduling(Week week, NonFixedTask[] projectTasksToSchedule){\n//\n NonFixedTask[] projectTasksToPut = Scheduler.ScheduleProject(week, projectTasksToSchedule);\n Putter.putProject(projectTasksToPut[0].getName(), week, projectTasksToPut);\n }", "public void accomplishGoal() {\r\n isAccomplished = true;\r\n }", "public void startProgram() {\n this.displayBanner();\n// prompt the player to enter their name Retrieve the name of the player\n String playersName = this.getPlayersName();\n// create and save the player object\n User user = ProgramControl.createPlayer(playersName);\n// Display a personalized welcome message\n this.displayWelcomeMessage(user);\n// Display the Main menu.\n MainMenuView mainMenu = new MainMenuView();\n mainMenu.display();\n }", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "public static void proManMain(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Create a new Project Manager Profile\");\n System.out.println(\"2 - Search for Project Manager Profile\\n\");\n\n System.out.println(\"0 - Continue\");\n }", "public static void makePayment(Project proj) {\n System.out.print(\"Add client's next payment: \");\n int newAmmount = input.nextInt();\n input.nextLine();\n proj.addAmount(newAmmount);\n }", "public String approveRegistration() {\n\t\treturn \"Company approved\";\r\n\t}", "public int getAssessId() {\n return AssessId;\n }", "public void clickLogin() {\n\t\tcontinueButton.click();\n\t}", "protected void saveProject(Project theProject)\n throws HttpPresentationException, webschedulePresentationException\n { \n\n String proj_name = this.getComms().request.getParameter(PROJ_NAME);\n String personID = this.getComms().request.getParameter(PERSONID);\n String password = this.getComms().request.getParameter(PASSWORD);\n String discrib = this.getComms().request.getParameter(DISCRIB);\n String indexnum = this.getComms().request.getParameter(INDEXNUM);\n String thours = this.getComms().request.getParameter(THOURS);\n String dhours = this.getComms().request.getParameter(DHOURS);\n String codeofpay = this.getComms().request.getParameter(CODEOFPAY);\n\nString contactname = this.getComms().request.getParameter(CONTACTNAME);\n\tString contactphone = this.getComms().request.getParameter(CONTACTPHONE);\n\tString billaddr1 = this.getComms().request.getParameter(BILLADDR1);\n\tString billaddr2 = this.getComms().request.getParameter(BILLADDR2);\n\tString billaddr3 = this.getComms().request.getParameter(BILLADDR3);\n\tString city = this.getComms().request.getParameter(CITY);\n\tString state = this.getComms().request.getParameter(STATE);\n\tString zip = this.getComms().request.getParameter(ZIP);\n\tString accountid = this.getComms().request.getParameter(ACCOUNTID);\n\tString isoutside = this.getComms().request.getParameter(OUTSIDE);\n\tString exp = this.getComms().request.getParameter(EXP);\n\tString expday = this.getComms().request.getParameter(EXPDAY);\n\nString expmonth = this.getComms().request.getParameter(EXPMONTH);\nString expyear = this.getComms().request.getParameter(EXPYEAR);\n\nString notifycontact = this.getComms().request.getParameter(NOTIFYCONTACT);\n\n try {\n\tSystem.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setProj_name(proj_name);\nSystem.out.println(\" trying to saving a project one \"+ proj_name);\n theProject.setPassword(password);\n\t theProject.setDescription(discrib);\n\t theProject.setIndexnum(indexnum);\n\t theProject.setTotalhours(Double.parseDouble(thours));\n\t theProject.setDonehours(Double.parseDouble(dhours));\n theProject.setCodeofpay(Integer.parseInt(codeofpay));\n\t\n\t theProject.setContactname(contactname);\n\t theProject.setContactphone(contactphone);\n\t theProject.setBilladdr1(billaddr1);\n theProject.setBilladdr2(billaddr2);\n\ntheProject.setBilladdr3(billaddr3);\ntheProject.setCity(city);\ntheProject.setState(state);\ntheProject.setZip(zip);\ntheProject.setAccountid(accountid);\ntheProject.setNotifycontact(notifycontact);\n\n\t if(null != this.getComms().request.getParameter(OUTSIDE)) {\n \ttheProject.setOutside(true);\n \t } else {\n \ttheProject.setOutside(false);\n \t }\n if(null != this.getComms().request.getParameter(EXP)) {\n \ttheProject.setExp(true);\n \t } else {\n \ttheProject.setExp(false);\n \t }\ntheProject.setExpday(Integer.parseInt(expday));\ntheProject.setExpmonth(Integer.parseInt(expmonth));\ntheProject.setExpyear(Integer.parseInt(expyear));\n\n\t theProject.setOwner(PersonFactory.findPersonByID(personID));\n\n\ntheProject.setInstitute(\"UCSD\");\ntheProject.setFpemail(\" \");\ntheProject.setPOnum(\"0\");\ntheProject.setPOexpdate(java.sql.Date.valueOf(\"2010-09-31\"));\ntheProject.setPOhours(0);\ntheProject.setIACUCDate(java.sql.Date.valueOf(\"2010-01-01\"));\ntheProject.setModifiedby(\"Ghobrial\");\ntheProject.setModDate(java.sql.Date.valueOf(\"2010-04-30\"));\ntheProject.setNotes(\"*\");\ntheProject.setIRBnum(\"0\");\n\n//theProject.set();\n\nSystem.out.println(\" Person ID \"+ personID);\nSystem.out.println(\" contactname \"+ contactname);\nSystem.out.println(\" contact phone\"+ contactphone);\nSystem.out.println(\" isoutside \"+ isoutside);\nSystem.out.println(\" exp day \"+expday);\nSystem.out.println(\" exp month \"+ expmonth);\nSystem.out.println(\" expyear \"+ expyear);\n\n\n\n\n\nSystem.out.println(\" trying to saving a project two \"+ proj_name);\n\t theProject.save();\t\nSystem.out.println(\" trying to saving a project three \"+ proj_name);\n\t } catch(Exception ex) {\n throw new webschedulePresentationException(\"Error adding project\", ex);\n } \n }", "@Test\n public void testGrantPreviouslyRevokedWithPrejudiceShowsPrompt_part2() throws Exception {\n assertEquals(PackageManager.PERMISSION_DENIED, getInstrumentation().getContext()\n .checkSelfPermission(Manifest.permission.READ_CALENDAR));\n\n // Request the permission and allow it\n BasePermissionActivity.Result thirdResult = requestPermissions(new String[] {\n Manifest.permission.READ_CALENDAR}, REQUEST_CODE_PERMISSIONS + 2,\n BasePermissionActivity.class, () -> {\n try {\n clickAllowButton();\n getUiDevice().waitForIdle();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n });\n\n // Make sure the permission is granted\n assertPermissionRequestResult(thirdResult, REQUEST_CODE_PERMISSIONS + 2,\n new String[] {Manifest.permission.READ_CALENDAR}, new boolean[] {true});\n }", "public String prepareToAddApplication() {\r\n\t\tSystem.out.println(\"aaa\");\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\t\tif(userRole.isApprover()){\r\n\t\t\t\tallapprover = ied.getApproversForApproveer(userRole.getEmpName());\r\n\t\t\t\talladmin = ied.getAllAdmins();\r\n\t\t\t\treturn \"prepare_approver_success\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tallapprover = ied.getAllApprovers();\r\n\t\t\talladmin = ied.getAllAdmins();\r\n\t\t return \"success\";\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"error\";\r\n\t }\r\n\t}", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "private EditPlanDirectToManaged signUpAndReachEditPlan() throws Exception{\n //Initializing investment strategy object used to keep track of Glidepath investment strategy in relation to age to retirement and RTQ\n //Default User has age of 35 and 30 years to retirement\n InvestmentStrategyObject.initAllStrategies();\n //Login and create Premium Gaslamp User\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n DetermineInvestmentStrategyPage displayPage = signupAndOnboard(advisorSplashPage,\n Constants.LastName.PREMIUM_INDIVIDUAL);\n //Enter Random RTQ Selections\n gaslamp.directToManaged.InvestmentStrategyPage investmentStrategyPage = EnterAndEditRTQ(RTQAnswerTypes.RANDOM,displayPage);\n PortfolioAnalysisPage portfolioAnalysisPage = investmentStrategyPage.navigateToPortfolioAnalysisPage();\n\n LinkedAccountsPage linkedAccountsPage = linkDAGAccount(portfolioAnalysisPage);\n portfolioAnalysisPage = linkedAccountsPage.clickOnNextButton();\n verifyPortfolioElements(portfolioAnalysisPage);\n\n //Edit the plan and re-do the RTQ\n Reporter.log(\"Editing Plan and Assumptions.\", true);\n EditPlanDirectToManaged editPlanPage = portfolioAnalysisPage.clickOnEditInPlaceTrigger();\n softAssert.assertTrue(editPlanPage.verifyEditPlanElements());\n return editPlanPage;\n }", "@Override\r\n public void start(OpProjectSession session) {\n OpBroker broker = session.newBroker();\r\n try {\r\n if (session.administrator(broker) == null) {\r\n OpUserService.createAdministrator(broker);\r\n }\r\n if (session.everyone(broker) == null) {\r\n OpUserService.createEveryone(broker);\r\n }\r\n\r\n //register system objects with Backup manager\r\n OpBackupManager.addSystemObjectIDQuery(OpUser.ADMINISTRATOR_NAME, OpUser.ADMINISTRATOR_ID_QUERY);\r\n OpBackupManager.addSystemObjectIDQuery(OpGroup.EVERYONE_NAME, OpGroup.EVERYONE_ID_QUERY);\r\n }\r\n finally {\r\n broker.closeAndEvict();\r\n }\r\n }", "@Override\n\tpublic void execute() {\n\t\tProjectOpenAllPrompt prompt = new ProjectOpenAllPrompt();\n\t\tprompt.setProceedEvent(ee -> {\n\t\t\tprompt.close();\n\t\t\tString name = ((Button) ee.getSource()).getId();\n\t\t\tIGameRunner gameRunner = new GameRunner();\n\t gameRunner.playGame(name);\n\t\t});\n\t\tprompt.show();\n\t}", "public void openProject(AbstractProject project) {\n\t\tsetActiveValue(project.getId(), \"1\"); //$NON-NLS-1$\n\t}", "public void lockCashDrawer(String campusCode, String documentId);", "public void StartLogIn(){\n\t}", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "public String activateAds(String projecyKey, String expirationDate) throws Exception {\n\t\tDocument document = DocumentHelper.createDocument();\n\t\ttry {\n\t\t\t//---------------------------------------------------------------------\n\t\t\t// Projects et terminals\n\t\t\t//---------------------------------------------------------------------\n\t\t\tProject project = projectService.findByKey(projecyKey);\n\t\t\tif (project != null) {\n\t\t\t\tDate date = DateUtil.toDate(expirationDate, \"yyyy-MM-dd\");\n\t\t\t\tif (date == null) {\n\t\t\t\t\tthrow new ActivationException(\"Date format invalid\");\n\t\t\t\t}\n\t\t\t\tproject.setAdsDateExpire(date);\n\t\t\t\tprojectService.saveOrUpdate(project);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new ActivationException(\"Project '\"+projecyKey+\"' doesn't exist\");\n\t\t\t}\n\n\t\t\tdocument.addElement(\"success\");\n\t\t}\n\t\tcatch (ActivationException e) {\n\t\t\tElement elt = document.addElement(\"error\");\n\t\t\telt.setText(e.getMessage());\n\t\t}\n\t\t\n\t\treturn document.asXML();\n\t}", "ClaimSoftgoal createClaimSoftgoal();", "public void enterConference();", "public static void introProgram() {\n System.out.println(\"COMMISSION CALCULATOR\");\n System.out.println(\"=====================\");\n System.out.println(\"Welcome to the Commission Calculator. This program will calculate\");\n System.out.println(\"the commission to be paid to employees based on their weekly sales.\");\n System.out.println(\"\");\n System.out.println(\"First, enter the number of employees to calculate commission for. Then,\");\n System.out.println(\"enter the name and sales of each employee. The program will return each\");\n System.out.println(\"employee's commission, as well as total sales, and total and average\");\n System.out.println(\"commissions.\");\n }", "@Test\r\n \tpublic void testProjectID() {\n \t\tassertNull(localProject.getGlobalProjectId());\r\n \t}", "private void shareOnP2A() {\n if (mSession != null) {\n final int userId = mSession.get_session_user_id();\n if (userId > 1 && !P2ASharedSystemPreferences.getToken(P2AContext.getContext()).equals(\"\")) {\n // Has existed the P2A user\n // Get user's account information\n final P2AContext appContext = (P2AContext) getApplicationContext();\n\n final User p2aUser = appContext.getcUser();\n if (p2aUser != null) {\n // Invoke submit score task to P2A server.\n invokeSubmitP2AScoreService(p2aUser);\n }\n\n } else {\n // This is Anonymous now.\n // Allow Anonymous to commit on P2A server? OK -> Request user log in\n // Show Request Login form\n showRequestLoginForm();\n }\n } else {\n }\n }", "void markAsUserSession();", "@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}", "private void loggedInUser() {\n\t\t\n\t}", "public String handleEdit()\n throws webschedulePresentationException, HttpPresentationException\n {\t\t \n \n Project project = null;\n\n \n \n // Try to get the proj by its ID\n try {\n\t project = ProjectFactory.findProjectByID(this.getProjectID());\n\t \n\t String title = project.getProj_name();\n\t System.out.println(\"project title: \"+title);\n\t\n } catch(Exception ex) {\n this.getSessionData().setUserMessage(\"Please choose a valid PROJECT to edit\");\n throw new ClientPageRedirectException(UCSDPROJECTSEDIT_PAGE);\n }\n \n // If we got a valid project then try to save it\n // If any fields were missing then redisplay the edit page, \n // otherwise redirect to the project catalog page\n try {\n saveProject(project);\n throw new ClientPageRedirectException(UCSDPROJECTSEDIT_PAGE);\n } catch(Exception ex) {\n return showPage(\"You must fill out all fields to edit this project\");\n } \n }", "@Override\n public CurrentJsp execute(HttpServletRequest request) {\n\n try {\n HttpSession session = request.getSession();\n User user = (User) session.getAttribute(USER_ATTRIBUTE);\n int authorId = user.getId();\n\n String clientIdValue = request.getParameter(CLIENT_ID_PARAMETER);\n String startDateValue = request.getParameter(START_DATE_PARAMETER);\n String endDateValue = request.getParameter(END_DATE_PARAMETER);\n String diet = request.getParameter(DIET_PARAMETER);\n String daysCountValue = request.getParameter(DAYS_COUNT_PARAMETER);\n ProgramValidator trainingProgramDataValidator = new ProgramValidator();\n boolean isDataValid = trainingProgramDataValidator.checkTrainingProgramData(clientIdValue, startDateValue, endDateValue, diet, daysCountValue);\n if (!isDataValid) {\n return new CurrentJsp(CREATE_TRAINING_PROGRAM_PAGE_PATH, false, INVALID_INPUT_DATA_MESSAGE_KEY);\n }\n\n ProgramService trainingProgramService = new ProgramService();\n Program trainingProgram = trainingProgramService.createProgram(authorId, clientIdValue, diet, startDateValue, endDateValue);\n session.setAttribute(PROGRAM_ATTRIBUTE, trainingProgram);\n\n ExerciseService exerciseService = new ExerciseService();\n List<Exercise> exercises = exerciseService.findAllExercisesIdAndName();\n session.setAttribute(EXERCISES_ATTRIBUTE, exercises);\n\n\n TreeMap<Integer, List<Exercise>> daysAndExercises = trainingProgramService.getDaysAndExerciseFromTrainingProgram(daysCountValue);\n session.setAttribute(DAYS_AND_EXERCISES_ATTRIBUTE, daysAndExercises);\n\n return new CurrentJsp(EDIT_PROGRAM_PAGE_PATH, false);\n } catch (ServiceException exception) {\n LOGGER.error(exception.getMessage(), exception);\n return new CurrentJsp(CurrentJsp.ERROR_PAGE_PATH, true);\n }\n }", "@Then(\"^user is on Your Account page$\")\r\n public void user_is_on_Your_Account_page() throws Throwable {\n throw new PendingException();\r\n }", "@Override\n public void activate() {\n if ( ! prepared)\n prepare();\n\n validateSessionStatus(session);\n ApplicationId applicationId = session.getApplicationId();\n try (ActionTimer timer = applicationRepository.timerFor(applicationId, \"deployment.activateMillis\")) {\n TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);\n if ( ! timeoutBudget.hasTimeLeft()) throw new RuntimeException(\"Timeout exceeded when trying to activate '\" + applicationId + \"'\");\n\n RemoteSession previousActiveSession;\n CompletionWaiter waiter;\n try (Lock lock = tenant.getApplicationRepo().lock(applicationId)) {\n previousActiveSession = applicationRepository.getActiveSession(applicationId);\n waiter = applicationRepository.activate(session, previousActiveSession, applicationId, ignoreSessionStaleFailure);\n }\n catch (RuntimeException e) {\n throw e;\n }\n catch (Exception e) {\n throw new InternalServerException(\"Error when activating '\" + applicationId + \"'\", e);\n }\n\n waiter.awaitCompletion(timeoutBudget.timeLeft());\n log.log(Level.INFO, session.logPre() + \"Session \" + session.getSessionId() + \" activated successfully using \" +\n hostProvisioner.map(provisioner -> provisioner.getClass().getSimpleName()).orElse(\"no host provisioner\") +\n \". Config generation \" + session.getMetaData().getGeneration() +\n (previousActiveSession != null ? \". Based on session \" + previousActiveSession.getSessionId() : \"\") +\n \". File references: \" + applicationRepository.getFileReferences(applicationId));\n }\n }", "public void viewApplicants() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(dev_GSP_CLICKER)).click();\n\t\tdriver.findElement(By.xpath(dev_GSP_CONDITIONALLYAPPROVE)).click();\n\t\tThread.sleep(1000);\n\t\tWebElement promowz = driver.findElement(By.xpath(dev_GSP_CAPPROVEREASON));\n\t\tpromowz.sendKeys(\"c\");\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(By.xpath(dev_GSP_CAPPROVEBUTTON)).click();\n\t\tAssert.assertTrue(\"Successfully conditionally approved!\", elementUtil.isElementAvailabe(dev_GSP_CAPPROVESUCCESS));\n\t\tlogger.info(\"Passed conditionally approved\");\n\t\t\n\t}", "void addDeveloper(long id, String emailDev, String emailCreatedBy) throws ProjectException, CustomUserException;", "private void setupProjectIncompleteDripFlow() {\n List<DProjects> projects = AppConfig.getInstance().getdProjectsDAO().findAllInternal();\n if (projects == null || projects.isEmpty()) return;\n\n // 5 days old project created\n Date recentEnoughProjectAccessed = new Date(lastRunDate.getTime() - 5*ONE_DAY_MILISEC);\n\n //3 days old login.\n Date recentEnoughLoginTime = new Date(lastRunDate.getTime() - 3*ONE_DAY_MILISEC);\n\n // one notification per user is enough.\n Map<DUsers, DProjects> userProjectMap = new HashMap<>();\n // find projects which are not complete.\n for (DProjects project : projects) {\n\n // ignore old projects (accessed older than 5 days), they may be already in the flow.\n if (lastAccessTime(project).before(recentEnoughProjectAccessed)) {\n continue;\n }\n\n ProjectDetails details = Controlcenter.getProjectSummary(project);\n long totalDone = details.getTotalHitsDone() + details.getTotalHitsSkipped();\n // if > 70% done, then ignore.\n if (details.getTotalHits() == 0 || (totalDone/(double)details.getTotalHits()) < .70) {\n // Find all the project users.\n List<DProjectUsers> projectUsers = AppConfig.getInstance().getdProjectUsersDAO().findAllByProjectIdInternal(project.getId());\n if (projectUsers == null || projectUsers.isEmpty()) break;\n\n for (DProjectUsers projectUser : projectUsers) {\n //not sending to contributors as we add everyone to default projects,\n // would be sad to send them mail asking them to finish Default projects.\n if (projectUser.getRole() == DTypes.Project_User_Role.OWNER) {\n DUsers user = AppConfig.getInstance().getdUsersDAO().findByIdInternal(projectUser.getUserId());\n //if the user has not logged in anytime soon.\n if (user != null && user.getUpdated_timestamp().before(recentEnoughLoginTime)) {\n userProjectMap.put(user, project);\n }\n }\n }\n }\n }\n LOG.info(\"setupProjectIncompleteDripFlow userProjectMap = \" + userProjectMap.size());\n DripFlows.addToProjectIncompleteFlow(userProjectMap);\n\n }", "protected abstract String getUseProjectKey();", "void approveStudent(String studentId);", "@When(\"^we open their profile$\")\t//2,6\n\tpublic void we_open_their_profile() throws Throwable {\n\t\ttest.log(LogStatus.INFO, \"open their profile\");\n\t}", "public static void intro() {\n printHighlighted(\"SECRET SANTA\");\n printHighlighted(\"This program allows you to add the participants of the\");\n printHighlighted(\"game and assign them matches to send and receive gifts.\");\n }", "@Override\n\tpublic boolean isApproved() {\n\t\treturn _scienceApp.isApproved();\n\t}", "public void test2() {\n\t\tString sessionName = \"test2\";\n\t\tboolean success = collabEditingService.joinSession(sessionName);\n//\t\tif (success) collabEditingService.showDocument(); // debug\n\t\t\n\t}", "@Override\n\tpublic BankPrompt run() {\n\t\tBankUser user = bankAuthUtil.getCurrentUser();\n\t\t// if(bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\tList<Transactions> transactions = transactionsDao.findAll(user.getUserId(), user.getRole());\n\n\t\tfor (int i = 0; i < transactions.size(); i++) {\n\t\t\tTransactions thisTransaction = transactions.get(i);\n\t\t\tint userId = thisTransaction.getUserId();\n\t\t\tBankUser thisUser = bankUserDao.findById(userId);\n\t\t\tString fullname = thisUser.getFullname();\n\n\t\t\t// bankUserDao.findById(accounts.get(i).getUserId()).getFullname();\n\n\t\t\t// if (accounts.get(i).getActiveStatus() == 1) {\n\t\t\tSystem.out.println(\"Enter \" + i + \"for: \" + transactions.get(i).getUserId() + \" \" + fullname\n\t\t\t\t\t+ transactions.get(i).getBankAccountId() + \" \" + transactions.get(i).getAction() + \" \"\n\t\t\t\t\t+ transactions.get(i).getAmount());\n\t\t}\n\t\t// }\n\n\t\t// System.out.println(\"Sorry, something went wrong.\");\n\n\t\tif (bankAuthUtil.getCurrentUser().getRole().contentEquals(\"Customer\")) {\n\t\t\treturn new CustomerMainMenuPrompt();\n\t\t} else {\n\n\t\t\treturn new AdminMainMenuPrompt();\n\n\t\t}\n\n\t}", "private void setProject()\n\t{\n\t\tproject.setName(tf0.getValue().toString());\n \t\tproject.setDescription(tf8.getValue().toString());\n \t\tproject.setEndDate(df4.getValue());\n \t\tif (sf6.getValue().toString().equals(\"yes\"))project.setActive(true);\n \t\telse project.setActive(false);\n \t\tif (!tf7.getValue().toString().equals(\"\"))project.setBudget(Float.parseFloat(tf7.getValue().toString()));\n \t\telse project.setBudget(-1);\n \t\tproject.setNextDeadline(df5.getValue());\n \t\tproject.setStartDate(df3.getValue());\n \t\ttry \n \t\t{\n \t\t\t\tif (sf1.getValue()!=null)\n\t\t\t\tproject.setCustomerID(db.selectCustomerforName( sf1.getValue().toString()));\n\t\t}\n \t\tcatch (SQLException|java.lang.NullPointerException e) \n \t\t{\n \t\t\tErrorWindow wind = new ErrorWindow(e); \n \t UI.getCurrent().addWindow(wind);\t\t\n \t e.printStackTrace();\n\t\t\t}\n \t\tproject.setInserted_by(\"Grigoris\");\n \t\tproject.setModified_by(\"Grigoris\");\n \t\tproject.setRowversion(1);\n \t\tif (sf2.getValue()!=null)project.setProjectType(sf2.getValue().toString());\n \t\telse project.setProjectType(null);\n\t }", "@Override\n\tpublic void payCrew() {\n\t\tSystem.out.println(\"Crew paid!, You can start sailing now!\");\n\t\tgame.loading();\n\t}", "public void LogIn() {\n\t\t\r\n\t}", "@Override\n\tpublic void work() {\n\t\tSystem.out.println(\"Accountant accounting.\");\n\t}", "@Override\n\tpublic void approveForm(Context ctx) {\n\t\t//Authentication\n\t\tUser approver = ctx.sessionAttribute(\"loggedUser\");\n\t\tif (approver == null) {\n\t\t\tctx.status(401);\n\t\t\treturn;\n\t\t}\n\t\tString username = ctx.pathParam(\"username\");\n\t\tif (!approver.getUsername().equals(username)) {\n\t\t\tctx.status(403);\n\t\t\treturn;\n\t\t}\n\t\t// Implementation\n\t\tString id = ctx.pathParam(\"id\");\n\t\tForm form = fs.getForm(UUID.fromString(id));\n\t\tapprover.getAwaitingApproval().remove(form);\n\t\tus.updateUser(approver);\n\t\t// If approver is just the direct supervisor\n\t\tif (!approver.getType().equals(UserType.DEPARTMENT_HEAD) && !approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setSupervisorApproval(true);\n\t\t\tUser departmentHead = us.getUserByName(approver.getDepartmentHead());\n\t\t\tdepartmentHead.getAwaitingApproval().add(form);\n\t\t\tus.updateUser(departmentHead);\n\t\t}\n\t\t// If the approver is a department head but not a benco\n\t\tif (approver.getType().equals(UserType.DEPARTMENT_HEAD) && !approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setDepartmentApproval(true);\n\t\t\tUser benco = us.getUser(\"sol\");\n\t\t\tbenco.getAwaitingApproval().add(form);\n\t\t\tus.updateUser(benco);\n\t\t}\n\t\t// if the approver is a BenCo\n\t\tif (approver.getType().equals(UserType.BENCO)) {\n\t\t\tform.setBencoApproval(true);\n\t\t\tUser formSubmitter = us.getUserByName(form.getName());\n\t\t\tif (formSubmitter.getAvailableReimbursement() >= form.getCompensation()) {\n\t\t\t\tformSubmitter.setAvailableReimbursement(formSubmitter.getAvailableReimbursement() - form.getCompensation());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tformSubmitter.setAvailableReimbursement(0.00);\n\t\t\t}\n\t\t\tformSubmitter.getAwaitingApproval().remove(form);\n\t\t\tformSubmitter.getCompletedForms().add(form);\n\t\t\tus.updateUser(formSubmitter);\n\t\t}\n\t\t\n\t\tfs.updateForm(form);\n\t\tctx.json(form);\n\t}", "@When(\"^we open the profile$\")\t//2\n\tpublic void we_open_the_profile() throws Throwable {\n\t\ttest.log(LogStatus.INFO, \"open their profile\");\n\t}", "@BeforeSuite(alwaysRun=true)\n\tpublic void first(ITestContext ctx) throws Throwable{\n\t\titc=ctx;\n\n\t\tTestEngine.cleanUP();\n\n\t\tReportStampSupport.calculateSuiteStartTime();\n\t\tsuiteStartDateTime = ReportStampSupport.dateTime();\n\n\n\t\tif (System.getProperty(\"InteractHost\") != null){\n\n\t\t\tProtocol=System.getProperty(\"Protocol\");\n\t\t\tHostName=System.getProperty(\"InteractHost\");\n\t\t\tPort=System.getProperty(\"InteractPort\");\n\t\t\tconfigProps.setProperty(\"Protocol\", Protocol);\n\t\t\tconfigProps.setProperty(\"InteractHost\", HostName);\n\t\t\tconfigProps.setProperty(\"InteractPort\", Port);\n\n\t\t\t//AccountId = System.getProperty(\"AccountId\");\n\t\t\tUserId = System.getProperty(\"EmailId\");\n\t\t\tPassword = System.getProperty(\"Password\");\n\t\t\n\t\t\t//configProps.setProperty(\"accountId\", AccountId);\n\t\t\tconfigProps.setProperty(\"UserId\", UserId);\n\t\t\tconfigProps.setProperty(\"Password\", Password);\n\t\t\t\n\t\t\t//AccountId = System.getProperty(\"AccountId\");\n\t\t\tUserId_ProgramOfficer = System.getProperty(\"UserId_ProgramOfficer\");\n\t\t\tPassword_ProgramOfficer = System.getProperty(\"Password_ProgramOfficer\");\n\t\t\t\n\t\t\t//configProps.setProperty(\"accountId\", AccountId);\n\t\t\tconfigProps.setProperty(\"UserId_ProgramOfficer\", UserId_ProgramOfficer);\n\t\t\tconfigProps.setProperty(\"Password_ProgramOfficer\", Password_ProgramOfficer);\n\n\t\t\tAdminUserId = System.getProperty(\"SystemAdminUsername\");\n\t\t\tAdminPassword = System.getProperty(\"SystemAdminPassword\");\n\t\t\tconfigProps.setProperty(\"AdminUserId\", AdminUserId);\n\t\t\tconfigProps.setProperty(\"AdminPassword\", AdminPassword);\n\n\t\t\twebDesignerUrl = System.getProperty(\"webDesignerUrl\");\n\t\t\tconfigProps.setProperty(\"webDesignerUrl\", webDesignerUrl);\n\n\t\t\t\n\t\t\tif(System.getProperty(\"ExecuteLocally\").equalsIgnoreCase(\"False\")){\n\t\t\t\tconfigProps.setProperty(\"ExecuteInBrowserstack\", \"True\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tconfigProps.setProperty(\"ExecuteInBrowserstack\", \"False\");\n\t\t\t}\n\n\t\t\tif(System.getProperty(\"DeleteAccountsAfterTestsCompletion\").equalsIgnoreCase(\"True\")){\n\t\t\t\tdeleteAccounts = true;\n\t\t\t}\n System.out.println(\"EmailRecipients\");\n\t\t\tif (System.getProperty(\"EmailRecipients\") != null){\n\t\t\t\tconfigProps.setProperty(\"ToAddresses\", System.getProperty(\"EmailRecipients\"));\n\t\t\t}\n\n\t\t}\n\t\telse{\n\n\t\t\tProtocol=configProps.getProperty(\"Protocol\");\n\t\t\tHostName=configProps.getProperty(\"InteractHost\");\n\t\t\tPort=configProps.getProperty(\"InteractPort\");\n\n\t\t\t//AccountId = configProps.getProperty(\"accountId\");\n\t\t\tUserId = configProps.getProperty(\"UserId\");\n\t\t\tPassword = configProps.getProperty(\"Password\");\n\n\t\t\tAdminUserId=configProps.getProperty(\"AdminUserId\");\n\t\t\tAdminPassword=configProps.getProperty(\"AdminPassword\");\n\n\t\t\twebDesignerUrl = configProps.getProperty(\"webDesignerUrl\");\n\t\t}\n\n\n\t\tSystem.out.println(\"Protocol: \"+Protocol);\n\t\tSystem.out.println(\"HostName: \"+HostName);\n\t\tSystem.out.println(\"Port: \"+Port);\n\t\t//System.out.println(\"AccountId: \"+AccountId);\n\t\tSystem.out.println(\"UserId: \"+UserId);\n\t\tSystem.out.println(\"Password: \"+Password);\n\t\t\n\t}", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "private void _generateAnAssistantProfessor(int index) {\n String id = _getId(CS_C_ASSTPROF, index);\n writer_.startSection(CS_C_ASSTPROF, id);\n if(globalVersionTrigger){\n \twriter_log.addPropertyInstance(id, RDF.type.getURI(), ontology+\"#AssistantProfessor\", true); \t\n }\n _generateAProf_a(CS_C_ASSTPROF, index, id);\n writer_.endSection(CS_C_ASSTPROF);\n _assignFacultyPublications(id, ASSTPROF_PUB_MIN, ASSTPROF_PUB_MAX);\n }", "public String handleEdit()\n throws webschedulePresentationException, HttpPresentationException\n {\t\t \n String projID = this.getComms().request.getParameter(PROJ_ID);\n Project project = null;\n\n System.out.println(\" trying to edit a project \"+ projID);\n \n // Try to get the proj by its ID\n try {\n\t project = ProjectFactory.findProjectByID(projID);\n\t System.out.println(\" trying to edit a project 2\"+ projID);\n\t String title = project.getProj_name();\n\t System.out.println(\"project title: \"+title);\n\t\n } catch(Exception ex) {\n this.getSessionData().setUserMessage(\"Please choose a valid PROJECT to edit\");\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n }\n \n // If we got a valid project then try to save it\n // If any fields were missing then redisplay the edit page, \n // otherwise redirect to the project catalog page\n try {\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n } catch(Exception ex) {\n return showEditPage(\"You must fill out all fields to edit this project\");\n } \n }", "@When(\"^i press login$\")\r\n\tpublic void i_press_login() throws Throwable {\n\t throw new PendingException();\r\n\t}", "public void acceptAsFinished(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException,\n IllegalProjectStatusChangeException {\n Project project = getMandatoryProject(projectId);\n User currentUser = getMandatoryCurrentUser();\n if (project.getStatus() == Project.Status.TURNED_IN) {\n if (userIsSupervisor(currentUser, project)) {\n project.setStatus(Project.Status.FINISHED);\n project.setFinishingDate(LocalDate.now());\n projectRepository.updateProject(project);\n } else {\n throw new UnauthorisedOperationException(\n currentUser.getId(), \"accept as finished\", \"they\" + \" are not the supervisor\");\n }\n } else {\n throw new IllegalProjectStatusChangeException(project.getStatus(), Project.Status.FINISHED);\n }\n support.firePropertyChange(\n ProjectChangeablePropertyName.SET_PROJECT_STATUS.toString(), OLD_VALUE, NEW_VALUE);\n }", "void startChallenge();", "private void authorize() {\r\n\r\n\t}", "@Test\r\n public void testAssaySecurity() throws Exception\r\n {\r\n log(\"Starting Assay security scenario tests\");\r\n setupEnvironment();\r\n setupPipeline(getProjectName());\r\n SpecimenImporter importer = new SpecimenImporter(TestFileUtils.getTestTempDir(), StudyHelper.SPECIMEN_ARCHIVE_A, new File(TestFileUtils.getTestTempDir(), \"specimensSubDir\"), TEST_ASSAY_FLDR_STUDY2, 1);\r\n importer.importAndWaitForComplete();\r\n defineAssay();\r\n uploadRuns(TEST_ASSAY_FLDR_LAB1, TEST_ASSAY_USR_TECH1);\r\n editResults();\r\n publishData();\r\n publishDataToDateBasedStudy();\r\n publishDataToVisitBasedStudy();\r\n editAssay();\r\n viewCrossFolderData();\r\n verifyStudyList();\r\n verifyRunDeletionRecallsDatasetRows();\r\n // TODO: Turn this on once file browser migration is complete.\r\n //verifyWebdavTree();\r\n goBack();\r\n }", "private Task3() {\n\t\n\tSystem.out.println(\"This is Laz Ismail\");\n\t\n\t}", "public String handleAdd() \n throws HttpPresentationException, webschedulePresentationException\n { \n\t try {\n\t Project project = new Project();\n saveProject(project);\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n\t } catch(Exception ex) {\n return showAddPage(\"You must fill out all fields to add this project\");\n }\n }", "@Given(\"I have logged in\")\r\n\tpublic void i_have_logged_in() {\n\t\tSystem.out.println(\"code for logged in\");\r\n\t}", "@Given(\"I have account\")\r\n\tpublic void i_have_account() {\n\t\tSystem.out.println(\"code for account\");\r\n\t}", "public void doProjectOpen() {\r\n\t\tthis.observerList.notifyObservers(GNotification.PROJECT_OPEN, null);\r\n\t}", "private boolean doGetApproval() {\n\t\tcurrentStep = OPERATION_NAME+\": getting approval from BAMS\";\n\t\tif (!_atmssHandler.doDisDisplayUpper(SHOW_PLEASE_WAIT)) {\n\t\t\trecord(\"Dis\");\n\t\t\treturn false;\n\t\t}\n\t\tresult = _atmssHandler.doBAMSUpdatePasswd(newPassword, _session);\n\t\tif (result) {\n\t\t\trecord(\"password changed\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\trecord(\"BAMS\");\n\t\t\tif (!_atmssHandler.doDisDisplayUpper(FAILED_FROM_BAMS_UPDATING_PW)) {\n\t\t\t\trecord(\"Dis\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpause(3);\n\t\t\treturn false;\n\t\t}\n\t}", "@Given(\"^user clicks on agile project link$\")\n\tpublic void user_clicks_on_agile_project_link() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//a[contains(text(),'Agile Project')]\")).click();\n\t}", "@Given(\"^Login to simplilearn$\")\r\n\tpublic void Login_to_simplilearn () throws Throwable\r\n\t{\n\t\t\r\n\t\tSystem.out.println(\" TC002 - Step 1 is passed\");\r\n\t\t\r\n\t}", "@And(\"^I goto Activation Page$\")\r\n\t\r\n\tpublic void I_goto_Activation_Page() throws Exception {\r\n\t\t\r\n\t\tenduser.click_activationTab();\r\n\t\t\r\n\t}", "@Test\r\n\t@Deployment(resources={\"MyProcess03.bpmn\" })\r\n\tpublic void starter() {\r\n\t\tactivitiSpringRule.getIdentityService().setAuthenticatedUserId(\"claudio\");\r\n\t\t\r\n\t\tRuntimeService runtimeService = activitiSpringRule.getRuntimeService();\t\t\r\n\t\tProcessInstance processInstance = runtimeService.startProcessInstanceByKey(\"MyProcess03\");\r\n\t\t\r\n\t\tassertEquals(\"claudio\",runtimeService.getVariable(processInstance.getId(), \"myStarter\"));\r\n\t}", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT03\" })\n\tpublic void P0Pass_3_testSignUpAsATeacher_SportsTeam() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_SportsTeam\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnSportsTeamGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Sports Team\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Sports Team\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Sports Team\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "private void signIn() {\n }", "private void beginMyTurn() {\n clientgui.setDisplayVisible(true);\n selectEntity(clientgui.getClient().getFirstDeployableEntityNum());\n setNextEnabled(true);\n setRemoveEnabled(true);\n // mark deployment hexes\n clientgui.bv.markDeploymentHexesFor(ce());\n }", "@Override\n\tpublic void loginEnsure(String userName) {\n\t\t\n\t}", "@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }", "public String openAssociationSystem() {\n String welcome = \"Welcome to the setup of the soccer association system\";\n return welcome;\n }", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}" ]
[ "0.5684146", "0.5446297", "0.53903496", "0.5255106", "0.51939875", "0.5192381", "0.51816565", "0.5177657", "0.51210904", "0.50802714", "0.5047701", "0.502872", "0.50188696", "0.50141937", "0.5008606", "0.4999958", "0.49949703", "0.49855492", "0.49561772", "0.49518657", "0.49512613", "0.49477726", "0.49456993", "0.49330634", "0.49311456", "0.492918", "0.4917853", "0.48965752", "0.48893332", "0.48865768", "0.48839897", "0.4873462", "0.4864886", "0.48636892", "0.48577973", "0.4855885", "0.48557413", "0.48421997", "0.48417598", "0.4841042", "0.48357543", "0.48348925", "0.48337346", "0.48309463", "0.4828909", "0.48246756", "0.482231", "0.48209164", "0.48196495", "0.48188674", "0.48134267", "0.48053005", "0.4801568", "0.47975186", "0.4797011", "0.47879112", "0.47767678", "0.47731578", "0.47696623", "0.4769175", "0.47664452", "0.47643125", "0.47609785", "0.4760561", "0.47440115", "0.4743801", "0.4736465", "0.47329274", "0.4731692", "0.47230726", "0.4717587", "0.47165507", "0.47124135", "0.4711201", "0.47082648", "0.47071156", "0.4706703", "0.4704202", "0.47036052", "0.47035953", "0.4703176", "0.47001997", "0.46946013", "0.4694162", "0.46856", "0.46854466", "0.4685188", "0.46790308", "0.46748075", "0.46735084", "0.46693096", "0.46671373", "0.4663562", "0.4662493", "0.46623036", "0.46615714", "0.46609217", "0.46606004", "0.46576545", "0.46540797" ]
0.6409376
0
Fetch all the responseID's for a particular test
public void deleteAssessmentData(long testId) { List<Long> responseID = assessmentDao.getresponseDetails(testId); // Delete data from response_details assessmentDao.deleteresponseDetails(testId); // Delete maturity_level for the subCategory assessmentDao.deleteMaturityLevel(testId); // Delete user comments for the subCategory assessmentDao.deleteUserComments(testId); // All the data corresponding to a particular test would be deleted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QuestionResponse getResponses(String questionId);", "public List<ATWResponse> findResponsesByRequestId(int requestID) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ATWResponse> list = entityManager.createQuery(findByRequestID)\n\t\t\t.setParameter(1, requestID)\n\t\t\t.getResultList();\n\t\tif(list != null) {System.out.println(\"Response by rid List size = \"+list.size());}\n\t\telse { System.out.println(\"Response List is by rid NULL\");}\n\t\treturn list;\n\t}", "@Test\n public void test012() {\n List<Integer> id = response.extract().path(\"data.id\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + id);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "private void onGetAllIdentitet(Event<FintResource> responseEvent) {\n Identifikator batmanId = new Identifikator();\n batmanId.setIdentifikatorverdi(\"BATMAN\");\n Identitet batman = new Identitet();\n batman.setSystemId(batmanId);\n responseEvent.addData(FintResource\n .with(batman)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100001\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATMOBILE\").build()));\n\n Identifikator robinId = new Identifikator();\n robinId.setIdentifikatorverdi(\"ROBIN\");\n Identitet robin = new Identitet();\n robin.setSystemId(robinId);\n responseEvent.addData(FintResource\n .with(robin)\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.PERSONALRESSURS).forType(Personalressurs.class).field(\"ansattnummer\").value(\"100002\").build())\n .addRelations(new Relation.Builder().with(Identitet.Relasjonsnavn.RETTIGHET).forType(Rettighet.class).field(\"systemid\").value(\"BATCAVE\").build()));\n }", "@Test\n public void test011() {\n\n List<Integer> storeid = response.extract().path(\"data.services.storeservices.storeId\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + storeid);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public Response getResponse(long response_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n String selectQuery = \"SELECT * FROM \" + RESPONSES_TABLE_NAME + \" WHERE \"\n + KEY_ID + \" = \" + response_id;\n\n Log.e(LOG, selectQuery);\n\n Cursor c = db.rawQuery(selectQuery, null);\n\n if (c != null)\n c.moveToFirst();\n\n Response response = new Response();\n response.setId(c.getInt(c.getColumnIndex(KEY_ID)));\n response.setEvent(c.getString(c.getColumnIndex(RESPONSES_EVENT)));\n response.setResponse(c.getInt(c.getColumnIndex(RESPONSES_RESPONSE)));\n\n return response;\n }", "@Test\n public void test005() {\n\n List<String> storeid = response.extract().path(\"data.services.storeservices.storeId\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + storeid);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public static List<String> getTestIds(Document testDocument) {\n\t\tElement rootElement = testDocument.getDocumentElement();\n\t\tList<String> ids = new ArrayList<String>();\n\t\tNodeList children = rootElement.getChildNodes();\n\t\tint length = children.getLength();\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tNode child = children.item(i);\n\t\t\tif (child.getNodeType() == Node.ELEMENT_NODE)\n\t\t\t\tids.add(((Element) child).getAttribute(ID_ATTRIBUTE));\n\n\t\t}\n\t\treturn ids;\n\t}", "public Result all(String id);", "private void onGetAllRettighet(Event<FintResource> responseEvent) {\n Identifikator batcaveId = new Identifikator();\n batcaveId.setIdentifikatorverdi(\"BATCAVE\");\n Rettighet batcave = new Rettighet();\n batcave.setSystemId(batcaveId);\n batcave.setNavn(\"Batcave\");\n batcave.setKode(\"BAT-002\");\n batcave.setBeskrivelse(\"Grants access to the secret cave\");\n responseEvent.addData(FintResource\n .with(batcave)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"ROBIN\").build())\n );\n\n Identifikator batmobileId = new Identifikator();\n batmobileId.setIdentifikatorverdi(\"BATMOBILE\");\n Rettighet batmobile = new Rettighet();\n batmobile.setSystemId(batmobileId);\n batmobile.setKode(\"BAT-001\");\n batmobile.setNavn(\"Batmobile\");\n batmobile.setBeskrivelse(\"Grants access to driving the ultimate vehicle\");\n responseEvent.addData(FintResource.with(batmobile)\n .addRelations(new Relation.Builder().with(Rettighet.Relasjonsnavn.IDENTITET).forType(Identitet.class).field(\"systemid\").value(\"BATMAN\").build())\n );\n }", "public abstract String getResponseID();", "public void getIdentifiers() throws IOException{\n okhttp3.Request request = new okhttp3.Request.Builder()\n .url(BASE_URL+\"/reportesList\")\n .build();\n\n client.newCall(request).enqueue(new Callback(){\n\n @Override\n public void onFailure(Call call, IOException e) {\n\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n try {\n JSONArray reportes = new JSONArray(response.body().string());\n ArrayList<String> reportesText = new ArrayList<String>();\n\n for (int i = 0; i < reportes.length(); i++) {\n JSONObject js = reportes.getJSONObject(i);\n String id = js.getString(\"identificador\");\n reportesText.add(id);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }\n });\n\n }", "public List getAllIds();", "public List<String> getIdList(RequestInfo requestInfo, String tenantId, String idName, String idformat, int count) {\n\t\t\n\t\tList<IdRequest> reqList = new ArrayList<>();\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\treqList.add(IdRequest.builder().idName(idName).format(idformat).tenantId(tenantId).build());\n\t\t}\n\n\t\tIdGenerationRequest request = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build();\n\t\tStringBuilder uri = new StringBuilder(configs.getIdGenHost()).append(configs.getIdGenPath());\n\t\tIdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request).get(), IdGenerationResponse.class);\n\t\t\n\t\tList<IdResponse> idResponses = response.getIdResponses();\n\t\t\n if (CollectionUtils.isEmpty(idResponses))\n throw new CustomException(\"IDGEN ERROR\", \"No ids returned from idgen Service\");\n \n\t\treturn idResponses.stream().map(IdResponse::getId).collect(Collectors.toList());\n\t}", "@Override\n public List<Result> getResults(String assignmentId) {\n // Gets list of Results Id\n MongoCollection<Assignment> assignmentMongoCollection = mongoDatabase.getCollection(\"assignment\", Assignment.class);\n Assignment assignment = assignmentMongoCollection.find(eq(\"_id\", new ObjectId(assignmentId)), Assignment.class).first();\n\n List<String> resultsId = assignment.getResultsId();\n // Gets all assignments\n MongoCollection<Result> resultMongoCollection = mongoDatabase.getCollection(\"result\", Result.class);\n List<Result> results = new ArrayList<>();\n for (String resultId : resultsId) {\n // Result result = resultMongoCollection.find(eq(\"_id\", new ObjectId(resultId)), Result.class).first();\n results.add(resultMongoCollection.find(eq(\"_id\", new ObjectId(resultId)), Result.class).first());\n }\n\n return results;\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.IdVerificationResponseData getIdVerificationResponseData();", "public void getDisasterMaps( List<String> idList, AsyncHttpResponseHandler handler ) {\n String apiURL = \"\";\n \n for ( String id : idList ) {\n apiURL = String.format(DETAILS_URL, id);\n // Log.d(\"DEBUG\", \"Making 2nd call to \" + apiURL );\n client.get(apiURL, handler);\n }\n \n }", "@Test\n public void test14() {\n int servicesNumbers = response.extract().path(\"data[1].services.size\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The storeId of the all stores are:: \" + servicesNumbers);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "List<PaymentsIdResponse> getAllPaymentsId();", "private Future<List<JsonObject>> fetch(Map<String, List<String>> request) {\n Promise<List<JsonObject>> p = Promise.promise();\n List<String> resIds = new ArrayList<>();\n\n if (request.containsKey(RES)) {\n resIds.addAll(request.get(RES));\n\n // get resGrpId from resID\n resIds.addAll(\n resIds.stream()\n .map(e -> e.split(\"/\"))\n .map(obj -> obj[0] + \"/\" + obj[1] + \"/\" + obj[2] + \"/\" + obj[3])\n .collect(Collectors.toList()));\n }\n\n if (request.containsKey(RES_GRP)) resIds.addAll(request.get(RES_GRP));\n\n List<String> distinctRes = resIds.stream().distinct().collect(Collectors.toList());\n\n List<Future> fetchFutures =\n distinctRes.stream().map(this::fetchItem).collect(Collectors.toList());\n\n CompositeFuture.all(fetchFutures)\n .onSuccess(\n successHandler -> {\n p.complete(\n fetchFutures.stream()\n .map(x -> (JsonObject) x.result())\n .collect(Collectors.toList()));\n })\n .onFailure(\n failureHandler -> {\n p.fail(failureHandler);\n });\n return p.future();\n }", "public String getResponseId() {\n return responseId;\n }", "public ResultSet getAllQuestionnaireResponses () throws Exception {\r\n String sql = \"SELECT * FROM questionnaireresponses;\";\r\n return stmt.executeQuery(sql);\r\n }", "public List<UserDetailed> getUserDetailsForTest(ObjectId testId) {\n Test test = examinationDao.getTest(testId).orElseThrow(() -> new WebApplicationException(\"Invalid test id.\"));\n List<Registration> registrations = registrationDao.getAllRegistrationForTest(testId);\n Set<ObjectId> userIds = registrations.stream().map(Registration::getUserId).collect(Collectors.toSet());\n List<User> registeredUsers = userDao.getSpecificUsers(userIds);\n HashMap<ObjectId, User> userIdMap = new HashMap<>();\n registeredUsers.forEach(candidate -> userIdMap.put(candidate.getId(), candidate));\n List<UserDetailed> candidateResource = registrations.stream().map(registrationEntry -> {\n User user = userIdMap.get(registrationEntry.getUserId());\n return new UserDetailed(\n registrationEntry.getId(),\n user.getName(),\n registrationEntry.getRegistration(),\n user.getPhone(),\n user.getPicture()\n );\n }).collect(Collectors.toList());\n return candidateResource;\n }", "public List<Integer> getIds(int conId, int type, int state) throws AppException;", "@Test\r\n\tpublic void testfetchServicoItensById2() throws Exception\r\n\t{\n\t\tFetchByIdRequest request = new FetchByIdRequest();\r\n\t\trequest.setFetchId(3);\r\n\t\tInternalResultsResponse<ServicoItens> response = getServicoItensDAC().fetchServicoItensById(request);\r\n\t\tassertTrue(response.getResultsSetInfo().getPageSize() == 1);\r\n\t\tassertEquals(response.getStatus(), Status.OperationSuccess);\r\n\t}", "public List<ATWResponse> findResponsesByUserIdAndRequestId(int userId,\n\t\t\tint requestID) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<ATWResponse> list = entityManager.createQuery(findByRequestAndUserID)\n\t\t\t.setParameter(1, userId )\n\t\t\t.setParameter(2, requestID)\n\t\t\t.getResultList();\n\t\tif(list != null) {System.out.println(\"Response by rid and uid List size = \"+list.size());}\n\t\telse { System.out.println(\"Response List by rid and uid is NULL\");}\n\t\treturn list;\n\t}", "@Test\n public void fetchMultipleRefund() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"entity\\\": \\\"collection\\\",\\n\" +\n \" \\\"count\\\": 1,\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": \\\"rfnd_FP8DDKxqJif6ca\\\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 300100,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FIKOnlyii5QGNx\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Comment for refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {\\n\" +\n \" \\\"arn\\\": \\\"10000000000000\\\"\\n\" +\n \" },\\n\" +\n \" \\\"created_at\\\": 1597078124,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"normal\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n List<Refund> fetch = refundClient.fetchMultipleRefund(REFUND_ID);\n assertNotNull(fetch);\n assertTrue(fetch.get(0).has(\"id\"));\n assertTrue(fetch.get(0).has(\"entity\"));\n assertTrue(fetch.get(0).has(\"amount\"));\n assertTrue(fetch.get(0).has(\"currency\"));\n assertTrue(fetch.get(0).has(\"payment_id\"));\n String fetchRequest = getHost(String.format(Constants.REFUND_MULTIPLE,REFUND_ID));\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}", "public abstract Response[] collectResponse();", "static ArrayList<Integer> getAllQuestionIDs(Context context){\n JsonReader reader;\n ArrayList<Integer> questionIDs = new ArrayList<>();\n try {\n reader = readJSONFromAsset(context);\n reader.beginArray();\n while (reader.hasNext()) {\n questionIDs.add(readQuestion(reader).getQuestionID());\n }\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return questionIDs;\n }", "public PaypalIpn[] findWhereResponseEquals(String response) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE response = ? ORDER BY response\", new Object[] { response } );\r\n\t}", "@Override\n\t\tpublic oep_ResponseInfo gettestdetails(String courseid,String roleid) {\n\t\t\tif(roleid.equals(\"2\")){\n\t\t\t/*String coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a JOIN `subject_master` b ON a.`course_id`= b.`course_id`\"\n + \" JOIN `faculty_master` c ON c.`main_subject`= b.`sub_id` WHERE c.`faculty_id`=\"+facultyid;*/\n\t\t\t\t\n\t\t\t\tString coursedetailsquery=\"SELECT `id` test_id, `test_name` FROM `question_master` WHERE `sub_id` = \"+courseid;\n\t\t\t\t\n\t\t\tlog.info(coursedetailsquery);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"testid\", rs.getString(\"test_id\"));\n\t\t\t\t\tmap.put(\"testname\", rs.getString(\"test_name\"));\n\t\t\t\t\n\t\t\t\t\treturn map;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tresponse.setResponseObj(coursedetailsList);\n\t\t\t}else if(roleid.equals(\"4\")){\n\t\t\t\tString coursedetailsquery=\"SELECT `id` test_id, `test_name` FROM `question_master` WHERE `sub_id` = \"+courseid;\n\t\t\tlog.info(coursedetailsquery);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\tmap.put(\"testid\", rs.getString(\"test_id\"));\n\t\t\t\t\tmap.put(\"testname\", rs.getString(\"test_name\"));\n\t\t\t\t\n\t\t\t\t\treturn map;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tresponse.setResponseObj(coursedetailsList);\n\t\t\t}else{\n\t/*String coursedetailsquery=\"SELECT a.`course_id`,`course_name` FROM `course_master` a JOIN `subject_master` b ON a.`course_id`= b.`course_id`\"\n + \" JOIN `faculty_master` c ON c.`main_subject`= b.`sub_id` WHERE c.`faculty_id`=\"+facultyid;*/\n\t\n\t String coursedetailsquery=\"SELECT `id` test_id, `test_name` FROM `question_master` WHERE `sub_id` = \"+courseid;\n\t\n\t\tlog.info(coursedetailsquery);\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Object> coursedetailsList = jdbcTemplate.query(coursedetailsquery, new RowMapper() {\n\t\t\n\t\t@Override\n\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tmap.put(\"testid\", rs.getString(\"test_id\"));\n\t\tmap.put(\"testname\", rs.getString(\"test_name\"));\n\t\t\n\t\treturn map;\n\t\t\n\t\t}\n\t\t});\n\t\t\n\t\tresponse.setResponseType(\"S\");\n\t\tresponse.setResponseObj(coursedetailsList);\n\t\t}\n\t\t\tresponseInfo.setInventoryResponse(response);\n\t\t\treturn responseInfo;\n\t\t}", "public HashMap<Integer, String> getAPIIdResponse(String filePath, String httpMethod) {\n\t\tHashMap<Integer, String> map = new HashMap<Integer, String>();\n\t\ttry {\n\t\t\tHTTPClient.setMaximumThreadConnection(DataProvider.SET_MAXIMUM_THREAD_CONNECTION);\n\t\t\tList<String> file1URIs = ClassFactory.getFileUtilityInstance().getURIsFromFile(filePath);\n\t\t\t// create a thread for each URI\n\t\t\tfor (int i = 0; i < file1URIs.size(); i++) {\n\t\t\t\tint id = i + 1;\n\t\t\t\tHTTPClient client = new HTTPClient(id, file1URIs.get(i), httpMethod);\n\t\t\t\tclient.start();\n\t\t\t\tclient.join();\n\t\t\t\tmap.put(id, client.getResponse());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error in getting API ID and Response Value\" + e.getMessage());\n\t\t}\n\t\treturn map;\n\t}", "@Test\n public void fetchAll() throws RazorpayException{\n String mockedResponseJson = \"{\\n\" +\n \" \\\"entity\\\": \\\"collection\\\",\\n\" +\n \" \\\"count\\\": 1,\\n\" +\n \" \\\"items\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": \\\"rfnd_FFX6AnnIN3puqW\\\",\\n\" +\n \" \\\"entity\\\": \\\"refund\\\",\\n\" +\n \" \\\"amount\\\": 88800,\\n\" +\n \" \\\"currency\\\": \\\"INR\\\",\\n\" +\n \" \\\"payment_id\\\": \\\"pay_FFX5FdEYx8jPwA\\\",\\n\" +\n \" \\\"notes\\\": {\\n\" +\n \" \\\"comment\\\": \\\"Issuing an instant refund\\\"\\n\" +\n \" },\\n\" +\n \" \\\"receipt\\\": null,\\n\" +\n \" \\\"acquirer_data\\\": {},\\n\" +\n \" \\\"created_at\\\": 1594982363,\\n\" +\n \" \\\"batch_id\\\": null,\\n\" +\n \" \\\"status\\\": \\\"processed\\\",\\n\" +\n \" \\\"speed_processed\\\": \\\"optimum\\\",\\n\" +\n \" \\\"speed_requested\\\": \\\"optimum\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n\n try {\n mockResponseFromExternalClient(mockedResponseJson);\n mockResponseHTTPCodeFromExternalClient(200);\n List<Refund> fetch = refundClient.fetchAll();\n assertNotNull(fetch);\n assertTrue(fetch.get(0).has(\"id\"));\n assertTrue(fetch.get(0).has(\"entity\"));\n assertTrue(fetch.get(0).has(\"amount\"));\n assertTrue(fetch.get(0).has(\"currency\"));\n assertTrue(fetch.get(0).has(\"payment_id\"));\n String fetchRequest = getHost(Constants.REFUNDS);\n verifySentRequest(false, null, fetchRequest);\n } catch (IOException e) {\n assertTrue(false);\n }\n }", "public objData getAnswerX(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT ADB_REFID, TDB_REFID, ADB_ANS, ADB_SET_SCORE, AC_REFID FROM ANSWER_DB WHERE ADB_REFID='\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "protected abstract List<Long> readIds(ResultSet resultSet, int loadSize) throws SQLException;", "public List<SurveyPullResponse> getUserCompletedSurvey(int batchSize,Application passport);", "@Test\n public void testDAM31901001() {\n // in this case, there are different querirs used to generate the ids.\n // the database id is specified in the selectKey element\n testDAM30602001();\n }", "@Test\n public void testGetAllPageIdsOfMetsDocument() throws Exception {\n System.out.println(\"getAllPageIdsOfMetsDocument\");\n String resourceId = \"id_0017\";\n String items[] = {\"PAGE-0001\", \"PAGE-0002\"};\n\n this.mockMvc.perform(get(\"/api/v1/metastore/mets/\" + resourceId + \"/pageid\"))\n .andDo(print())\n .andExpect(status().isOk())\n .andExpect(MockMvcResultMatchers.jsonPath(\"$\", Matchers.hasSize(2)))\n .andExpect(MockMvcResultMatchers.jsonPath(\"$.[*]\", Matchers.hasItems(items)))\n .andReturn();\n }", "@Test\n public void testAuthorsGetIDBook() {\n int bookID = 2;\n Response response =\n given().\n pathParam(\"IDBook\", bookID).\n when().\n get(\"/authors/books/{IDBook}\").\n then().\n contentType(ContentType.JSON).\n extract().response();\n // Put all bookIDs into a list\n List<Integer> bookIDs = response.path(\"IDBook\");\n\n // Check that each Author's IDBook for the response is equal to the expected\n for (int ID : bookIDs) {\n assertThat(ID, equalTo(bookID));\n }\n }", "public List queryTest() {\n\t\tList list = null;\n\t\tthis.init();\n\t\t try {\n\t\t\t list= sqlMap.queryForList(\"getAllTest\");\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn list;\n\t\t\n\t}", "@Test\r\n\tpublic void testfetchServicoItensById() throws Exception\r\n\t{\n\t\tFetchByIdRequest request = new FetchByIdRequest();\r\n\t\trequest.setFetchId(3);\r\n\t\tInternalResultsResponse<ServicoItens> response = getServicoItensDAC().fetchServicoItensById(request);\r\n\t\tassertTrue(response.getResultsSetInfo().getPageSize() == 1);\r\n\t\tassertEquals(response.getStatus(), Status.OperationSuccess);\r\n\t}", "public long getResponsedByUserId();", "public byte getResponseId() {\n return responseId;\n }", "public static Map<String, String> fetchQuestionResponses(String instanceId,\r\n \t\t\tString serverBase) throws Exception {\r\n \t\tString instanceValues = fetchDataFromServer(serverBase\r\n \t\t\t\t+ DATA_SERVLET_PATH\r\n \t\t\t\t+ DataBackoutRequest.LIST_INSTANCE_RESPONSE_ACTION + \"&\"\r\n \t\t\t\t+ DataBackoutRequest.SURVEY_INSTANCE_ID_PARAM + \"=\"\r\n \t\t\t\t+ instanceId);\r\n \t\treturn parseInstanceValues(instanceValues);\r\n \t}", "@Test\n void test_getReviewMappingbycourseid() throws Exception{\n List<ReviewMapping> reviewList=new ArrayList<>();\n\n for(long i=1;i<6;i++)\n {\n reviewList.add( new ReviewMapping(i,new Long(1),new Long(1),\"good\",3));\n }\n Mockito.when(reviewRepository.findmapbycourseid(1L)).thenReturn(reviewList);\n List<ReviewMapping> ans=reviewService.getReviewByCourseId(1L);\n assertThat(ans.get(0).getId(),equalTo(1l));\n }", "@Test\n public void getretrieveOffersByContentIdTest() throws IOException {\n\n\n String contentid = Arrays.asList(\"contentid_example\").get(0);\n\n\n RetrieveOffersByContentIdgetResponse response = api.getretrieveOffersByContentId(contentid, null, null, null, null);\n }", "java.util.List<org.apache.calcite.avatica.proto.Responses.ResultSetResponse> \n getResultsList();", "public static Map<String, String> fetchInstanceIds(String surveyId,\r\n \t\t\tString serverBase) throws Exception {\r\n \t\tMap<String, String> values = new HashMap<String, String>();\r\n \t\tString instanceString = fetchDataFromServer(serverBase\r\n \t\t\t\t+ DATA_SERVLET_PATH + DataBackoutRequest.LIST_INSTANCE_ACTION\r\n \t\t\t\t+ \"&\" + DataBackoutRequest.SURVEY_ID_PARAM + \"=\" + surveyId\r\n \t\t\t\t+ \"&\" + DataBackoutRequest.INCLUDE_DATE_PARAM + \"=true\");\r\n \t\tif (instanceString != null) {\r\n \t\t\tStringTokenizer strTok = new StringTokenizer(instanceString, \",\");\r\n \t\t\twhile (strTok.hasMoreTokens()) {\r\n \t\t\t\tString instanceId = strTok.nextToken();\r\n \t\t\t\tString dateString = \"\";\r\n \t\t\t\tif (instanceId.contains(\"|\")) {\r\n \t\t\t\t\tdateString = instanceId\r\n \t\t\t\t\t\t\t.substring(instanceId.indexOf(\"|\") + 1);\r\n \t\t\t\t\tinstanceId = instanceId.substring(0, instanceId\r\n \t\t\t\t\t\t\t.indexOf(\"|\"));\r\n \t\t\t\t}\r\n \t\t\t\tvalues.put(instanceId, dateString);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn values;\r\n \t}", "public static ArrayList<String> getRunnableTestDataIDs(XLS_Reader xls, String sheetName) {\n\t\tArrayList<String> testDataIDs = new ArrayList<>();\n\t\tfor (int i = 1; i < xls.GetColumnCount(sheetName); i++) {\n\t\t\tString Status = xls.getCellData_ColumnWise(sheetName, i, \"RunStatus\");\n\t\t\tif (Status.equalsIgnoreCase(\"Y\") || Status.equalsIgnoreCase(\"Yes\")) {\n\t\t\t\ttestDataIDs.add(xls.getCellData_ColumnWise(sheetName, i, \"TestCaseID\"));\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\txls = null; // release memory\n\t\treturn testDataIDs;\n\t}", "@Test\n public void test19(){\n // List<Integer> services = response.extract().path(\"data.findAll{it.services=='Samsung Experience'}.storeservices\");\n //List<HashMap<String, ?>> address = response.extract().path(\"data.findAll{it.service=='Samsung Experience'}.storeservices\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" );\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Override\n\t\tpublic oep_ResponseInfo getQuestionbankdetails(String questionid) {\n\t\t\t\n\t\t\tString query = \"SELECT `id`,`test_id`,`batch`,`test_name`,a.`sub_id`,a.`status`,`course_name` FROM `question_master` a \"\n\t\t\t\t\t+ \" JOIN `course_master` b ON a.`sub_id` = b.`course_id` WHERE a.`id` = \"+questionid+\" \";\n\t\t\t\n\t\t\tlog.info(query);\n\t\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> questionmasterList = jdbcTemplate.query(query, new RowMapper() {\n\t\t\t\tint count = 1;\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\t\n\t\t\t\t\tmap.put(\"id\", rs.getString(\"id\"));\n\t\t\t\t\tmap.put(\"batch\", rs.getString(\"batch\"));\n\t\t\t\t\tmap.put(\"testid\", rs.getString(\"test_id\"));\n\t\t\t\t\tmap.put(\"testname\", rs.getString(\"test_name\"));\n\t\t\t\t\t/*map.put(\"subjectid\", rs.getString(\"sub_id\"));\n\t\t\t\t\tmap.put(\"subjectname\", rs.getString(\"sub_name\"));*/\n\t\t\t\t\t\n\t\t\t\t\tmap.put(\"courseid\", rs.getString(\"sub_id\"));\n\t\t\t\t\tmap.put(\"coursename\", rs.getString(\"course_name\"));\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(rs.getString(\"status\")!= null && rs.getString(\"status\").equals(\"1\")){\n\t\t\t\t\t\tmap.put(\"status\", \"Active\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmap.put(\"status\", \"Inactive\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tmap.put(\"index\",count);\n\t\t\t\t\tcount++;\n\t\t\t\t\treturn map;\n\t\t\t\t}\n\t\t\t});\n\t\t\tString questiondetailsquery=\"SELECT * FROM `question_details` WHERE `ques_master_id`=\"+questionid;\n\t\t\t\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<Object> questiondetailsList = jdbcTemplate.query(questiondetailsquery, new RowMapper() {\n\t\t\t\tint count = 1;\n\t\t\t\t@Override\n\t\t\t\tpublic Object mapRow(ResultSet rs, int arg1) throws SQLException {\n\t\t\t\t\t\n\t\t\t\t\tMap<String, Object> map = new LinkedHashMap<String, Object>();\n\t\t\t\t\tmap.put(\"No\",count);\n\t\t\t\t\tmap.put(\"Question\", rs.getString(\"question\"));\n\t\t\t\t\tmap.put(\"Type\", rs.getString(\"question_type\"));\n\t\t\t\t\tmap.put(\"Option_1\", rs.getString(\"option_1\"));\n\t\t\t\t\tmap.put(\"Option_2\", rs.getString(\"option_2\"));\n\t\t\t\t\tmap.put(\"Option_3\", rs.getString(\"option_3\"));\n\t\t\t\t\tmap.put(\"Option_4\", rs.getString(\"option_4\"));\n\t\t\t\t\tmap.put(\"Answer\", rs.getString(\"answer\"));\n\t\t\t\t\tmap.put(\"Image\", rs.getString(\"image\"));\n\t\t\t\t\tmap.put(\"Mark\", rs.getString(\"mark\"));\n\t\t\t\t\tmap.put(\"Question_id\", rs.getString(\"question_id\"));\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\t\t\t\t\treturn map;\n\t\t\t\t}\n\t\t\t});\n\t\t\tresponse.setResponseType(\"S\");\n\t\t\tMap<String, Object> detailsmap = new HashMap<String, Object>();\n\t\t\tdetailsmap.put(\"questionmasterList\", questionmasterList);\n\t\t\tdetailsmap.put(\"questiondetailsList\", questiondetailsList);\n\t\t\tresponse.setResponseObj(detailsmap);\n\t\t\tresponseInfo.setInventoryResponse(response);\n\t\t\treturn responseInfo;\n\t\t}", "private TreeSet<Long> getIds(Connection connection) throws Exception {\n\t\tTreeSet<Long> result = new TreeSet<Long>();\n\t\tPreparedStatement ps = null;\n\t\ttry {\n\t\t\tps = connection\n\t\t\t\t\t.prepareStatement(\"select review_feedback_id from \\\"informix\\\".review_feedback\");\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tresult.add(rs.getLong(1));\n\t\t\t}\n\t\t} finally {\n\t\t\tps.close();\n\t\t}\n\t\treturn result;\n\t}", "java.util.List<com.google.search.now.wire.feed.mockserver.MockServerProto.ConditionalResponse> \n getConditionalResponsesList();", "@Test\n public void test18() {\n\n List<Integer> services = response.extract().path(\"data.findAll{it.name=='Fargo'}.zip\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The name of all services:\" + services);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public List<Event> getAllResponsesByResponder(String responder_name) {\n List<Event> events = new ArrayList<Event>();\n\n String selectQuery = \"SELECT * FROM \" + EVENTS_TABLE_NAME + \" evt, \"\n + EVENTS_TABLE_NAME + \" resp, \" + RESPONDERS_EVENTS_TABLE_NAME + \" resp_evt WHERE resp.\"\n + EVENT_NAME + \" = '\" + responder_name + \"'\" + \" AND resp.\" + KEY_ID\n + \" = \" + \"resp_evt.\" + RESPONDERS_EVENTS_EVENTS_ID + \" AND evt.\" + KEY_ID + \" = \"\n + \"resp_evt.\" + RESPONDERS_EVENTS_RESPONDERS_ID;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Event evt = new Event();\n evt.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n evt.setEventName((c.getString(c.getColumnIndex(EVENT_NAME))));\n evt.setDate(c.getString(c.getColumnIndex(EVENT_DATE)));\n\n events.add(evt);\n } while (c.moveToNext());\n }\n\n return events;\n }", "java.util.List<GoogleGRPC_08.proto.StudentResponse> \n getStudentResponseList();", "static public List<InlineResponse2002> articlesFeedIdGet(String id)\n {\n ArrayList<InlineResponse2002> l = new ArrayList<>();\n\n for (int i = 0; i < 512; i += (i % 2 == 0) ? 3 : 7)\n {\n InlineResponse2002 a = new InlineResponse2002();\n\n a.setId(i);\n a.setTitle(\"Some random [\" + i + \"] article\");\n l.add(a);\n }\n return l;\n }", "int getResponsesCount();", "public objData getTestSet(String id){\n objData objdata = new objData();\n try{\n MainClient mc = new MainClient(DBConn.getHost());\n\n String query = \"SELECT TSDB_REFID, TSDB_SET_NAME, TST_REFID FROM TEST_SET_DB WHERE TSDB_REFID = '\" + id + \"'\";\n String data[] = {};\n\n objdata.setTableData(mc.getQuery(query,data));\n }\n catch(Exception e){\n objdata.setErrorMessage(e.toString());\n objdata.setFlag(1);\n }\n return objdata;\n }", "public java.util.List<org.jooq.examples.h2.matchers.tables.pojos.XTestCase_64_69> fetchById(java.lang.Integer... values) {\n\t\treturn fetch(org.jooq.examples.h2.matchers.tables.XTestCase_64_69.ID, values);\n\t}", "private String generatorResponse(int countLines) {\n return this.answersList.get(new Random().nextInt(countLines));\n }", "private static void verifyMocksCalled(DataRequestResponse response) {\n for (ConnectionDetail entry : response.getResources().values()) {\n verify(((DataService) entry.createService()), times(1)).read(any());\n }\n }", "@Test\n public void getReportTest() throws Exception {\n httpclient = HttpClients.createDefault();\n //set up user\n deleteUsers();\n String userId = createTestUser();\n //created user\n CloseableHttpResponse response = createProject(\"projectname\", userId);\n String projectid = getIdFromResponse(response);//getIdFromResponse hasn't been implimented in this part\n response.close();\n //created project\n response = createSession(userId, projectid, \"2019-02-18T20:00Z\", \"2019-02-18T20:30Z\", \"1\");\n response.close();\n response = createSession(userId, projectid, \"2019-02-18T21:00Z\", \"2019-02-18T21:30Z\", \"1\");\n response.close();\n\n try {\n //case 1\n response = createReport(userId, projectid, \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", false, false);\n \n int status = response.getStatusLine().getStatusCode();\n HttpEntity entity;\n String strResponse;\n if (status == 200) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n String expectedJson = \"{\\\"sessions\\\":[{\\\"startingTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T20:30Z\\\",\\\"hoursWorked\\\":0.50},{\\\"startingTime\\\":\\\"2019-02-18T21:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T21:30Z\\\",\\\"hoursWorked\\\":0.50}]}\";\n JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n //case 2\n response = createReport(userId, projectid, \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", true, false);\n \n status = response.getStatusLine().getStatusCode();\n\n if (status == 200) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n expectedJson = \"{\\\"sessions\\\":[{\\\"startingTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T20:30Z\\\",\\\"hoursWorked\\\":0.50},{\\\"startingTime\\\":\\\"2019-02-18T21:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T21:30Z\\\",\\\"hoursWorked\\\":0.50}],\\\"completedPomodoros\\\":2}\";\n JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n //case 3\n response = createReport(userId, projectid, \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", false, true);\n \n status = response.getStatusLine().getStatusCode();\n\n if (status == 200) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n expectedJson = \"{\\\"sessions\\\":[{\\\"startingTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T20:30Z\\\",\\\"hoursWorked\\\":0.50},{\\\"startingTime\\\":\\\"2019-02-18T21:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T21:30Z\\\",\\\"hoursWorked\\\":0.50}],\\\"totalHoursWorkedOnProject\\\":1.00}\";\n JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n //case 4\n response = createReport(userId, projectid, \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", true, true);\n \n status = response.getStatusLine().getStatusCode();\n\n if (status == 200) {\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n expectedJson = \"{\\\"sessions\\\":[{\\\"startingTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T20:30Z\\\",\\\"hoursWorked\\\":0.50},{\\\"startingTime\\\":\\\"2019-02-18T21:00Z\\\",\\\"endingTime\\\":\\\"2019-02-18T21:30Z\\\",\\\"hoursWorked\\\":0.50}],\\\"completedPomodoros\\\":2,\\\"totalHoursWorkedOnProject\\\":1.00}\";\n JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n\n //test status 400\n response = createReport(userId, projectid, \"invalid\", \"invalid\", true, true);\n status = response.getStatusLine().getStatusCode();\n if(status != 400){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n\n //test status 404\n response = createReport(userId + \"1\", projectid, \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", true, true);\n status = response.getStatusLine().getStatusCode();\n if(status != 404){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n\n response = createReport(userId, projectid + \"1\", \"2019-02-18T20:10Z\", \"2019-02-18T21:20Z\", true, true);\n status = response.getStatusLine().getStatusCode();\n if(status != 404){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n\n } finally {\n httpclient.close();\n }\n }", "@Test\r\n public void testGetDiseasesByHgncGeneId() {\r\n String hgncGeneId = \"HGNC:3689\";\r\n\r\n Set<Disease> result = instance.getDiseasesByHgncGeneId(hgncGeneId);\r\n// System.out.println(\"Human diseases for gene \" + hgncGeneId);\r\n// for (Disease disease : result) {\r\n// System.out.println(disease.getDiseaseId() + \" - \" + disease.getTerm());\r\n// }\r\n assertTrue(result.size() >= 14);\r\n }", "protected void getEventIDs() throws Throwable\n {\n _eventID = _helper.getProperties().getRetrievePendingEventId();\n _ackEventID = _helper.getProperties().getRetrievePendingAckEventId();\n }", "List<Result> getResultsByQuizId(int quizId);", "public int getTotalNumPatientsByObservation(String loincCode) {\n //Place your code here\n HashSet<String> res = new HashSet<String>();\n Bundle response = client.search().forResource(Observation.class).where(Observation.CODE.exactly().systemAndCode(\"http://loinc.org\", loincCode)).returnBundle(Bundle.class).execute();\n\n do{\n for(BundleEntryComponent bec : response.getEntry()){\n Observation ob = (Observation) bec.getResource();\n if (ob.hasSubject()){\n String p = ob.getSubject().getReference();\n if (!p.equals(\"Patient/undefined\")){\n res.add(p);\n\n }\n }\n\n }\n if (response.getLink(Bundle.LINK_NEXT) == null){\n break;\n }\n response = client.loadPage().next(response).execute();\n } while (true);\n\n return res.size();\n }", "org.apache.calcite.avatica.proto.Responses.ResultSetResponse getResults(int index);", "public List<Answer> getAnswers(Integer qusetionCsddId, String qusetionHash) throws MyCustException {\n logger.debug(\"qusetionCsddId \" + qusetionCsddId + \"qusetionHash\" + qusetionHash);\n Connection sqlCon = apacheDerbyClient.getSqlConn();\n List<Answer> answers = new ArrayList<Answer>();\n\n try {\n String sql2 = \"select answer, answerCSDDid from \" + Storage.schemName + \".\" + Storage.TABLE_QUESTION_ANSWERS_LINKER + \" \" +\n \"where 1 = 1 \";\n\n if ((qusetionCsddId != null) && (qusetionCsddId != 0))\n sql2 += \" and questionCSDDid = \" + qusetionCsddId;\n\n if (!qusetionHash.isEmpty())\n sql2 += \" and question = '\" + qusetionHash + \"'\";\n logger.debug(sql2);\n PreparedStatement ps = sqlCon.prepareStatement(sql2);\n\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n Answer answer = new Answer();\n answer.setAnswerHash(rs.getString(\"answer\"));\n answer.setAnswerCsddId(rs.getInt(\"answerCsddId\"));\n\n String sql = \"select answtxt, CSDDid, answcor from \" + Storage.schemName + \".\" + Storage.TABLE_ANSWERS + \" \" +\n \"where CSDDid = \" + answer.getAnswerCsddId() + \" and \" +\n \"hash = '\" + answer.getAnswerHash() + \"'\";\n logger.debug(sql2);\n PreparedStatement ps2 = sqlCon.prepareStatement(sql);\n\n ResultSet rs2 = ps2.executeQuery();\n while (rs2.next()) {\n answer.setAnswerText(rs2.getString(\"answtxt\"));\n answer.setCorrect(rs2.getBoolean(\"answcor\"));\n\n if (!answers.contains(answer))\n answers.add(answer);\n else\n logger.warn(\"records in Answers duplicating !!!: \" + answer.toString());\n }\n }\n } catch (Exception ex) {\n logger.error(\"\", ex);\n }\n return answers;\n }", "private void getEKIDs() {\n if (!CloudSettingsManager.getUserID(getContextAsync()).isEmpty()) {\n DataMessenger.getInstance().getEkIds(CloudSettingsManager.getUserID(getContextAsync()), new RestApi.ResponseListener() {\n @Override\n public void start() {\n Log.i(TAG, \"Request started\");\n }\n\n @Override\n public void success(HttpResponse rsp) {\n if (rsp != null) {\n if (rsp.statusCode == 200) {\n if (rsp.body != null) {\n MgmtGetEKIDRsp result = new Gson().fromJson(rsp.body, MgmtGetEKIDRsp.class);\n if (result.getDevices().size() == 0) {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty);\n } else {\n updateAdapter(result.getDevices());\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n } else {\n GenericRsp genericRsp = new Gson().fromJson(rsp.body, GenericRsp.class);\n if (genericRsp != null && !genericRsp.isResult()) {\n Utils.showToast(getContextAsync(), genericRsp.getReasonCode());\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void failure(Exception error) {\n if (error instanceof UnknownHostException) {\n Utils.showToast(getContextAsync(), R.string.connectivity_error);\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_error);\n }\n }\n\n @Override\n public void complete() {\n Log.i(TAG, \"Request completed\");\n }\n });\n } else {\n Utils.showToast(getContextAsync(), R.string.get_cloud_ekids_empty_userid);\n }\n }", "@Override\r\n\tpublic List<NssResponseBean> getNssResponse(int transactionId) {\n\t\treturn responseDao.getNssResponseById(transactionId);\r\n\t}", "public static ArrayList<String> getRunnableTestDataIDs_col(XLS_Reader xls, String sheetName) {\n\t\tArrayList<String> testDataIDs = new ArrayList<>();\n\t\tfor (int i = 1; i < xls.GetRowCount(sheetName); i++) {\n\t\t\tString Status = xls.getCellData_ColumnWise(sheetName, \"RunStatus\", i);\n\t\t\tif (Status.equalsIgnoreCase(\"Y\") || Status.equalsIgnoreCase(\"Yes\")) {\n\t\t\t\ttestDataIDs.add(xls.getCellData_ColumnWise(sheetName, \"TestCaseID\", i));\n\t\t\t} else {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\txls = null; // release memory\n\t\treturn testDataIDs;\n\t}", "public void setResponseId(String responseId) {\n this.responseId = responseId;\n }", "@Override\n\t@Transactional\n\tpublic List<Question> getQuestionsByTestId(int id) {\n\t\treturn questionDao.getQuestionsByTestId(id);\n\t}", "protected List<Long> getMoreIds(int requestSize) {\n\n String sql = getSql(requestSize);\n\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n try {\n connection = dataSource.getConnection();\n\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n\n List<Long> newIds = readIds(resultSet, requestSize);\n if (newIds.isEmpty()) {\n throw new PersistenceException(\"Always expecting more than 1 row from \" + sql);\n }\n\n return newIds;\n\n } catch (SQLException e) {\n if (e.getMessage().contains(\"Database is already closed\")) {\n String msg = \"Error getting SEQ when DB shutting down \" + e.getMessage();\n log.log(ERROR, msg);\n System.out.println(msg);\n return Collections.emptyList();\n } else {\n throw new PersistenceException(\"Error getting sequence nextval\", e);\n }\n } finally {\n closeResources(connection, statement, resultSet);\n }\n }", "@Test\n\tpublic void getSurveyIdTest() throws Exception {\n\t\tmockMvc.perform(MockMvcRequestBuilders.get(\"/getsurveybyid/962\")\n\t\t .contentType(MediaType.APPLICATION_JSON)\n\t\t\t\t.accept(MediaType.APPLICATION_JSON))\n\t\t\t\t.andExpect(status().isFound());\n\t}", "@Order(2)\n\t\t@TestFactory\n\t\tpublic Iterable<DynamicTest> getMessageTest() throws IOException, ParseException {\n\t\t\t\n\t\t\tCollection<DynamicTest> tests = new ArrayList<DynamicTest>();\n\t\t\tString allMessagesResponse = Requests.getMessage(\"\");\n\t\t\t\n\t\t\tArrayList<String> idList = JSONUtils.getAllRecordsByKey(allMessagesResponse, \"id\");\n\t\t\t\n\t\t\tfor (String id : idList){\n\t\t\t\tboolean response = Requests.sendGETBoolReturn(Requests.MESSAGE_URL, id);\n\t\t\t\t\n\t\t\t tests.add(DynamicTest.dynamicTest(\"Was a GET of an existing message successful\", () -> assertTrue(response)));\n\t\t\t}\n\t\t\treturn tests;\n\t\t}", "@Test\r\n public void testGetPredictedDiseaseAssociationsForMgiGeneId() {\r\n String mgiGeneId = \"MGI:95523\";\r\n\r\n Map<Disease, Set<DiseaseAssociation>> result = instance.getPredictedDiseaseAssociationsForMgiGeneId(mgiGeneId);\r\n \r\n// for (Disease disease : result.keySet()) {\r\n// System.out.println(disease);\r\n// for (DiseaseAssociation diseaseAssociation : result.get(disease)) {\r\n// System.out.println(String.format(\" %s\", diseaseAssociation));\r\n// }\r\n// }\r\n assertTrue(result.keySet().size() > 290);\r\n }", "boolean isSetIdVerificationResponseData();", "@Test\n public void test13() {\n List<String> name = response.extract().path(\"data.findAll{it.state=='MN'}.name\");\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The store names where state is MN are :: \" + name);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n public void listAll_200() throws Exception {\n\n // PREPARE THE DATABASE\n // Fill in the workflow db\n List<Workflow> wfList = new ArrayList<>();\n wfList.add(addMOToDb(1));\n wfList.add(addMOToDb(2));\n wfList.add(addMOToDb(3));\n\n // PREPARE THE TEST\n // Fill in the workflow db\n\n // DO THE TEST\n Response response = callAPI(VERB.GET, \"/mo/\", null);\n\n // CHECK RESULTS\n int status = response.getStatus();\n assertEquals(200, status);\n\n List<Workflow> readWorkflowList = response.readEntity(new GenericType<List<Workflow>>() {\n });\n assertEquals(wfList.size(), readWorkflowList.size());\n for (int i = 0; i < wfList.size(); i++) {\n assertEquals(wfList.get(i).getId(), readWorkflowList.get(i).getId());\n assertEquals(wfList.get(i).getName(), readWorkflowList.get(i).getName());\n assertEquals(wfList.get(i).getDescription(), readWorkflowList.get(i).getDescription());\n }\n\n\n }", "java.util.List<com.google.protobuf.ByteString> getResponseList();", "@Test\r\n\tpublic void getAllIncidents() {\n\t\tRestAssured.baseURI = \"https://dev49243.service-now.com/api/now/table/incident\";\r\n\t\t\r\n\t\t// Step 2: Authentication (basic)\r\n\t\tRestAssured.authentication = RestAssured.basic(\"admin\", \"Tuna@123\");\r\n\t\t\r\n\t\t// Step 3: Request type - Get -> Response\r\n\t\tResponse response = RestAssured.get();\r\n\t\t\r\n\t\t// Step 4: Validate (Response -> Status Code : 200)\r\n\t\tSystem.out.println(response.getStatusCode());\r\n\t\t\r\n\t\t// Print the response time as well \r\n\t\t\r\n\t\t// Check what is the response format\r\n\t\tSystem.out.println(response.getContentType());\r\n\t\t\r\n\t\t// print the response\r\n\t\tresponse.prettyPrint();\r\n\t\t\r\n\t}", "private HashMap<String, String> getAnswerIdsByID(String id)\n\t{\n\t\tHashMap<String, String> ans_map = new HashMap<String, String>();\n\t\tNode ans_l10ns = doc.selectSingleNode(\"//document/answer_l10ns/rows\");\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Element> a_meta = doc.selectNodes(\"//document/answers/rows/row[qid=\" + id +\"]\");\n\t\tfor (Element elem : a_meta) {\n\t\t\tans_map.put(elem.elementText(\"aid\"), ans_l10ns.selectSingleNode(\"row[aid=\" + elem.elementText(\"aid\") + \"]/answer\").getText());\n\t\t}\n\t\treturn ans_map;\n\t}", "@Override\n public void onResponse(String response) {\n String[] IDs = response.split(\",\");\n //now we know how many invoices do we need to create the same number of buttons\n listener.onInvoicesRetrievalSuccess(IDs);\n }", "@Override\n public void onResponse(String response) {\n String[] IDs = response.split(\",\");\n //now we know how many invoices do we need to create the same number of buttons\n listener.onInvoicesRetrievalSuccess(IDs);\n }", "@Test\n public void test010() {\n List<String> storeServices = response.extract().path(\"data.services[9].storeservices\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"get storeservices of the store where service name = Sony Experience:\" + storeServices);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "public Future<Map<String, UUID>> getResOwners(List<String> resId) {\n {\n Promise<Map<String, UUID>> p = Promise.promise();\n\n Collector<Row, ?, Map<String, UUID>> ownerCollector =\n Collectors.toMap(row -> row.getString(CAT_ID), row -> row.getUUID(PROVIDER_ID));\n pool.withConnection(\n conn ->\n conn.preparedQuery(GET_RES_OWNERS)\n .collecting(ownerCollector)\n .execute(Tuple.of(resId.toArray()))\n .onFailure(\n obj -> {\n LOGGER.error(\"getResOwners db fail :: \" + obj.getLocalizedMessage());\n p.fail(INTERNALERROR);\n })\n .onSuccess(\n success -> {\n p.complete(success.value());\n }));\n\n return p.future();\n }\n }", "@Test\r\n public void testListRegistrations1() throws Throwable {\r\n // Parameters for the API call\r\n Double limit = 10d;\r\n Double offset = 20d;\r\n Options8Enum options = null;\r\n\r\n // Set callback and perform API call\r\n List<ListRegistrationsResponse> result = null;\r\n controller.setHttpCallBack(httpResponse);\r\n try {\r\n result = controller.listRegistrations(limit, offset, options);\r\n } catch(APIException e) {};\r\n\r\n // Test whether the response is null\r\n assertNotNull(\"Response is null\", \r\n httpResponse.getResponse());\r\n // Test response code\r\n assertEquals(\"Status is not 200\", \r\n 200, httpResponse.getResponse().getStatusCode());\r\n\r\n // Test whether the captured response is as we expected\r\n assertNotNull(\"Result does not exist\", \r\n result);\r\n assertTrue(\"Response body does not match in keys\", TestHelper.isArrayOfJsonObjectsProperSubsetOf(\r\n \"[ { \\\"id\\\": \\\"abcdefg\\\", \\\"description\\\": \\\"Example Context Source\\\", \\\"dataProvided\\\": { \\\"entities\\\": [ { \\\"id\\\": \\\"Bcn_Welt\\\", \\\"type\\\": \\\"Room\\\" } ], \\\"attrs\\\": [ \\\"temperature\\\" ] }, \\\"provider\\\": { \\\"http\\\": { \\\"url\\\": \\\"http://contextsource.example.org\\\" }, \\\"supportedForwardingMode\\\": \\\"all\\\" }, \\\"expires\\\": \\\"2017-10-31T12:00:00\\\", \\\"status\\\": \\\"active\\\", \\\"forwardingInformation\\\": { \\\"timesSent\\\": 12, \\\"lastForwarding\\\": \\\"2017-10-06T16:00:00.00Z\\\", \\\"lastSuccess\\\": \\\"2017-10-06T16:00:00.00Z\\\", \\\"lastFailure\\\": \\\"2017-10-05T16:00:00.00Z\\\" } }]\", \r\n TestHelper.convertStreamToString(httpResponse.getResponse().getRawBody()), \r\n false, true, false));\r\n }", "public Integer getRepeatedResponses() {\r\n return repeatedResponses;\r\n }", "List<String> findAllIds();", "int getIdsCount();", "public Set<Integer> getFourEndorsments(int id) throws SQLException {\n\n Set<Integer> list = new HashSet<Integer>();\n try {\n String query = \"select * from endorsment uf1\\n\"\n + \" inner join endorsment uf2 on uf1.id_endorst = uf2.id_endorses\\n\"\n + \" inner join endorsment uf3 on uf2.id_endorst = uf3.id_endorses\\n\"\n + \" inner join endorsment uf4 on uf3.id_endorst = uf4.id_endorses\\n\"\n + \" where uf1.id_endorses = ?\";\n con = getConnectionSQL();\n stmt = con.prepareStatement(query);\n stmt.setInt(1, id);\n rs = stmt.executeQuery();\n //expected 7 results back\n while (rs.next()) {\n int id_endorst = rs.getInt(12);\n list.add(id_endorst);\n //System.out.println(id_endorst);\n }\n return list;\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n closeConnection(con, stmt, rs);\n }\n //close connection\n\n// long after = System.currentTimeMillis();\n// System.out.println(\"The getFourEndorsments took \" + (after - before));\n\n return null;//could be null\n\n }", "public String getTestSetId() {\n return this.testSetId;\n }", "public String getTestSetId() {\n return this.testSetId;\n }", "InternalResultsResponse<Person> fetchAllPersons();", "@Override\n\t\t\tpublic List<TestEntity> fetchAll() \n\t\t\t{\n\t\t\t\tList<TestEntity> tests = testDao.findAll();\n\t\t\t\treturn tests;\n\t\t\t}", "void stubResponses(HttpExecuteResponse... responses);", "@Test\n public void test007() {\n List<HashMap<String, ?>> values = response.extract().path(\"data.findAll{it.name=='Fargo'}\");\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The values for store name is Fargo:\" + values);\n System.out.println(\"------------------End of Test---------------------------\");\n }", "@Test\n public void createSessionTest() throws Exception {\n deleteUsers();\n try {\n //create user & project first\n String userId = createTestUser();\n //created user\n CloseableHttpResponse response = createProject(\"projectname\", userId);\n String projectid = getIdFromResponse(response);//getIdFromResponse hasn't been implimented in this part\n response.close();\n //created project\n response = createSession(userId, projectid, \"2019-02-18T20:00Z\", \"2019-02-18T20:00Z\", \"0\");\n\n int status = response.getStatusLine().getStatusCode();\n HttpEntity entity;\n if (status == 201) {// Covered user cases 7\n entity = response.getEntity();\n } else {\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n String strResponse = EntityUtils.toString(entity);\n\n System.out.println(\"*** String response \" + strResponse + \" (\" + response.getStatusLine().getStatusCode() + \") ***\");\n\n String id = getIdFromStringResponse(strResponse);\n\n String expectedJson = \"{\\\"id\\\":\" + id + \",\\\"startTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"endTime\\\":\\\"2019-02-18T20:00Z\\\",\\\"counter\\\":0}\";\n JSONAssert.assertEquals(expectedJson,strResponse, false);\n EntityUtils.consume(response.getEntity());\n response.close();\n\n //test status 400\n response = createSession(userId, projectid, \"invalid\", \"invalid\", \"0\");\n status = response.getStatusLine().getStatusCode();\n if(status != 400){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n //test status 404\n response = createSession(userId + \"100\", projectid, \"2019-02-18T21:00Z\", \"2019-02-18T21:00Z\", \"0\");\n status = response.getStatusLine().getStatusCode();\n if(status != 404){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n\n response = createSession(userId, projectid + \"100\", \"2019-02-18T21:00Z\", \"2019-02-18T21:00Z\", \"0\");\n status = response.getStatusLine().getStatusCode();\n if(status != 404){\n throw new ClientProtocolException(\"Unexpected response status: \" + status);\n }\n EntityUtils.consume(response.getEntity());\n response.close();\n\n } finally {\n httpclient.close();\n }\n }" ]
[ "0.6302573", "0.60518396", "0.60197467", "0.5820172", "0.5540852", "0.5436802", "0.53405404", "0.52931505", "0.5287845", "0.5284819", "0.5256325", "0.5250213", "0.5204007", "0.5150103", "0.51355976", "0.51200455", "0.5113841", "0.51048726", "0.50984913", "0.5086291", "0.5075125", "0.5070593", "0.504055", "0.5029844", "0.5023436", "0.50220305", "0.49958897", "0.49910265", "0.49730045", "0.49383622", "0.4932791", "0.49321532", "0.49276182", "0.4922324", "0.4921207", "0.49050024", "0.48892495", "0.48881146", "0.48815525", "0.4877303", "0.48672253", "0.48648864", "0.48377496", "0.48344076", "0.4825082", "0.48202115", "0.48191333", "0.4813894", "0.4813425", "0.47988355", "0.47968158", "0.47838065", "0.47837594", "0.47827736", "0.47770476", "0.47755438", "0.4775113", "0.47714636", "0.47691765", "0.47652918", "0.47527608", "0.4743509", "0.474346", "0.47292152", "0.47247306", "0.4718062", "0.47162575", "0.4714411", "0.47136304", "0.47039673", "0.4703316", "0.47007945", "0.46984345", "0.4693521", "0.4686246", "0.4677878", "0.46747673", "0.46745828", "0.46728948", "0.4670114", "0.46688282", "0.4668531", "0.4668192", "0.46630788", "0.46601397", "0.46422553", "0.46422553", "0.4619717", "0.46195757", "0.4617906", "0.46178806", "0.4617216", "0.46158057", "0.4613698", "0.46130627", "0.46130627", "0.46124673", "0.45988497", "0.4598713", "0.45970201", "0.45948568" ]
0.0
-1
TODO Autogenerated method stub
public long getTestId(long projectKey) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO: process events streams.
public void processEvents(Events events) { log.info("events processed: [{}]", events.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void processPostUpdateStream(KStream<String, Event> events) {\n\n\t}", "public void onEvent(EventIterator events) {\n\n }", "private static void send() {\n Map<String, ArrayList<Event>> eventsByStream = new HashMap<>();\n for (Event event : QUEUE) {\n String stream = event.getStream();\n if (!eventsByStream.containsKey(stream) || eventsByStream.get(stream) == null) {\n eventsByStream.put(stream, new ArrayList<>());\n }\n eventsByStream.get(stream).add(event);\n }\n for (String stream : eventsByStream.keySet()) {\n if (Prefs.INSTANCE.isEventLoggingEnabled()) {\n sendEventsForStream(STREAM_CONFIGS.get(stream), eventsByStream.get(stream));\n }\n }\n }", "private void createEvents() {\n\t}", "private void readEvent() {\n\t\t\t\n\t\t\thandlePacket();\n\t\t\t\n\t\t}", "public void processStreamInput() {\n }", "public void process(WatchedEvent event) {\n\t\t\n\t}", "public interface EventSink {\n\n /**\n * Generate event, that a new peer has been discovered for some torrent.\n *\n * @since 1.5\n */\n void firePeerDiscovered(TorrentId torrentId, Peer peer);\n\n /**\n * Generate event, that a new connection with some peer has been established.\n *\n * @since 1.9\n */\n void firePeerConnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that a connection with some peer has been terminated.\n *\n * @since 1.9\n */\n void firePeerDisconnected(ConnectionKey connectionKey);\n\n /**\n * Generate event, that local information about some peer's data has been updated.\n *\n * @since 1.9\n */\n void firePeerBitfieldUpdated(TorrentId torrentId, ConnectionKey connectionKey, Bitfield bitfield);\n\n /**\n * Generate event, that processing of some torrent has begun.\n *\n * @since 1.5\n */\n void fireTorrentStarted(TorrentId torrentId);\n\n /**\n * Generate event, that torrent's metadata has been fetched.\n *\n * @since 1.9\n */\n void fireMetadataAvailable(TorrentId torrentId, Torrent torrent);\n\n /**\n * Generate event, that processing of some torrent has finished.\n *\n * @since 1.5\n */\n void fireTorrentStopped(TorrentId torrentId);\n\n /**\n * Generate event, that the downloading and verification\n * of one of torrent's pieces has been finished.\n *\n * @since 1.8\n */\n void firePieceVerified(TorrentId torrentId, int pieceIndex);\n}", "@Override\n public BaseChangeEvent<T> getNextEvent() throws AppException, IOException {\n while (true) {\n watchStream.feedLine(response.readBodyLine());\n String watchStreamState = watchStream.getState();\n\n if (watchStreamState.equals(OsWatchStream.HAVE_EVENT)) {\n return ChangeEvent.fromBsonDocument(watchStream.getNextEvent(), documentClass, codecRegistry);\n }\n if (watchStreamState.equals(OsWatchStream.HAVE_ERROR)) {\n response.close();\n throw watchStream.getError();\n }\n }\n }", "public void processEvent(Event event) {\n\t\t\n\t}", "@Test(timeout = 10000)\n public void testEvents() throws Exception {\n EventReader reader = new EventReader(new DataInputStream(new ByteArrayInputStream(getEvents())));\n HistoryEvent e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_PRIORITY_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_STATUS_CHANGED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(TASK_UPDATED));\n Assert.assertEquals(\"ID\", getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(JOB_KILLED));\n Assert.assertEquals(\"ID\", getJobid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_STARTED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_FINISHED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n e = reader.getNextEvent();\n Assert.assertTrue(e.getEventType().equals(REDUCE_ATTEMPT_KILLED));\n Assert.assertEquals(TestEvents.taskId, getTaskid().toString());\n reader.close();\n }", "public void handlePublishedSoxEvent(SoxEvent e) {\n\t\ttry{\n\n\t\toutBuffer.write(\":::::Received Data:::::\" + \"\\n\");\n\t\toutBuffer.write(\"Message from: \"+e.getOriginServer());\n\t\tList<TransducerValue> values = e.getTransducerValues();\n\t\tString to_python_arg = \"\";\n\t\tPattern pat;\n\t\tMatcher mat;\n\t\tString id_arg, value_arg, timing_arg;\n\t\tid_arg=\"\";\n\t\tvalue_arg=\"\";\n\t\toutBuffer.write(\"\\n\" +\":::::Node ID:::::\" + e.getNodeID() + \"\\n\");\n\t\tString group_id = e.getNodeID();\n\t\tfor (TransducerValue value : values) {\n\t\t\toutBuffer.write(\"TransducerValue[id:\" + value.getId()\n\t\t\t\t\t+ \", rawValue:\" + value.getRawValue() + \", typedValue:\"\n\t\t\t\t\t+ value.getTypedValue() + \", timestamp:\"\n\t\t\t\t\t+ value.getTimestamp() + \"]\" + \"\\n\");\n\t\t\t\n\t\t\tif (value.getId().length() > 255 ){ id_arg = value.getId().substring(0,255); } else { id_arg = value.getId(); }\n\t\t\tif (value.getRawValue().length() > 255 ){ value_arg = value.getRawValue().substring(0,255); } else { value_arg = value.getRawValue(); }\n\n\t\t\tid_arg = dummy_escape(id_arg);\n\t\t\tvalue_arg = dummy_escape(value_arg);\n\t\t\ttiming_arg = value.getTimestamp();\n\t\t\tto_python_arg = \"'group_id\" + group_id + \" item_id=\" + id_arg + \" raw_value=\" + value_arg + \" timing=\" + timing_arg + \"'\";\n\n\t\t\tp = new ProcessBuilder(\"/var/local/jikkyolizer/bin/python3\", \"/home/jikkyolizer_input/jikkyolizer_input2.py\", to_python_arg, \"1>>/home/jikkyolizer_input/log/processing_input.log\").start();\n\t\t\tret = p.waitFor();\n\n\n\n\t\toutBuffer.write(\"/var/local/jikkyolizer/bin/python3 /home/jikkyolizer_input/jikkyolizer_input.py \" + to_python_arg + \" 1>>/home/jikkyolizer_input/log/processing_input.log\");\n\t\t}\n\t\toutBuffer.flush();\n\t\t} catch(IOException e2){\n\t\t\te2.printStackTrace();\n\t\t} catch(InterruptedException ie){\n\t\t}\n\t}", "public interface EventPipeLine {\n /**\n * Adds new event to the pipeline (queue)\n * @param e GameEvent instance\n */\n public void add(GameEvent e);\n\n /**\n * Calls all event processors and removes them from the queue\n */\n public void exec();\n\n /**\n * Removes all events. (ignore the events)\n */\n public void clear();\n\n /**\n * First event from the queue\n * @return GameEvent instance or null if empty\n */\n public GameEvent getFirst();\n\n /**\n * This method can be usefull if you want to know which events are there in the queue.\n * @return all events as GameEvent[] array\n */\n public GameEvent[] getEvents();\n\n /**\n * Number of events in the queue\n */\n public int size();\n \n}", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public abstract void enableStreamFlow();", "public interface StreamListener {\n\n default void onNextEntry(CorfuStreamEntries results) {\n onNext(results);\n }\n\n /**\n * A corfu update can/may have multiple updates belonging to different streams.\n * This callback will return those updates as a list grouped by their Stream UUIDs.\n *\n * Note: there is no order guarantee within the transaction boundaries.\n *\n * @param results is a map of stream UUID -> list of entries of this stream.\n */\n void onNext(CorfuStreamEntries results);\n\n /**\n * Callback to indicate that an error or exception has occurred while streaming or that the stream is\n * shutting down. Some exceptions can be handled by restarting the stream (TrimmedException) while\n * some errors (SystemUnavailableError) are unrecoverable.\n * @param throwable\n */\n void onError(Throwable throwable);\n}", "@Override\n public void handleEvents(List<Event> processorEvents) {\n\n }", "private EventsCollector() {\n\t\tsuper();\n\t}", "@Override\n protected Collection<Stream> calculateEmittedStreams(\n final Collection<Stream> providedStreams) {\n return null;\n }", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "@Override\n\tpublic void streamingServiceStarted(int arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\tPacket packet = new Packet();\r\n\t\t\r\n\t\twhile (runConnection) {\r\n\t\t\ttry {\r\n\t\t\t\tpacket = (Packet) inStream.readObject();\r\n\t\t\t\tprocessEvent(packet);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t//System.out.print(e);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "public void doService() {\n EventManager eventManager = new EventManager();\n while (!queue.isEmpty()) {\n Event firstEvent = queue.poll();\n if (!(firstEvent instanceof ServerBackEvent) &&\n !(firstEvent instanceof ServerRestEvent)) {\n System.out.println(firstEvent);\n } \n Event nextEvent = eventManager.getNext(servers, gen, firstEvent, stats, probability);\n if (nextEvent != null) {\n queue.add(nextEvent);\n }\n }\n System.out.println(stats);\n \n\n }", "private void startStreams() {\n InputStream inputStream = process.getInputStream();\n bufferedInputStream = new BufferedReader(new InputStreamReader(inputStream));\n InputStream errorStream = process.getErrorStream();\n bufferedErrorStream = new BufferedReader(new InputStreamReader(errorStream));\n }", "void uploadStarted(StreamingStartEvent event);", "default void refreshStream() {}", "void startPumpingEvents();", "public abstract void onNext();", "@Test\n public void testEventMessageContent() throws Exception {\n CountDownLatch latch = new CountDownLatch(1);\n EventContentClient eventContentClient = new EventContentClient(latch);\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"),\n 0, 0, 0, eventContentClient)) {\n latch.await(30, TimeUnit.SECONDS);\n synchronized (eventContentClient.events) {\n Event event = eventContentClient.events.get(1);\n Assert.assertTrue(event.getData().containsKey(\"jid\"));\n Assert.assertEquals(\"20150505113307407682\", event.getData().get(\"jid\"));\n }\n }\n }", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}", "void onNext(CorfuStreamEntries results);", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "@Test\n public void testStreamEventsShouldNotReturnDuplicateTokens() throws InterruptedException {\n newTestSubject(0, 1000, 1000, EmbeddedEventStoreTest.OPTIMIZE_EVENT_CONSUMPTION);\n Stream mockStream = Mockito.mock(Stream.class);\n Iterator mockIterator = Mockito.mock(Iterator.class);\n Mockito.when(mockStream.iterator()).thenReturn(mockIterator);\n Mockito.when(storageEngine.readEvents(ArgumentMatchers.any(TrackingToken.class), ArgumentMatchers.eq(false))).thenReturn(mockStream);\n Mockito.when(mockIterator.hasNext()).thenAnswer(new EmbeddedEventStoreTest.SynchronizedBooleanAnswer(false)).thenAnswer(new EmbeddedEventStoreTest.SynchronizedBooleanAnswer(true));\n Mockito.when(mockIterator.next()).thenReturn(new org.axonframework.eventhandling.GenericTrackedEventMessage(new GlobalSequenceTrackingToken(1), EventStoreTestUtils.createEvent()));\n TrackingEventStream stream = testSubject.openStream(null);\n TestCase.assertFalse(stream.hasNextAvailable());\n testSubject.publish(EventStoreTestUtils.createEvent());\n // give some time consumer to consume the event\n Thread.sleep(200);\n // if the stream correctly updates the token internally, it should not find events anymore\n TestCase.assertFalse(stream.hasNextAvailable());\n }", "BasicEvents createBasicEvents();", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "public void startOldEvent() {\n // JCuda.cudaEventRecord(oldEvent, oldStream);\n }", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "public void actionStarted(ActionStreamEvent action);", "public void movieEvent(Movie m) {\n m.read();\n}", "EventChannelSource source();", "private void setupStreams() {\n\t\ttry {\n\t\t\tthis.out = new ObjectOutputStream(this.sock.getOutputStream());\n\t\t\tthis.out.flush();\n\t\t\tthis.in = new ObjectInputStream(this.sock.getInputStream());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "private void initializeEvents() {\r\n\t}", "public void transmitEvents(){\n Log.info(\"Transmitting Events\", EventShare.class);\n for(Entry<Class, List<EventTrigger>> eventGroup: HandlerRegistry.getHandlers().entrySet()){\n String annotation = eventGroup.getKey().getName();\n for(EventTrigger trigger : eventGroup.getValue()){\n if(trigger.getServer()!=this) { // do not send own events...\n if(trigger.getMethod()!=null){ // its a local event\n if(trigger.getMethod().isAnnotationPresent(ES.class)){\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }else {\n try {\n eventBusServer.write(new ESSharedEvent(annotation, trigger.getTrigger()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n }", "public static synchronized void submit(Event event) {\n StreamConfig streamConfig = STREAM_CONFIGS.get(event.getStream());\n if (streamConfig == null) {\n return;\n }\n if (!SamplingController.isInSample(event)) {\n return;\n }\n addEventMetadata(event);\n //\n // Temporarily send events immediately in order to investigate discrepancies in\n // the numbers of events submitted in this system vs. legacy eventlogging.\n //\n // https://phabricator.wikimedia.org/T281001\n //\n // OutputBuffer.schedule(event);\n OutputBuffer.sendEventsForStream(streamConfig, Collections.singletonList(event));\n }", "public abstract void processEvent(Object event);", "public Event (Display display, ResponseInputStream in) {\n this.display = display;\n code = in.read_int8 ();\n detail = in.read_int8 ();\n sequence_number = in.read_int16();\n }", "public interface PostSingleEvent {\n void onStart();\n void onDone(PostResponse response);\n void onError(String err);\n Map<String, String> getHeaders();\n Map<String, String> getFiles();\n Map<String, String> getImages();\n}", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "@Override\n public void publish(Event<? extends Enum, ?> event) {\n byte[] body = null;\n if (null == event) {\n log.error(\"Captured event is null...\");\n return;\n }\n if (event instanceof DeviceEvent) {\n body = bytesOf(MQUtil.json((DeviceEvent) event));\n } else if (event instanceof TopologyEvent) {\n body = bytesOf(MQUtil.json((TopologyEvent) event));\n } else if (event instanceof LinkEvent) {\n body = bytesOf(MQUtil.json((LinkEvent) event));\n } else {\n log.error(\"Invalid event: '{}'\", event);\n return;\n }\n processAndPublishMessage(body);\n }", "@Override\n protected void initializeEventList()\n {\n }", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "public interface SIFEventIterator\r\n{\r\n\t/**\r\n\t * This method returns the next available SIF Event. The mappingCtx can be used to utilise the mapping\r\n\t * mechanism available through the SIFWorks ADK functionality.<br />\r\n\t * If there is no mapping defined for the given object then this parameter will be 'null'. It is up to\r\n\t * the implementor of this method to check that parameter accordingly before use.\r\n\t * \r\n\t * @param baseInfo The base info object of the given publisher. This allows the getNextEvent() method\r\n\t * to access important properties and values of the publisher if it is needed.\r\n * @param mappingCtx The mapping info that can be used if mapping is available. Note that this parameter\r\n * can be null if there is no mapping available for the given publisher and its SIF \r\n * Object it deals with (ie. No mapping for StudentPersonal). The mappingCtx is for\r\n * outbound mappings as expected since it is publisher that will use the mapping.\r\n * \r\n * @return SIFEvent The next available SIFEvent. This must return null if there are no further SIF Events\r\n * available.\r\n * \r\n * @throws ADKMappingException if mapping is used and there is an issue with the mapping.\r\n */\r\n\tpublic SIFEvent getNextEvent(BaseInfo baseInfo, MappingsContext mappingCtx) throws ADKMappingException;\r\n\t\r\n\t/**\r\n\t * Returns TRUE if there are more SIF Events available. In this case the getNextEvent() method should\r\n\t * return a SIF Event that is not null. FALSE is returned if there are no more SIF Events available. In\r\n\t * this case the getNextEvent() method should return null.\r\n\t * \r\n\t * @return See description.\r\n\t */\r\n\tpublic boolean hasNext();\r\n\t\r\n\t/**\r\n\t * To be able to retrieve SIF Events one by one there might be the need to allocate some resources in the\r\n\t * class that implements this interface. These resources might be allocated until the last SIF Event is\r\n\t * returned to the publisher. This method is called by the BasePublisher class once all events are \r\n\t * retrieved. It allows the implementor of this interface to release the allocated resources. Typical\r\n\t * examples of allocated resources are DB Connections, SQL Result Sets etc.\r\n\t */\r\n\tpublic void releaseResources();\r\n}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\n\tpublic void processIOException(IOExceptionEvent exceptionEvent) {\n\t}", "@Test\n\tpublic void testExplicitlyConvertEventHandler() {\n\t\tPerson person = new Person();\n XStream xstream = new XStream();\n xstream.registerConverter(new ReflectionConverter(xstream.getMapper(), xstream.getReflectionProvider(), EventHandler.class));\n\n //xstream.fromXML(xml);\n //assertEquals(0, BUFFER.length());\n //array[0].run();\n //assertEquals(\"Executed!\", BUFFER.toString());\n \n try {\n\t\t\tString filename = \"./dynamic_exploit.xml\";\n\t\t\tFile file = new File(filename);\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\t//System.out.println(filename);\n\t\t\t\n\t\t\tSystem.out.println(FileUtils.readFileToString(file));\n\t\t\t\n\t\t\txstream.fromXML(fis, person);\n\t\t\t\n\t\t\t//print the data from the object that has been read\n\t\t\t//System.out.println(person.toString());\n\t\t\t\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Test\n void shouldReturnEventSource() {\n server.setRoute(\"/sse\", exchange -> {\n exchange.getResponseHeaders().add(\"Content-Type\", \"text/event-stream\");\n exchange.getResponseHeaders().add(\"Connection\", \"keep-alive\");\n exchange.getResponseHeaders().add(\"Cache-Control\", \"no-cache\");\n exchange.sendResponseHeaders(200, 0);\n try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {\n writer.write(\"data: {\\\"foo\\\":\\\"bar\\\"}\\n\\n\");\n }\n });\n // 2. Subscribe to page request events.\n page.navigate(server.EMPTY_PAGE);\n List<Request> requests = new ArrayList<>();\n page.onRequest(request -> requests.add(request));\n // 3. Connect to EventSource in browser and return first message.\n Object result = page.evaluate(\"() => {\\n\" +\n \" const eventSource = new EventSource('/sse');\\n\" +\n \" return new Promise(resolve => {\\n\" +\n \" eventSource.onmessage = e => resolve(JSON.parse(e.data));\\n\" +\n \" });\\n\" +\n \"}\");\n assertEquals(mapOf(\"foo\", \"bar\"), result);\n assertEquals(\"eventsource\", requests.get(0).resourceType());\n }", "@Override\n\tpublic void streamingServiceStopped(int arg0) {\n\t\t\n\t}", "@Override\n\t\tpublic void onIOException(IOException e, Object state) {\n \n \t}", "public void run() {\n int eventseen = 0;\n int looptry = 0;\n int wait = 100;\n while(! isInterrupted()) {\n Iterable<byte[]> stream = new Iterable<byte[]>() {\n @Override\n public Iterator<byte[]> iterator() {\n Iterator<byte[]> i = Receiver.this.getIterator();\n if(i == null) {\n return new Iterator<byte[]>() {\n\n @Override\n public boolean hasNext() {\n return false;\n }\n\n @Override\n public byte[] next() {\n return null;\n }\n\n };\n } else {\n return i;\n }\n }\n };\n try {\n for(byte[] e: stream) {\n logger.trace(\"new message received: {}\", e);\n if(e != null) {\n eventseen++;\n //Wrap, but not a problem, just count as 1\n if(eventseen < 0) {\n eventseen = 1;\n }\n Event event = new Event();\n decode(event, e);\n send(event);\n }\n }\n } catch (Exception e) {\n eventseen = 0;\n logger.error(e.getMessage());\n logger.catching(e);\n }\n // The previous loop didn't catch anything\n // So try some recovery\n if(eventseen == 0) {\n looptry++;\n logger.debug(\"event seen = 0, try = {}\", looptry);\n // A little magic, give the CPU to other threads\n Thread.yield();\n if(looptry > 3) {\n try {\n Thread.sleep(wait);\n wait = wait * 2;\n looptry = 0;\n } catch (InterruptedException ex) {\n break;\n }\n }\n } else {\n looptry = 0;\n wait = 0;\n }\n }\n }", "private void setupStreams() throws IOException {\n\t\toutput = new ObjectOutputStream(Connection.getOutputStream());\n\t\toutput.flush();\n\t\tinput = new ObjectInputStream(Connection.getInputStream()); \n\t\tshowMessage(\"\\n Streams have successfully connected.\");\n\t}", "@Override\n public void onIOException(IOException e) {\n }", "@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}", "private static List<RSQSimEvent> readEventsFile(\n\t\t\tInputStream eListStream, InputStream pListStream, InputStream dListStream, InputStream tListStream,\n\t\t\tList<SimulatorElement> elements, Collection<? extends RuptureIdentifier> rupIdens, boolean bigEndian,\n\t\t\tboolean skipSlipsAndTimes) throws IOException {\n\t\tList<RSQSimEvent> events = Lists.newArrayList();\n\t\t\n\t\tpopulateEvents(eListStream, pListStream, dListStream, tListStream, elements, rupIdens, bigEndian, events, skipSlipsAndTimes);\n\t\t\n\t\treturn events;\n\t}", "@Override\r\n public void onEvent(FlowableEvent event) {\n }", "@Test\n public void testListenerManagement() throws Exception {\n SimpleEventListenerClient client1 = new SimpleEventListenerClient();\n SimpleEventListenerClient client2 = new SimpleEventListenerClient();\n SimpleEventListenerClient client3 = new SimpleEventListenerClient();\n SimpleEventListenerClient client4 = new SimpleEventListenerClient();\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"), 0, 0, 0, client1, client2)) {\n streamEvents.addEventListener(client3);\n streamEvents.removeEventListener(client2);\n streamEvents.removeEventListener(client3);\n streamEvents.addEventListener(client4);\n\n Assert.assertTrue(streamEvents.getListenerCount() == 2);\n }\n }", "public XMLEventReader staxEvents( InputStream input )\n {\n try\n {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n return factory.createXMLEventReader( input );\n }\n catch( XMLStreamException ex )\n {\n throw new UncheckedXMLException( ex );\n }\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "BasicSourceStreamHandlers getBasic_ss_handlers();", "@Override\r\n\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\r\n\t\t}", "protected List<JsonEvent> parseJsonEventCollection(final InputStream input)\n\t\t\tthrows Exception {\n\t\tJSONParser parser = new JSONParser();\n\n\t\t// parse feature collection into objects\n\t\tJSONObject feed = JsonUtil.getJsonObject(parser\n\t\t\t\t.parse(new InputStreamReader(input)));\n\t\tif (feed == null) {\n\t\t\tthrow new Exception(\"Expected feed object\");\n\t\t}\n\n\t\t// check feed type\n\t\tString type = JsonUtil.getString(feed.get(\"type\"));\n\t\tif (type == null) {\n\t\t\tthrow new Exception(\"Expected geojson type\");\n\t\t}\n\n\t\tArrayList<JsonEvent> events = new ArrayList<JsonEvent>();\n\n\t\tif (type.equals(\"Feature\")) {\n\t\t\t// detail feed with one event\n\n\t\t\tevents.add(new JsonEvent(feed));\n\t\t} else if (type.equals(\"FeatureCollection\")) {\n\t\t\t// summary feed with many events\n\n\t\t\tJSONArray features = JsonUtil.getJsonArray(feed.get(\"features\"));\n\t\t\tif (features == null) {\n\t\t\t\tthrow new Exception(\"Expected features\");\n\t\t\t}\n\n\t\t\t// parse features into events\n\t\t\tIterator<?> iter = features.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tJSONObject next = JsonUtil.getJsonObject(iter.next());\n\t\t\t\tif (next == null) {\n\t\t\t\t\tthrow new Exception(\"Expected feature\");\n\t\t\t\t}\n\t\t\t\tevents.add(new JsonEvent(next));\n\t\t\t}\n\t\t}\n\n\t\treturn events;\n\t}", "public interface ImageProcessListener extends EventListener, Serializable {\n\n void process(ImageProcessEvent event);\n}", "com.google.speech.logs.timeline.InputEvent.Event getEvent();", "public void testGetNextEvent() throws Exception {\n \n \tint NB_READS = 20;\n \n \t// On lower bound, returns the first event (ts = 1)\n \tTmfContext context = fTrace.seekEvent(new TmfTimestamp(0, SCALE, 0));\n \n \t// Read NB_EVENTS\n \tTmfEvent event;\n for (int i = 0; i < NB_READS; i++) {\n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", i + 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", i + 1, context.getRank());\n }\n \n // Make sure we stay positioned\n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", NB_READS + 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", NB_READS, context.getRank());\n }", "@Override\n\tpublic void process(MessageStream<ServerMessage> message)\n\t{\n\t\t\n\t}", "public void parseLog2(){\n\t\ttry{\n\t\t\tMxmlFile eventlog=new MxmlFile(res.getFileName());\n\t\t\t//log.info(\"processing \"+res.getFileName());\n\t\t\tres=eventlog.parse(eventlog.read(), res);\n\t\t\teventlog.close();\n\t\t}catch(Exception e){\n\t\t\tlog.warn(e.toString());\n\t\t}\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "public void onEvent(TCPReceiverThread receiverThread, Event event) throws IOException;", "private void createAndListen() {\n\n\t\t\n\t}", "@Override\n\tpublic void streamingServiceStalled(int arg0) {\n\t\t\n\t}", "@Override\n protected void initEventAndData() {\n }", "public void streamSubscriberStart(ISubscriberStream stream);", "@Override\n public boolean usesEvents()\n {\n return false;\n }", "public void processOffers(List<OfferPublishedEvent> events) {\n }", "public static void testLowLevelApi() {\n StreamTask task = new StreamTask() {\n @Override\n public void process(IncomingMessageEnvelope envelope, MessageCollector collector, TaskCoordinator coordinator) throws Exception {\n }\n };\n\n TestApplication.TaskTest app = TestApplication.create(task, new MapConfig());\n app.addInputStream(\"queuing.PageViewEvent\", CollectionStream.of(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n )));\n app.addOutputStream(\"queuing.MyPageViewEvent\", CollectionStream.empty());\n\n TaskAssert.that(\"queuing.MyPageViewEvent\").contains(ImmutableMap.of(\n \"1\", \"PageView1\",\n \"2\", \"PageView2\"\n ));\n \n app.run();\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "public void pipeMsgEvent ( PipeMsgEvent event ){\r\n\t// Get the message object from the event object\r\n\tMessage msg=null;\r\n\ttry {\r\n\t msg = event.getMessage();\r\n\t if (msg == null)\r\n\t\treturn;\r\n\t} \r\n\tcatch (Exception e) {\r\n\t e.printStackTrace();\r\n\t return;\r\n\t}\r\n\t\r\n\t// Get the String message element by specifying the element tag\r\n\tMessageElement newMessage = msg.getMessageElement(TAG);\r\n\tif (newMessage == null)\t\t\t\r\n\t System.out.println(\"null msg received\");\r\n\telse\r\n\t System.out.println(\"Received message: \" + newMessage);\r\n }", "public interface IStreamAwareScopeHandler extends IScopeHandler {\r\n\t/**\r\n\t * A broadcast stream starts being published. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamPublishStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * A broadcast stream starts being recorded. This will be called\r\n\t * when the first video packet has been received.\r\n\t * \r\n\t * @param stream stream \r\n\t */\r\n\tpublic void streamRecordStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastStart(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a broadcaster closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamBroadcastClose(IBroadcastStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber starts.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberStart(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a subscriber closes.\r\n\t * \r\n\t * @param stream stream\r\n\t */\r\n\tpublic void streamSubscriberClose(ISubscriberStream stream);\r\n\r\n\t/**\r\n\t * Notified when a playlist item plays.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t * @param isLive treu if live\r\n\t * TODO\r\n\t */\r\n\tpublic void streamPlaylistItemPlay(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, boolean isLive);\r\n\r\n\t/**\r\n\t * Notified when a playlist item stops.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n\t */\r\n\tpublic void streamPlaylistItemStop(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item pauses.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemPause(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item resumes.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemResume(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n\r\n\t/**\r\n\t * Notified when a playlist vod item seeks.\r\n\t * \r\n\t * @param stream stream\r\n\t * @param item item\r\n * @param position position\r\n\t */\r\n\tpublic void streamPlaylistVODItemSeek(IPlaylistSubscriberStream stream,\r\n\t\t\tIPlayItem item, int position);\r\n}", "@EncoderThread\n protected abstract void onStart();", "void mo23491a(MediaSourceEventListener mediaSourceEventListener);", "private void viewEvents() {\n ReferenceFrame frame = selectFrame(\"What frame would you like to view the events from?\");\n List<Event> transformedEvents = new ArrayList<>();\n for (Event event: world.getEvents()) {\n transformedEvents.add(event.lorentzTransform(frame));\n }\n for (Event event: transformedEvents) {\n System.out.println(event.getName() + \" occurs at t = \" + event.getTime() + \" and x = \" + event.getX());\n }\n }" ]
[ "0.6635342", "0.6351796", "0.6316445", "0.6113624", "0.60850376", "0.5963354", "0.59587586", "0.5951416", "0.59443796", "0.59423655", "0.5891838", "0.58620906", "0.58179116", "0.5790378", "0.57768685", "0.5764941", "0.57530177", "0.5752212", "0.5740987", "0.5730013", "0.57280445", "0.5711672", "0.570445", "0.57009435", "0.56900024", "0.5684671", "0.56818134", "0.5645706", "0.5635234", "0.56296587", "0.5625438", "0.5614915", "0.56011814", "0.558832", "0.5575644", "0.5573321", "0.5570284", "0.55701405", "0.55689585", "0.5566867", "0.5553622", "0.5547215", "0.55373913", "0.55317837", "0.5518054", "0.55127364", "0.5507174", "0.55032146", "0.5498333", "0.54973066", "0.54908586", "0.5476206", "0.54664606", "0.5461356", "0.5460249", "0.5458305", "0.5458305", "0.54577816", "0.5451624", "0.5451571", "0.54486513", "0.544402", "0.5418526", "0.5397557", "0.5395137", "0.53925824", "0.5392291", "0.53921044", "0.538921", "0.5389039", "0.5377544", "0.5377544", "0.5365952", "0.5362096", "0.5358066", "0.53504735", "0.5350354", "0.5350247", "0.5349601", "0.5349191", "0.5348496", "0.5339962", "0.5338144", "0.5338043", "0.5337483", "0.5330112", "0.53290623", "0.53283477", "0.5325996", "0.5325643", "0.532003", "0.532003", "0.532003", "0.532003", "0.532003", "0.5319509", "0.5318602", "0.5316833", "0.53164357", "0.53098315" ]
0.61992985
3
TODO Autogenerated method stub /Session session = HibernateSessionFactory.getSession();
@Override public boolean mayILogin(Account account) { Session session = sf.openSession(); Query query = session.createQuery("from cn.edu.shou.staff.model.Account acc" + " where acc.uname=:u and acc.passwd=:v"); query.setString("u", account.getUname()); query.setString("v", account.getPasswd()); List list = query.list(); return list.size()>0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Session getHibernateSession() throws AuditException {\r\n return this.session;\r\n }", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "private void getHibernateSession() {\n try {\n session = em.unwrap(Session.class)\n .getSessionFactory().openSession();\n\n } catch(Exception ex) {\n logger.error(\"Failed to invoke the getter to obtain the hibernate session \" + ex.getMessage());\n ex.printStackTrace();\n }\n\n if(session == null) {\n logger.error(\"Failed to find hibernate session from \" + em.toString());\n }\n }", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }", "public Session getHibernateSession() throws EvolizerException {\n return getEvolizerSession().getHibernateSession();\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public SingleSessionFactory(Session session) {\n\t\tthis.session = session;\n\t}", "Session getSession();", "Session getSession();", "public SessionFactory getSessionFactory()\n {\n return sessionFactory;\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\n template = new HibernateTemplate(sessionFactory);\n}", "public Session getSession();", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public static void main(String[] args)\r\n {\n\t\t\r\n\t \r\n\t SessionFactory factory = new Configuration().configure(\"hibernate_cfg.xml\").buildSessionFactory();\r\n\t// Employee e=new Employee();\r\n//\t\t e.setId(2);\r\n//\t\t e.setName(\"mayuri\");\r\n//\t\t e.setSalary(38000);\r\n//\t \t e.setAddress(\"solapur\");\r\n\t\t\r\n\t Session session = factory.openSession(); \r\n\t org.hibernate.Transaction t = session.beginTransaction();\r\n//\t\tsession.save(e);\r\n\t\t//session.update(e);\r\n\t // session.delete(e);\r\n\t \r\n\t /**\r\n\t * \r\n\t * fetch data from database using list and without passing object\r\n\t */\r\n\t /* int i=0;\r\n Employee emp=new Employee();\r\n emp=null;\r\n for(i=0;i<=4;i++)\r\n {\r\n emp=(Employee) session.get(Employee.class,i);\r\n System.out.println(\"\\n\"+emp.getId()+\"\\n\"+emp.getName()+\"\\n\"+emp.getSalary()+\"\\n\"+emp.getAddress());\r\n \r\n }*/\r\n\t /**\r\n\t * fetch data from database using object\r\n\t */\r\n\t Employee e=new Employee();\r\n\t e=(Employee) session.get(Employee.class, 1);\r\n\t System.out.println(e);\r\n\t\t\t \r\n//\t \r\n//\t emp =(Employee) session.get(Employee.class,1);\r\n//\t System.out.println(emp);\r\n\t \r\n\t /**\r\n\t * use of createCriteria() from criteria API\r\n\t */\r\n\t // List<Employee> employees = (List<Employee>) session.createCriteria(Employee.class).list();\r\n\t // System.out.println(\"\\n\"+employees);\r\n\r\n\t \r\n\t \r\n\t // Employee e=session.get(Employee.class,new Integer(4));\r\n\t // System.out.println(\"\\n\"+e.getId()+\"\\n\"+e.getName()+\"\\n\"+e.getSalary()+\"\\n\"+e.getAddress());\r\n\t\t\r\n\t \r\n\t \r\n\t\tt.commit();\r\n\t\tSystem.out.println(\"successfully saved\");\r\n\t\t\r\n\r\n\t \r\n }", "@Test\r\n\tpublic void fun1(){\r\n\t\t//3 获得session\r\n\t\t\t\tSession session = HebernateUtils.openSession();\t\r\n\t\t\t\tsession.beginTransaction();\r\n\t\t\t\t//-------------------\r\n\t\t\t\tOrder o = (Order) session.get(Order.class, 1);\r\n\t\t\t\t\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t order0_.id as id4_0_,\r\n//\t\t\t\t order0_.name as name4_0_,\r\n//\t\t\t\t order0_.cid as cid4_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order order0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t order0_.id=?\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t customer0_.id as id3_0_,\r\n//\t\t\t\t customer0_.name as name3_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_customer customer0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t customer0_.id=?\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t orders0_.cid as cid3_1_,\r\n//\t\t\t\t orders0_.id as id1_,\r\n//\t\t\t\t orders0_.id as id4_0_,\r\n//\t\t\t\t orders0_.name as name4_0_,\r\n//\t\t\t\t orders0_.cid as cid4_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order orders0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t orders0_.cid=?\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(o.getCustomer().getName());\r\n\t\t\t\t\r\n\t\t\t\t//------------------\r\n\t\t\t\tsession.getTransaction().commit();\r\n\t\t\t\tsession.close();\r\n\t}", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "@Test\r\n\tpublic void fun4(){\r\n\t\t//3 获得session\r\n\t\t\t\tSession session = HebernateUtils.openSession();\t\r\n\t\t\t\tsession.beginTransaction();\r\n\t\t\t\t//-------------------\r\n\t\t\t\tOrder o = (Order) session.get(Order.class, 2);\r\n\t\t\t\t\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t order0_.id as id4_1_,\r\n//\t\t\t\t order0_.name as name4_1_,\r\n//\t\t\t\t order0_.cid as cid4_1_,\r\n//\t\t\t\t customer1_.id as id3_0_,\r\n//\t\t\t\t customer1_.name as name3_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order order0_ \r\n//\t\t\t\t left outer join\r\n//\t\t\t\t t_customer customer1_ \r\n//\t\t\t\t on order0_.cid=customer1_.id \r\n//\t\t\t\t where\r\n//\t\t\t\t order0_.id=?\r\n\t\t\t\t \t\t\r\n\t\t\t\tSystem.out.println(o.getCustomer().getName());\r\n//\t\t\t\ttom\r\n\t\t\t\t//------------------\r\n\t\t\t\tsession.getTransaction().commit();\r\n\t\t\t\tsession.close();\r\n\t}", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public Session getSession() {\n return session;\n }", "public SessionFactory getSessionFactory() {\r\n return sessionFactory;\r\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "@Override\n public Object doInHibernate(Session session) throws HibernateException {\n return (Long) session.createSQLQuery(\"SELECT NEXTVAL('SGSWEB.SEQ_CUESTIONARIO') as id\").addScalar(\"id\", LongType.INSTANCE).uniqueResult();\n }", "@Override\n\t\t\tpublic MemberInfoShowBean doInHibernate(Session session) throws HibernateException, SQLException {\n\t\t\t\tString hql = \"select new com.yuncai.modules.lottery.bean.vo.MemberInfoShowBean(m1.account, m1.name, m1.certNo, m1.email, m1.mobile, m2.bankCard, m2.bankPart,m2.bank) from Member as m1 ,MemberInfo as m2 where m1.id=m2.memberId and m1.account=:account\";\n\t\t\t\tQuery query = session.createQuery(hql);\n\t\t\t\tquery.setParameter(\"account\", account);\n\t\t\t\tMemberInfoShowBean bean = (MemberInfoShowBean) query.uniqueResult();\n\t\t\t\t\n\t\t\t\treturn bean;\n\t\t\t}", "public Session openSession() {\r\n return sessionFactory.openSession();\r\n }", "public Session getSession() { return session; }", "void closeSessionFactory();", "public SessionFactory getSessionFactory() {\n return sessionFactory;\n }", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "public static List<Book> getBookLocation() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookLocation\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "public Session getSession()\n {\n return session;\n }", "DatabaseSession openSession();", "public SessionFactory getHibernateSessionFactory() {\n if (_hibernateTemplate == null) {\n return null;\n }\n return _hibernateTemplate.getSessionFactory();\n }", "public interface IHibernatePersistenceModule extends IPersistenceModule {\r\n\t/**\r\n\t * Retorna a sessao do hibernate\r\n\t * \r\n\t * @return a sessao\r\n\t */\r\n\tSession getSession();\r\n}", "protected Session getSession() { return session; }", "public static List<Book> getBookDetails_2() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_2\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n}", "@Resource\r\n\tpublic void setHibernateSessionFactory(SessionFactory hibernateSessionFactory) {\r\n\t\tsetSessionFactory(hibernateSessionFactory);\r\n\t}", "protected SessionFactory getSessionFactory() {\n\t\treturn this.sessionFactory;\n\t}", "public void setSession(Session session) { this.session = session; }", "public List<CourseSession> getAllCourseSession(){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n List allSession = session.createQuery(\"from CourseSession\").list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public SessionFactory getSessionFactory() {\r\n\t\treturn sessionFactory;\r\n\t}", "public static SessionFactory getSessionFactory() {\n \t\n \treturn sessionFactory;\n }", "public List<CourseSession> findCourseSessionByLocation(int locationId){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n Query query = session.createQuery(\"from CourseSession where location.id = :idLocation \");\r\n query.setParameter(\"idLocation\",locationId);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public interface HibSession extends Serializable {\n /** Set up for a hibernate interaction. Throw the object away on exception.\n *\n * @param sessFactory\n * @throws HibException\n */\n public void init(SessionFactory sessFactory) throws HibException;\n\n /**\n * @return Session\n * @throws HibException\n */\n public Session getSession() throws HibException;\n\n /**\n * @return boolean true if open\n * @throws HibException\n */\n public boolean isOpen() throws HibException;\n\n /** Clear a session\n *\n * @throws HibException\n */\n public void clear() throws HibException;\n\n /** Disconnect a session\n *\n * @throws HibException\n */\n public void disconnect() throws HibException;\n\n /** set the flushmode\n *\n * @param val\n * @throws HibException\n */\n public void setFlushMode(FlushMode val) throws HibException;\n\n /** Begin a transaction\n *\n * @throws HibException\n */\n public void beginTransaction() throws HibException;\n\n /** Return true if we have a transaction started\n *\n * @return boolean\n */\n public boolean transactionStarted();\n\n /** Commit a transaction\n *\n * @throws HibException\n */\n public void commit() throws HibException;\n\n /** Rollback a transaction\n *\n * @throws HibException\n */\n public void rollback() throws HibException;\n\n /** Did we rollback the transaction?\n *\n * @return boolean\n * @throws HibException\n */\n public boolean rolledback() throws HibException;\n\n /** Create a Criteria ready for the additon of Criterion.\n *\n * @param cl Class for criteria\n * @return Criteria created Criteria\n * @throws HibException\n */\n public Criteria createCriteria(Class<?> cl) throws HibException;\n\n /** Evict an object from the session.\n *\n * @param val Object to evict\n * @throws HibException\n */\n public void evict(Object val) throws HibException;\n\n /** Create a query ready for parameter replacement or execution.\n *\n * @param s String hibernate query\n * @throws HibException\n */\n public void createQuery(String s) throws HibException;\n\n /** Create a query ready for parameter replacement or execution and flag it\n * for no flush. This assumes that any queued changes will not affect the\n * result of the query.\n *\n * @param s String hibernate query\n * @throws HibException\n */\n public void createNoFlushQuery(String s) throws HibException;\n\n /**\n * @return query string\n * @throws HibException\n */\n public String getQueryString() throws HibException;\n\n /** Create a sql query ready for parameter replacement or execution.\n *\n * @param s String hibernate query\n * @param returnAlias\n * @param returnClass\n * @throws HibException\n */\n public void createSQLQuery(String s, String returnAlias, Class<?> returnClass)\n throws HibException;\n\n /** Create a named query ready for parameter replacement or execution.\n *\n * @param name String named query name\n * @throws HibException\n */\n public void namedQuery(String name) throws HibException;\n\n /** Mark the query as cacheable\n *\n * @throws HibException\n */\n public void cacheableQuery() throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal String parameter value\n * @throws HibException\n */\n public void setString(String parName, String parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal Date parameter value\n * @throws HibException\n */\n public void setDate(String parName, Date parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal boolean parameter value\n * @throws HibException\n */\n public void setBool(String parName, boolean parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal int parameter value\n * @throws HibException\n */\n public void setInt(String parName, int parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal long parameter value\n * @throws HibException\n */\n public void setLong(String parName, long parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal Object parameter value\n * @throws HibException\n */\n public void setEntity(String parName, Object parVal) throws HibException;\n\n /** Set the named parameter with the given value\n *\n * @param parName String parameter name\n * @param parVal Object parameter value\n * @throws HibException\n */\n public void setParameter(String parName, Object parVal) throws HibException ;\n\n /** Set the named parameter with the given Collection\n *\n * @param parName String parameter name\n * @param parVal Collection parameter value\n * @throws HibException\n */\n public void setParameterList(String parName,\n Collection<?> parVal) throws HibException ;\n\n /** Set the first result for a paged batch\n *\n * @param val int first index\n * @throws HibException\n */\n public void setFirstResult(int val) throws HibException;\n\n /** Set the max number of results for a paged batch\n *\n * @param val int max number\n * @throws HibException\n */\n public void setMaxResults(int val) throws HibException;\n\n /** Return the single object resulting from the query.\n *\n * @return Object retrieved object or null\n * @throws HibException\n */\n public Object getUnique() throws HibException;\n\n /** Return a list resulting from the query.\n *\n * @return List list from query\n * @throws HibException\n */\n public List getList() throws HibException;\n\n /**\n * @return int number updated\n * @throws HibException\n */\n public int executeUpdate() throws HibException;\n\n /** Update an object which may have been loaded in a previous hibernate\n * session\n *\n * @param obj\n * @throws HibException\n */\n public void update(Object obj) throws HibException;\n\n /** Merge and update an object which may have been loaded in a previous hibernate\n * session\n *\n * @param obj\n * @return Object the persiatent object\n * @throws HibException\n */\n public Object merge(Object obj) throws HibException;\n\n /** Save a new object or update an object which may have been loaded in a\n * previous hibernate session\n *\n * @param obj\n * @throws HibException\n */\n public void saveOrUpdate(Object obj) throws HibException;\n\n /** Copy the state of the given object onto the persistent object with the\n * same identifier. If there is no persistent instance currently associated\n * with the session, it will be loaded. Return the persistent instance.\n * If the given instance is unsaved or does not exist in the database,\n * save it and return it as a newly persistent instance. Otherwise, the\n * given instance does not become associated with the session.\n *\n * @param obj\n * @return Object\n * @throws HibException\n */\n public Object saveOrUpdateCopy(Object obj) throws HibException;\n\n /** Return an object of the given class with the given id if it is\n * already associated with this session. This must be called for specific\n * key queries or we can get a NonUniqueObjectException later.\n *\n * @param cl Class of the instance\n * @param id A serializable key\n * @return Object\n * @throws HibException\n */\n public Object get(Class cl, Serializable id) throws HibException;\n\n /** Return an object of the given class with the given id if it is\n * already associated with this session. This must be called for specific\n * key queries or we can get a NonUniqueObjectException later.\n *\n * @param cl Class of the instance\n * @param id int key\n * @return Object\n * @throws HibException\n */\n public Object get(Class cl, int id) throws HibException;\n\n /** Save a new object.\n *\n * @param obj\n * @throws HibException\n */\n public void save(Object obj) throws HibException;\n\n /** Delete an object\n *\n * @param obj\n * @throws HibException\n */\n public void delete(Object obj) throws HibException;\n\n /** Save a new object with the given id. This should only be used for\n * restoring the db from a save.\n *\n * @param obj\n * @throws HibException\n */\n public void restore(Object obj) throws HibException;\n\n /**\n * @param val\n * @throws HibException\n */\n public void reAttach(UnversionedDbentity<?, ?> val) throws HibException;\n\n /**\n * @param o\n * @throws HibException\n */\n public void lockRead(Object o) throws HibException;\n\n /**\n * @param o\n * @throws HibException\n */\n public void lockUpdate(Object o) throws HibException;\n\n /**\n * @throws HibException\n */\n public void flush() throws HibException;\n\n /**\n * @throws HibException\n */\n public void close() throws HibException;\n}", "public static Session openSession(SessionFactory sessionFactory)\r\n\t\t\tthrows HibernateException {\n\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\treturn session;\r\n\t}", "@Override\n\tprotected void doUpdate(Session session) {\n\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public SqlSessionFactory get();", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "public static void main(String[] args) {\n SessionFactory factory = new Configuration()\n .configure(\"hibernate.cfg.xml\")\n .addAnnotatedClass(Student.class)\n .buildSessionFactory();\n\n// create session\n Session session = factory.getCurrentSession();\n\n try {\n// create a Course object\n System.out.println(\"Creating instructor object...\");\n Course tempCourse = new Course(\"History of Magic\");\n\n// start a transaction\n session.beginTransaction();\n\n// save the Course object\n System.out.println(\"Saving the Course...\");\n System.out.println(tempCourse);\n session.save(tempCourse);\n\n// commit transaction\n session.getTransaction().commit();\n\n// MY NEW CODE\n\n// find out the Course's id: primary key\n System.out.println(\"Saved Course. Generated id: \" + tempCourse.getId());\n\n// now get a new session and start transaction\n session = factory.getCurrentSession();\n session.beginTransaction();\n\n// retrieve Course based on the id: primary key\n System.out.println(\"\\nGetting Course with id: \" + tempCourse.getId());\n\n Course myCourse = session.get(Course.class, tempCourse.getId());\n\n System.out.println(\"Get complete: \" + myCourse);\n\n// commit the transaction\n session.getTransaction().commit();\n\n System.out.println(\"Done!\");\n }\n finally {\n factory.close();\n }\n\n\n }", "public static List<Book> getBookCategory() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookCategory\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "public PaymentDAOImpl(SessionFactory sessionfactory)\n\t{\n\tthis.sessionFactory=sessionfactory; \n\tlog.debug(\"Successfully estblished connection\");\n\t}", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "public SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\n\t}", "public SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\n\t}", "public List<CourseSession> findCourseSessionByDate(Date start){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n //List allSession = session.createQuery(\"from CourseSession\").list();\r\n Query query = session.createQuery(\"from CourseSession Where startDate >= :dateStart \");\r\n query.setParameter(\"dateStart\",start);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public static List<Book> getBookSellers() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getBookSellers\");\r\n List<Book> bookLocationList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookLocationList;\r\n}", "private void doCloseSession()\n {\n if (session != null)\n {\n try\n {\n database.closeHibernateSession(session);\n }\n finally\n {\n session = null;\n }\n }\n }", "public void iniciaOperacion() throws HibernateException\r\n\t{\r\n\t\t\r\n\t\t//Creamos conexión BBDD e inicamos una sesion\r\n\t sesion = HibernateUtil.getSessionFactory().openSession();\r\n\t //iniciamos transaccion\r\n\t tx = sesion.beginTransaction();\r\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public AbstractSession getSession() {\n return session;\n }", "public Session getSession() {\n return session;\n }", "protected abstract SessionFactory buildSessionFactory() throws Exception;", "private static Session secondLevelCacheHibernate(SessionFactory factory,\n\t\t\tSession session) {\n\t\tsession.close();\n\t\tsession=factory.openSession();\n\t\tsession.get(Employee.class, Long.valueOf(7));\n\t\tsession.close();\n\t\tsession=factory.openSession();\n\t\tsession.get(Employee.class, Long.valueOf(7));\n\t\treturn session;\n\t}", "public void executeWithSession(AbstractSession session) {\n }", "private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\r\n\t}", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "public static SessionFactory getSessionFactory() {\n\t\treturn sessionFactory;\n\t}", "public FuncaoCasoDAOImpl() {\n\t\tsetSession(HibernateUtil.getSessionFactory());\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "@Test\n public void testsaveUser(){\n \tSession session=myHibernateUtil.getSessionFactory().getCurrentSession();\n \t\n \tTransaction ts=session.beginTransaction();\n \tUsers u=new Users();\n \tu.setUsername(\"zhangsan\");\n \tu.setPassword(\"123456\");\n \tsession.save(u);\n \tts.commit();\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public static Map<SessionFactory, Session> getSession() {\n\t\tSessionFactory sf = new Configuration().configure(Constants.ONE_TO_MANY).addAnnotatedClass(Instructor.class)\n\t\t\t\t.addAnnotatedClass(InstructorDetail.class).addAnnotatedClass(Course.class).buildSessionFactory();\n\t\tSession s = sf.openSession();\n\n\t\tMap<SessionFactory, Session> tmp = new HashMap<SessionFactory, Session>();\n\t\ttmp.put(sf, s);\n\n\t\treturn tmp;\n\t}", "@SuppressWarnings({ \"deprecation\"})\r\n\tpublic static SessionFactory getSessionFactory() \r\n\t{\r\n //configuration object\r\n Configuration configuration=new Configuration();\r\n //configuring xml file\r\n \tconfiguration.configure(\"hibernate.cfg.xml\");\r\n \t//SessionFactory object\r\n \tsessionFactory=configuration.buildSessionFactory();\r\n //returning sessonFactory+\r\n return sessionFactory;\r\n }", "private static SessionFactory buildSessionFact() {\n try {\n\n return new Configuration().configure(\"hibernate.cfg.xml\").buildSessionFactory();\n\n \n } catch (Throwable ex) {\n \n System.err.println(\"Initial SessionFactory creation failed.\" + ex);\n throw new ExceptionInInitializerError(ex);\n }\n }", "@Autowired\r\n public void setSessionFactory(SessionFactory sessionFactory) {\r\n this.sessionFactory = sessionFactory;\r\n }", "private static synchronized void lazyinit()\n {\n try\n {\n if (sessionFactory == null)\n {\n System.out.println(\"Going to create SessionFactory \");\n sessionFactory = new Configuration().configure().buildSessionFactory();\n// sessionFactory.openSession();\n System.out.println(\"Hibernate could create SessionFactory\");\n }\n } catch (Throwable t)\n {\n System.out.println(\"Hibernate could not create SessionFactory\");\n t.printStackTrace();\n }\n }", "public void setSessionFactory(SessionFactory sessionFactory) {\r\n template = new HibernateTemplate(sessionFactory);\r\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test Hibernate Lazy Loading in Default with Session Close\")\n public void testHibernateDefaultLazyLoadingWithSessionClose()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n SBAddressVal01 addressVal01 = SBAddressVal01.of(\n \"Kusumarama Road\",\n \"Seenigama\",\n \"Hikkaduwa\",\n \"Sri Lanka\",\n \"292000\"\n );\n\n SBCustomerOrder order01 = SBCustomerOrder.of(\n \"IN0000001\",\n new Timestamp(new java.util.Date().getTime()),\n 2024.50\n );\n\n SBCustomerOrder order02 = SBCustomerOrder.of(\n \"IN0000002\",\n new Timestamp(new java.util.Date().getTime()),\n 1024.50\n );\n\n SBCustomerOrder order03 = SBCustomerOrder.of(\n \"IN0000003\",\n new Timestamp(new java.util.Date().getTime()),\n 3024.50\n );\n\n SBCustomerOrder order04 = SBCustomerOrder.of(\n \"IN0000004\",\n new Timestamp(new java.util.Date().getTime()),\n 5024.50\n );\n\n SBCustomer05 sbCustomer05 = new SBCustomer05();\n\n sbCustomer05.getCustomer05Orders().add(order01);\n sbCustomer05.getCustomer05Orders().add(order02);\n sbCustomer05.getCustomer05Orders().add(order03);\n sbCustomer05.getCustomer05Orders().add(order04);\n\n sbCustomer05.setCustomer05Email(\"[email protected]\");\n sbCustomer05.setCustomer05Sex(\"Male\");\n sbCustomer05.setCustomer05FirstName(\"Umesh\");\n sbCustomer05.setCustomer05LastName(\"Gunasekara\");\n sbCustomer05.setCustomer05Nic(\"901521344V\");\n sbCustomer05.setCustomer05Mobile(\"0711233000\");\n try {\n sbCustomer05.setCustomer05Birthday(new SimpleDateFormat(\"dd/MM/yyyy\").parse(\"31/05/1990\"));\n } catch (ParseException e) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n sbCustomer05.setCustomer05Address(addressVal01);\n sbCustomer05.setRawLastUpdateDateTime(new Timestamp(new java.util.Date().getTime()));\n sbCustomer05.setRawLastUpdateLogId(1);\n sbCustomer05.setUpdateUserAccountId(1);\n sbCustomer05.setRawActiveStatus(1);\n sbCustomer05.setRawDeleteStatus(1);\n sbCustomer05.setRawShowStatus(1);\n sbCustomer05.setRawUpdateStatus(1);\n\n\n Transaction transaction = null;\n try (Session session = HibernateUtil.getSessionFactory().openSession();) {\n transaction = session.beginTransaction();\n session.save(sbCustomer05);\n transaction.commit();\n System.out.println(\"Added Customer 03: \" + sbCustomer05.getCustomer05FirstName());\n } catch (Throwable throwable) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n //********************************************\n //The first session has benn closed with end of try catch\n //*******************************************\n\n SBCustomer05 customer = null;\n\n try (Session session = HibernateUtil.getSessionFactory().openSession();) {\n transaction = session.beginTransaction();\n customer = session.get(SBCustomer05.class, sbCustomer05.getCustomer05Id());\n transaction.commit();\n } catch (Throwable throwable) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n System.out.println(\"Get Customer 05: \" + customer.getCustomer05FirstName());\n System.out.println(\"Get Customer 05 Orders \");\n customer.getCustomer05Orders().forEach(\n order ->\n {\n System.out.println(\"Order Invoice Number :\" + order.getCustomerOrderInvoiceNumber());\n System.out.println(\"\\tDate & Time :\" + order.getCustomerOrderDateTime());\n System.out.println(\"\\tTotal Amount:\" + order.getCustomerOrderTotal());\n });\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "public CourseSession getCourseSession(int idSession){\r\n \r\n CourseSession cs = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n Query query = session.createQuery(\"from CourseSession Where id = :idSession\");\r\n query.setParameter(\"idSession\", idSession);\r\n List c = query.list();\r\n cs = (CourseSession)c.get(0);\r\n \r\n Course course = new Course(cs.getCourse().getCode(), cs.getCourse().getTitle());\r\n Location location = new Location(cs.getLocation().getId(), cs.getLocation().getCity());\r\n \r\n cs.setCourse(course);\r\n cs.setLocation(location);\r\n \r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return cs;\r\n }", "public static List<Book> getBookDetails_1() throws HibernateException{\r\n \r\n session = sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_getAllBookList_1\");\r\n List<Book> bookList=query.list();\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return bookList;\r\n \r\n }", "private SessionFactoryUtil() {\r\n try {\r\n LOG.info(\"Configurando hibernate.cfg.xml\");\r\n CfgFile cfgFile = new CfgFile();\r\n Configuration configure = new Configuration().configure(new File(cfgFile.getPathFile()));\r\n cfgFile.toBuildMetaData(configure);\r\n ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(configure.getProperties()).build();\r\n sessionFactory = configure.buildSessionFactory(serviceRegistry);\r\n LOG.info(\"Configuracion se cargo a memoria de forma correcta\");\r\n } // try\r\n catch (Exception e) {\r\n Error.mensaje(e);\r\n } // catch\r\n }", "public static String testConnectionHibernate(Configuration configuration) throws CSException {\n\n\n\t\tSessionFactory sf = null;\n\t\tResultSet rs = null;\n\t\tStatement stmt=null;\n\t\tConnection conn = null;\n\t\tSession session = null;\n\t\ttry {\n\t\t\t//System.out.println(\"testConnectionHibernate*****1\");\n\t\t\tsf = configuration.buildSessionFactory();\n\t\t\t//System.out.println(\"testConnectionHibernate*****2\");\n\t\t\tsession = sf.openSession();\n\t\t\t//System.out.println(\"testConnectionHibernate*****3\");\n\t\t\tconn = session.connection();\n\t\t\t//System.out.println(\"testConnectionHibernate*****4\");\n\t\t\tstmt = conn.createStatement();\n\t\t\t//System.out.println(\"testConnectionHibernate*****5\");\n\t\t\tstmt.execute(\"select count(*) from csm_application\");\n\t\t\t//System.out.println(\"testConnectionHibernate*****6\");\n\t\t\trs = stmt.getResultSet();\n\t\t\t//System.out.println(\"testConnectionHibernate*****7\");\n\n\t\t\t//System.out.println(rs.getMetaData().getColumnCount());\n\n\t\t\treturn DisplayConstants.APPLICATION_DATABASE_CONNECTION_SUCCESSFUL;\n\n\t\t} catch(Throwable t){\n\t\t\tt.printStackTrace();\n\t\t\t// Depending on the cause of the exception obtain message and throw a CSException.\n\t\t\tif(t instanceof SQLGrammarException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getCause().getMessage());\n\t\t\t}\n\t\t\tif(t instanceof JDBCConnectionException){\n\t\t\t\tif(t.getCause() instanceof CommunicationsException){\n\t\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_SERVER_PORT);\n\t\t\t\t}\n\t\t\t\tif(t.getCause() instanceof SQLException){\n\t\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL);\n\t\t\t\t}\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getMessage());\n\t\t\t}\n\t\t\tif(t instanceof GenericJDBCException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_USER_PASS+\" \");\n\t\t\t}\n\t\t\tif(t instanceof CacheException){\n\t\t\t\tthrow new CacheException(\"Please Try Again.\\n \");\n\n\t\t\t}\n\t\t\tif(t instanceof HibernateException){\n\t\t\t\tthrow new CSException(DisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED+\" \"+t.getMessage());\n\t\t\t}\n\n\t\t\tthrow new CSException(\n\t\t\t\t\tDisplayConstants.APPLICATION_DATABASE_CONNECTION_FAILED_URL_USER_PASS);\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tsf.close();\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tconn.close();\n\t\t\t\tsession.close();\n\t\t\t}catch(Exception e){}\n\n\t\t}\n\n\t}", "public static void closeSession() throws HibernateException {\n\t\tSession session = (Session) threadLocal.get();\n threadLocal.set(null);\n\n if (session != null && session.isOpen()) {\n session.close();\n }\n }", "public /*static*/ void close() {\n sessionFactory.close();\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public static void addBook(Book book) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n //Insert detail of the book to the database\r\n session.save(book);\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n }", "public static SessionFactory getSessionFactory() {\n\t\tConfiguration configObj = new Configuration();\n\t\tconfigObj.addAnnotatedClass(com.training.org.User.class);\n\t\tconfigObj.configure(\"hibernate.cfg.xml\");\n\t\t\n\t\t\n\t\n\n\t\t// Since Hibernate Version 4.x, Service Registry Is Being Used\n\t\tServiceRegistry serviceRegistryObj = new StandardServiceRegistryBuilder().applySettings(configObj.getProperties()).build(); \n\n\t\t// Creating Hibernate Session Factory Instance\n\t\tSessionFactory factoryObj = configObj.buildSessionFactory(serviceRegistryObj);\t\t\n\t\treturn factoryObj;\n\t}", "@Before\r\n public void before() {\n AnnotationConfiguration configuration = new AnnotationConfiguration();\r\n configuration.addAnnotatedClass(Customer.class).addAnnotatedClass(OrderLine.class).addAnnotatedClass(Product.class).addAnnotatedClass(SalesOrder.class);\r\n configuration.setProperty(\"hibernate.dialect\", \"org.hibernate.dialect.MySQL5Dialect\");\r\n configuration.setProperty(\"hibernate.connection.driver_class\", \"com.mysql.jdbc.Driver\");\r\n configuration.setProperty(\"hibernate.connection.url\", \"jdbc:mysql://localhost:3306/order_management_db\");\r\n configuration.setProperty(\"hibernate.connection.username\", \"root\");\r\n sessionFactory = configuration.buildSessionFactory();\r\n session = sessionFactory.openSession();\r\n }", "public static void open() {\r\n final Session session = sessionFactory.isClosed() ? sessionFactory.openSession() : sessionFactory.getCurrentSession();\r\n session.beginTransaction();\r\n }", "public Session session() {\n return session;\n }", "@Autowired\n public CuestionarioDaoHibernate(SessionFactory sessionFactory) {\n this.setSessionFactory(sessionFactory);\n }", "@Override\n public void closeSession() throws HibernateException {\n Session session = threadLocal.get();\n threadLocal.set(null);\n\n if (session != null) {\n session.close();\n }\n }", "Session begin();", "public void ListAllProduct() {\r\n\t\t\tSystem.out.println(\" *************from inside ListAllProduct()********************** \");\r\n\t\t\tTransaction tx = null;\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsessionObj = HibernateUtil.buildSessionFactory().openSession();\r\n\t\t\t\ttx = sessionObj.beginTransaction();\r\n\t\t\t\t// retrive logic\r\n\t\t\t\tList products = sessionObj.createQuery(\"From Product\").list(); // select * from employee: \"Employee refer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Employee class\r\n\t\t\t\tIterator iterator = products.iterator();\r\n\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\tProduct product1 = (Product) iterator.next();\r\n\t\t\t\t\tSystem.out.println(\"Product Category \" + product1.getProductCategory());\r\n\t\t\t\t\tSystem.out.println(\"Product Description\" + product1.getProductDescription());\r\n\t\t\t\t\tSystem.out.println(\"Product Manufacturer \" + product1.getProductManufacturer());\r\n\t\t\t\t\tSystem.out.println(\"Product Name \"+product1.getProductName());\r\n\t\t\t\t\tSystem.out.println(\"Product Price \"+product1.getProductPrice());\r\n\t\t\t\t\tSystem.out.println(\"Product Unit \"+product1.getProductUnit());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttx.commit();// explictiy call the commit esure that auto commite should be false\r\n\t\t\t} catch (\r\n\r\n\t\t\tHibernateException e) {\r\n\t\t\t\tif (tx != null)\r\n\t\t\t\t\ttx.rollback();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tsessionObj.close();\r\n\t\t\t}\r\n\t\t}", "public List<CourseSession> findCourseSessionBetweenStartAndEnd(Date start,Date end){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n //List allSession = session.createQuery(\"from CourseSession\").list();\r\n Query query = session.createQuery(\"from CourseSession Where startDate >= :dateStart and endDate <= :dateEnd\");\r\n query.setParameter(\"dateStart\",start);\r\n query.setParameter(\"dateEnd\", end);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "public Session getSession() {\n\t\treturn session;\n\t}" ]
[ "0.7558685", "0.7246871", "0.7109646", "0.69337845", "0.68741673", "0.6838103", "0.68302643", "0.6795783", "0.6794662", "0.6794662", "0.67622256", "0.67577857", "0.6732876", "0.6715324", "0.6712149", "0.67057735", "0.670081", "0.66732264", "0.667322", "0.6658591", "0.6638547", "0.66108114", "0.6610343", "0.65730834", "0.6563668", "0.6507159", "0.6501533", "0.64952725", "0.64826906", "0.64814115", "0.6453859", "0.64488107", "0.6423741", "0.64219797", "0.6408307", "0.64065385", "0.63956803", "0.6394533", "0.63758785", "0.6354158", "0.6353226", "0.632622", "0.63216764", "0.63176507", "0.6313745", "0.6303398", "0.6295079", "0.62902695", "0.6281533", "0.6278161", "0.62743986", "0.6268509", "0.6249909", "0.62305975", "0.62272745", "0.62272745", "0.62136", "0.62100136", "0.6206649", "0.62066114", "0.61973804", "0.61933494", "0.61927277", "0.6179922", "0.6159954", "0.6153758", "0.61480683", "0.6141476", "0.6135443", "0.6126342", "0.61134106", "0.6089902", "0.60804886", "0.6070537", "0.6064634", "0.6061442", "0.60515785", "0.6048475", "0.6047388", "0.6028194", "0.60232", "0.6016293", "0.60057306", "0.5988537", "0.5986774", "0.5978216", "0.5972867", "0.59682727", "0.59677476", "0.59635276", "0.5962926", "0.5958624", "0.594982", "0.5947659", "0.5944256", "0.5941236", "0.59360456", "0.59357303", "0.59228975", "0.59080935", "0.5905142" ]
0.0
-1
Get predicate argument number.
public String getArguments() { return key.getArguments(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getArgIndex();", "public int getNumArg() {\n\t\treturn numArg;\n\t}", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getNumberOfArguments();", "public int getNumArgs()\n {\n return numArgs;\n }", "public int getArgCount() {\r\n return scope != null? scope.getArgCount() : 0;\r\n }", "int getArgumentsCount();", "public int getNumArgs() {\n return argTypes.size();\n }", "public int getArgumentCount() {\n return arguments.length;\n }", "@Override\n public int getArgent() {\n return _argent;\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "int getNumberOfArgumentsByUser(UUID id);", "public int getArgsCount() {\n return args_.size();\n }", "public int getArgsCount() {\n return args_.size();\n }", "public int getPos(Spell spell, Predicate<SpellDecorator> predicate) throws IndexOutOfBoundsException {\n\t\tint i = 0;\n\t\tfor (Spell tmp = spell; tmp instanceof SpellDecorator; ++i, tmp = ((SpellDecorator) tmp).spell) {\n\t\t\tif (predicate.test((SpellDecorator) tmp)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\tthrow new IndexOutOfBoundsException(\"No spell founded\");\n\t}", "public int getArity() {\n\t\treturn func.getArgCount();\n\t}", "@Override\r\n public int getSecondArg() {\n return localsNum;\r\n }", "public abstract int getMaximumArguments();", "public int getArgsCount() {\n return args_.size();\n }", "public int getArgsCount() {\n return args_.size();\n }", "int getNumParameters();", "public int getArgsCount() {\n\t\t\treturn args_.size();\n\t\t}", "public int getArgsCount() {\n\t\t\t\treturn args_.size();\n\t\t\t}", "public int getArgsCount() {\n if (argsBuilder_ == null) {\n return args_.size();\n } else {\n return argsBuilder_.getCount();\n }\n }", "@java.lang.Override\n public int getArgsCount() {\n return args_.size();\n }", "public abstract int getMinimumArguments();", "short getNumberOfCardsInArgument(UUID argumentId);", "Object getNumberMatched();", "public int getArgumentsCount() {\n return arguments_.size();\n }", "@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}", "public int getArgumentsCount() {\n return arguments_.size();\n }", "public Integer getArgumentIndex(Constructor<?> constructor) {\n return owningConstructors.get(constructor);\n }", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "public int arg2() {\n return Integer.parseInt(instructionChunks[2]);\n }", "@Nonnull \r\n\tpublic static <T> Observable<Integer> count(\r\n\t\t\t@Nonnull Observable<? extends T> source, \r\n\t\t\t@Nonnull Func1<? super T, Boolean> predicate) {\r\n\t\treturn count(where(source, predicate));\r\n\t}", "@Override\n public int getNumberArguments() {\n return 1;\n }", "private int numberOccurenceOfR(List arguments) {\r\n int numberOccurenceOfR = 0;\r\n\r\n for (int i = 0; i < arguments.size(); i++) {\r\n if (arguments.get(i).equals(\"-R\"))\r\n numberOccurenceOfR += 1;\r\n }\r\n return numberOccurenceOfR;\r\n }", "public ProgramExp getArgument() {\n return argument;\n }", "public int nrOfExpressions();", "public static int getNumber(String query);", "public int getFormalParameterIndex() {\n/* 401 */ return (this.value & 0xFF0000) >> 16;\n/* */ }", "public int getTypeArgumentIndex() {\n/* 440 */ return this.value & 0xFF;\n/* */ }", "public int getColumn(){ return (Integer)args[1]; }", "public int getNumberOfActivitiesByPoster(Identity posterIdentity);", "public int getNumIndependentParameters();", "int getParamType(String type);", "public Element getPredicateVariable();", "private int nbThread(Integer parameterIndex) throws ExceptionMalformedInput\n {\n this.nbThread = parseParameterInt(args, parameterIndex+1);\n//TODO check that the number is >=1\n return parameterIndex + 1;\n }", "public int getParamIndex()\n\t{\n\t\treturn paramIndex;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(findNthTermOfGP(2,6,5));\n\t}", "OclExpression getArgument();", "int countByExample(ProcdefExample example);", "public int getRayNum();", "public int getNumberFound() {\n return numberFound;\n }", "abstract public int maxArgs();", "@Override \n\t\tprotected int getNumParam() {\n\t\t\treturn 1;\n\t\t}", "int findCount();", "java.lang.String getArg();", "public static void main (String []argv)\n\t{\n\t int integer = 0;\n\t int []inArr = new int [argv.length];\n\t \n\t for (int i = 0; i< argv.length; i++)\n\t {\n\t \n\t inArr [i] = Integer.parseInt (argv[i]);\n\t \n\t }\n\t \n\t \n\t integer = getN();\n\n\t System.out.println (\"The LAST occurrence of \" + integer + \" is: \" + findVal (inArr, integer));\n\t}", "Integer getNumQuestions();", "int getNumOfRetrievelRequest();", "int getNumOfRetrievelRequest();", "int getParametersCount();", "int getParametersCount();", "static int size_of_call(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] argv) {\n\t\t Processor stringProcessor = (String str) -> str.length();\n\t\t String name = \"Java Lambda\";\n\t\t int length = stringProcessor.getStringLength(name);\n\t\t System.out.println(length);\n\n\t\t }", "public void checkNumberArgs(int argNum) throws WrongNumberArgsException {\n/* 79 */ if (argNum < 2) {\n/* 80 */ reportWrongNumberArgs();\n/* */ }\n/* */ }", "public double getArgOfPerhelion() {\n return argOfPerhelion;\n }", "public boolean lambda26(Object x) {\n return ((Scheme.applyToArgs.apply2(this.pred, x) != Boolean.FALSE ? 1 : 0) + 1) & true;\n }", "public Object apply(List<Object> args) {\n Integer res = new Integer (((Engine.Sequence)args.get(0)).size()) ;\n return res;\n }", "String getCountInt();", "public @Nullable Expression getArgument(int i) {\n if (i<arguments.getExpressions().size())\n return arguments.getExpression(i);\n else\n return null;\n }", "public String getParameterName(Signature sig, int n);", "public int getNumExpr() {\n return getExprList().getNumChild();\n }", "int getPageNumber();", "public int getRow(){ return (Integer)args[0]; }", "public long getNumInstructions();", "int getN();", "int getParamsCount();", "int countByExample(FunctionInfoExample example);", "public static int getNumberByFilter(String filter) {\r\n\t\t\r\n\t\treturn reqDao.getNumberByFilter(filter);\r\n\r\n\t}", "public abstract int arity();", "public int getParameterCount();", "protected Integer getCurrentCommandIndex(List<Object> args) {\n int currentCommandIndex = (int) args.get(1);\n return currentCommandIndex;\n }", "private int extractInt() {\n\t\tint startIndex = index;\n\t\tfor (; index < exprLen; index++) {\n\t\t\tchar c = expr.charAt(index);\n\t\t\tif (!Character.isDigit(c)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tint endIndex = index;\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(expr.substring(startIndex, endIndex));\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(e.getMessage());\n\t\t}\n\n\t\treturn value;\n\t}", "int getParameterCount();", "public int choose(DataBinder binder) {\n int index = 0;\n if (_opts != null) for (int i = 0; i < _opts.length; ++i) {\n String v = binder.get(_opts[i]);\n if (v != null && v.length() > 0) index |= 1 << i;\n }\n return index;\n }", "int findCountByCriteria(String eCriteria, Object... parameters);", "public static int getAkParamIndex(String parameter)\n {\n Integer i = akAllParamDefinitions_.get(parameter);\n if (i == null)\n Log.e(LOG_TAG, \"getAkParamIndex: parameter \" + parameter + \" not found!\");\n return i == null ? -1 : i.intValue();\n }", "int getInCount();", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "int getPostNum();", "@Given(\"^Parameter is (\\\\d+)$\")\n\tpublic void parameter_is(int arg1) throws Throwable {\n\t\ti = arg1;\n\t}", "public int getNbParameters() {\n\t\treturn prototype.getNbParameters();\n\t}", "public int countByTodoInteger(int todoInteger);" ]
[ "0.6751307", "0.670114", "0.6163021", "0.6163021", "0.6163021", "0.6163021", "0.6163021", "0.6154509", "0.612607", "0.6066529", "0.5795374", "0.57486284", "0.5740171", "0.56446886", "0.5633688", "0.5525905", "0.552134", "0.552134", "0.55070215", "0.5501808", "0.5499097", "0.5488253", "0.54740065", "0.54740065", "0.5433165", "0.5432221", "0.54021674", "0.538834", "0.53800184", "0.53798056", "0.5346327", "0.5336414", "0.52972794", "0.52391076", "0.52294934", "0.52293587", "0.522312", "0.5194498", "0.51767033", "0.51708436", "0.51428163", "0.5136499", "0.50832224", "0.50784296", "0.5076669", "0.5069668", "0.5060114", "0.50590974", "0.5036513", "0.50281405", "0.50263155", "0.50086796", "0.5002455", "0.4990465", "0.49893537", "0.4986754", "0.49730408", "0.49632895", "0.4954762", "0.49538797", "0.4926235", "0.49243522", "0.49189076", "0.49052265", "0.48510996", "0.48510996", "0.4849074", "0.4849074", "0.48361525", "0.48335922", "0.48303303", "0.48148483", "0.48123345", "0.48073354", "0.4801871", "0.47895885", "0.47838375", "0.47821414", "0.47735342", "0.47711086", "0.4766752", "0.47656396", "0.47636673", "0.47627848", "0.47589743", "0.47531465", "0.47499588", "0.47487834", "0.47469294", "0.4742687", "0.47425663", "0.4739114", "0.4738441", "0.47375605", "0.4732414", "0.4732414", "0.4732414", "0.47232047", "0.47205517", "0.47175837", "0.47156256" ]
0.0
-1
Get complete defining formula. Includes predicate itself.
public ElementList getCompleteFormula() { return completeFormula; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ElementList getDefiningFormula() {\r\n return definingFormula;\r\n }", "public dFormula asFormula() {\n\t\treturn new ElementaryFormula(0, phonstringCondition);\n\t}", "public TypeFormula getFirstFormula ( ) ;", "public IComplexFormula getFormula(){\r\n\t\treturn formula;\r\n\t}", "public String getFormula() {\n return formula;\n }", "public String getFormula() {\n return formula;\n }", "public String getFormula() {\r\n return formula;\r\n }", "protected String getIntermediateFormula() {\n if ( isGlobal() ) {\n return globalConstraint;\n } else if ( isRoleBased() ) {\n return roleMapToFormula();\n } else {\n // rls is disabled\n return EMPTY_STRING;\n }\n }", "public String getFormula() {\n\t\treturn null;\n\t}", "public ArrayList<Predicate> expandInConjunctiveFormula(){\n\t\tArrayList<Predicate> formula = new ArrayList<Predicate>();\n\t\t\n\t\t// (x, (0,2)) (y,1) \n\t\t//holds positions of the vars\n\t\tHashtable<String,ArrayList<String>> pos = new Hashtable<String,ArrayList<String>>();\n\t\t//(const3, \"10\")\n\t\t//holds vars that have constants assigned\n\t\tHashtable<String,String> constants = new Hashtable<String,String>();\n\t\t\n\t\tRelationPredicate p = this.clone();\n\t\t//rename each term to a unique name\n\t\tfor(int i=0; i<p.terms.size(); i++){\n\t\t\tTerm t = p.terms.get(i);\n\t\t\tt.changeVarName(i);\n\n\t\t}\n\t\tformula.add(p);\n\n\t\tArrayList<String> attrsOld = getVarsAndConst();\n\t\tArrayList<String> attrsNew = p.getVarsAndConst();\n\n\t\t\n\t\tfor(int i=0; i<attrsOld.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tif(t instanceof ConstTerm){\n\t\t\t\t//get the constant value\n\t\t\t\tconstants.put(attrsNew.get(i),t.getVal());\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<String> posVals = pos.get(attrsOld.get(i));\n\t\t\tif(posVals==null){\n\t\t\t\tposVals=new ArrayList<String>();\n\t\t\t\tpos.put(attrsOld.get(i),posVals);\n\t\t\t}\n\t\t\tposVals.add(String.valueOf(i));\n\n\t\t}\n\t\t\n\t\t//System.out.println(\"Position of attrs=\" + pos + \" Constants= \" + constants);\n\t\n\t\t//deal with var equality x0=x2\n\t\tIterator<String> it = pos.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tArrayList<String> vals = pos.get(key);\n\t\t\tif(vals.size()>1){\n\t\t\t\t//add x0=x2 & x2=x9, etc\n\t\t\t\tfor(int i=1; i<vals.size(); i++){\n\t\t\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i)));\n\t\t\t\t\t//p1.addTerm(new VarTerm(key+vals.get(i+1)));\n\t\t\t\t\tVarTerm v1 = new VarTerm(key);\n\t\t\t\t\tv1.changeVarName(Integer.valueOf(vals.get(i-1)).intValue());\n\t\t\t\t\tp1.addTerm(v1);\n\t\t\t\t\tVarTerm v2 = new VarTerm(key);\n\t\t\t\t\tv2.changeVarName(Integer.valueOf(vals.get(i)).intValue());\n\t\t\t\t\tp1.addTerm(v2);\n\t\t\t\t\tformula.add(p1);\n\t\t\t\t\t//i=i+1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//deal with constants\n\t\tit = constants.keySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tString key = (String)it.next();\n\t\t\tString val = constants.get(key);\n\t\t\t//it's a constant\n\t\t\t//add const3=\"10\"\n\t\t\tBuiltInPredicate p1 = new BuiltInPredicate(MediatorConstants.EQUALS);\n\t\t\tp1.addTerm(new VarTerm(key));\n\t\t\tp1.addTerm(new ConstTerm(val));\n\t\t\tformula.add(p1);\n\t\t}\n\t\treturn formula;\n\t}", "public ArrayList < TypeFormula > getAllFormulas ( ) ;", "public List<IComplexFormula> getFormulas(){\r\n\t\treturn formulas;\r\n\t}", "public String getFormula() {\n return chemicalFormula;\n }", "org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideFormula xgetFmla();", "@Override\r\n\tpublic String asFormula(){\n\t\treturn null;\r\n\t}", "private Formulas() { }", "public ArrayList<String> getSubFormulas() {\n return subFormulas;\n }", "public String getMolecularFormula() {\n return molecularFormula;\n }", "public FormulaManager getFormulaManager()\n\t{\n\t\treturn fm;\n\t}", "public Formula() {\t\n\t\t// TODO: implement this.\n\t\t// throw new RuntimeException(\"not yet implemented.\");\n\t\tclauses=new EmptyImList<Clause>();\n\t}", "public Formula formulaWithInc() {\n\t\treturn formula();\n\t}", "public boolean isFormulaUsed() {\n return getBooleanProperty(\"IsFormulaUsed\");\n }", "public JList getListFormulas() {\n\t\tif (listFormulas == null) {\n\t\t\tlistFormulas = new JList();\n\t\t\tlistFormulas.setModel(new DefaultListModel());\n\t\t\tlistFormulas.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t\t}\n\t\treturn listFormulas;\n\t}", "public String getSelectionFormula();", "public String getContents()\r\n/* 156: */ {\r\n/* 157:282 */ return this.formulaString;\r\n/* 158: */ }", "String getDefinition();", "public String generateFormalExpression(int scope) {\n\t\tString result = \"\";\n\t\tif (scope == InfoEnum.ALL_MODELS) {\n\t\t\tfor (Element e : this.elements) {\n\t\t\t\tRequirementElement re = (RequirementElement) e;\n\t\t\t\tif (re.getFormalExpressions() != \"\") {\n\t\t\t\t\tresult += re.getFormalExpressions()+\"\\n\";\n\t\t\t\t}\n\n\t\t\t\t// Treat \"refine\" link in a special way. \n\t\t\t\t// the formalization of links (especially, the \"refine\" links) should be dynamically generated according to our needs\n\t\t\t\tif (re.refine_links!=null && re.refine_links.size() > 0) {\n\t\t\t\t\tString content = \"\";\n\t\t\t\t\tfor (int i = 0; i < re.refine_links.size(); i++) {\n\t\t\t\t\t\tcontent += re.refine_links.get(i).getSource().getId() + \",\";\n\t\t\t\t\t\t// if this is the last one, then add the refined element\n\t\t\t\t\t\tif (i == re.refine_links.size() - 1) {\n\t\t\t\t\t\t\tcontent += re.getId();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresult += \"refine_\" + re.refine_links.size() + \"(\" + content + \").\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Link l: this.links){\n\t\t\t\t// generate formal predicates for all \"and-refine\" links \n\t\t\t\tif(l.getType().equals(InfoEnum.RequirementLinkType.AND_REFINE.name())){\n\t\t\t\t\t// normal and-refine formalism\n\t\t\t\t\tresult += l.getFormalExpressions()+\"\\n\";\n\t\t\t\t}\n\t\t\t\t// generate formal predicates for all \"refine\" links as \"syntactic sugar\" \n\t\t\t\telse if(l.getType().equals(InfoEnum.RequirementLinkType.REFINE.name())){\n\t\t\t\t\tresult += l.getFormalExpressions()+\"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (scope == InfoEnum.SELECTED_MODELS) {\n\t\t\t// obtain selected elements' id\n\t\t\tArrayList<Long> selected_elements = null;\n\t\t\ttry {\n\t\t\t\t// here the returned value won't be null\n\t\t\t\tselected_elements = AppleScript.getSelectedGraph();\n\t\t\t\tRequirementElement selected_element = null;\n\t\t\t\tfor(Long id :selected_elements){\n\t\t\t\t\tselected_element = (RequirementElement)findElementById(Long.toString(id));\n\t\t\t\t\t// we here process \"only\" the selected elements, and its refine links \n\t\t\t\t\tif(selected_element!=null){\n\t\t\t\t\t\tresult += selected_element.getFormalExpressions();\n\t\t\t\t\t\t// further process related \"refine\" links\n\t\t\t\t\t\tif (selected_element.refine_links.size() > 0) {\n\t\t\t\t\t\t\tString content =\"\";\n\t\t\t\t\t\t\tfor(int i=0; i<selected_element.refine_links.size(); i++){\n\t\t\t\t\t\t\t\tcontent += selected_element.refine_links.get(i).getSource().getId() + \",\";\n\t\t\t\t\t\t\t\t// if this is the last one, then add the refined element\n\t\t\t\t\t\t\t\tif(i==selected_element.refine_links.size()-1){\n\t\t\t\t\t\t\t\t\tcontent += selected_element.getId();\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\tresult += \"refine_\"+selected_element.refine_links.size()+\"(\"+content+\").\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// process all \"and-refine\" links even though they may not be used during the inference.\n\t\t\t\tfor (Link l: this.links){\n\t\t\t\t\t// generate formal predicates for all \"and-refine\" links \n\t\t\t\t\tif(l.getType().equals(InfoEnum.RequirementLinkType.AND_REFINE.name())){\n\t\t\t\t\t\t// normal and-refine formalism\n\t\t\t\t\t\tresult += l.getFormalExpressions()+\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t// generate formal predicates for all \"refine\" links as \"syntactic sugar\" \n\t\t\t\t\telse if(l.getType().equals(InfoEnum.RequirementLinkType.REFINE.name())){\n\t\t\t\t\t\tresult += l.getFormalExpressions()+\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (ScriptException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t} else{\n\t\t\t// should be errors\n\t\t}\n\n\t\tresult = result.toLowerCase();\n\t\treturn result;\n\t}", "public void setFormula(IComplexFormula f){\r\n\t\tformula = f;\r\n\t}", "public final ManchesterOWLSyntaxAutoComplete.incompleteAxiom_return incompleteAxiom() {\n ManchesterOWLSyntaxAutoComplete.incompleteAxiom_return retval = new ManchesterOWLSyntaxAutoComplete.incompleteAxiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return lhs = null;\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return q = null;\n ManchesterOWLSyntaxAutoComplete.expression_return subProperty = null;\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.incompleteExpression_return range = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:440:1:\n // ( ^( INCOMPLETE_SUB_CLASS_AXIOM ^( EXPRESSION subClass= . ) ( ^(\n // INCOMPLETE_EXPRESSION superClass= incompleteExpression ) )? ) |\n // ^( INCOMPLETE_EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression )\n // ( ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression ) )? ) | ^(\n // INCOMPLETE_INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ( ^(\n // INCOMPLETE_EXPRESSION q= incompleteExpression ) )? ) | ^(\n // INCOMPLETE_DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) (\n // ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression ) )? ) | ^(\n // INCOMPLETE_SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty=\n // expression ) ( ^( INCOMPLETE_EXPRESSION superProperty=\n // incompleteExpression ) )? ) | ^( INCOMPLETE_ROLE_ASSERTION ^(\n // EXPRESSION IDENTIFIER ) ^( EXPRESSION propertyExpression ) ) | ^(\n // INCOMPLETE_TYPE_ASSERTION ^( EXPRESSION IDENTIFIER ) ) | ^(\n // INCOMPLETE_DOMAIN ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // INCOMPLETE_DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^(\n // INCOMPLETE_EXPRESSION domain= incompleteExpression ) ) | ^(\n // INCOMPLETE_RANGE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // INCOMPLETE_RANGE ^( EXPRESSION p= IDENTIFIER ) ^(\n // INCOMPLETE_EXPRESSION range= incompleteExpression ) ) | ^(\n // INCOMPLETE_SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER )\n // ) | ^( INCOMPLETE_DIFFERENT_FROM_AXIOM ^( EXPRESSION\n // anIndividual= IDENTIFIER ) ) | ^( INCOMPLETE_UNARY_AXIOM\n // FUNCTIONAL ) | ^( INCOMPLETE_UNARY_AXIOM INVERSE_FUNCTIONAL ) |\n // ^( INCOMPLETE_UNARY_AXIOM IRREFLEXIVE ) | ^(\n // INCOMPLETE_UNARY_AXIOM REFLEXIVE ) | ^( INCOMPLETE_UNARY_AXIOM\n // SYMMETRIC ) | ^( INCOMPLETE_UNARY_AXIOM TRANSITIVE ) )\n int alt22 = 19;\n alt22 = dfa22.predict(input);\n switch (alt22) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:442:5:\n // ^( INCOMPLETE_SUB_CLASS_AXIOM ^( EXPRESSION subClass= . ) (\n // ^( INCOMPLETE_EXPRESSION superClass= incompleteExpression )\n // )? )\n {\n match(input, INCOMPLETE_SUB_CLASS_AXIOM,\n FOLLOW_INCOMPLETE_SUB_CLASS_AXIOM_in_incompleteAxiom1521);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1525);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n input.LT(1);\n matchAny(input);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:442:63:\n // ( ^( INCOMPLETE_EXPRESSION superClass=\n // incompleteExpression ) )?\n int alt17 = 2;\n int LA17_0 = input.LA(1);\n if (LA17_0 == INCOMPLETE_EXPRESSION) {\n alt17 = 1;\n }\n switch (alt17) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:442:64:\n // ^( INCOMPLETE_EXPRESSION superClass=\n // incompleteExpression )\n {\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1537);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1543);\n superClass = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = superClass == null ? new ArrayList<>(\n symtab.getOWLClassCompletions()) : new ArrayList<>(\n superClass.completions);\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:447:6:\n // ^( INCOMPLETE_EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs=\n // expression ) ( ^( INCOMPLETE_EXPRESSION rhs=\n // incompleteExpression ) )? )\n {\n match(input, INCOMPLETE_EQUIVALENT_TO_AXIOM,\n FOLLOW_INCOMPLETE_EQUIVALENT_TO_AXIOM_in_incompleteAxiom1563);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1566);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_incompleteAxiom1572);\n lhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:447:70:\n // ( ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression ) )?\n int alt18 = 2;\n int LA18_0 = input.LA(1);\n if (LA18_0 == INCOMPLETE_EXPRESSION) {\n alt18 = 1;\n }\n switch (alt18) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:447:71:\n // ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression )\n {\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1577);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1584);\n rhs = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = rhs == null ? new ArrayList<>(\n symtab.getCompletions(lhs.node.getEvalType()))\n : new ArrayList<>(rhs.completions);\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:451:5:\n // ^( INCOMPLETE_INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ( ^(\n // INCOMPLETE_EXPRESSION q= incompleteExpression ) )? )\n {\n match(input, INCOMPLETE_INVERSE_OF,\n FOLLOW_INCOMPLETE_INVERSE_OF_in_incompleteAxiom1604);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1607);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1613);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:451:58:\n // ( ^( INCOMPLETE_EXPRESSION q= incompleteExpression ) )?\n int alt19 = 2;\n int LA19_0 = input.LA(1);\n if (LA19_0 == INCOMPLETE_EXPRESSION) {\n alt19 = 1;\n }\n switch (alt19) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:451:59:\n // ^( INCOMPLETE_EXPRESSION q= incompleteExpression )\n {\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1618);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1624);\n q = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = q == null ? new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions())\n : new ArrayList<>(q.completions);\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:456:5:\n // ^( INCOMPLETE_DISJOINT_WITH_AXIOM ^( EXPRESSION lhs=\n // expression ) ( ^( INCOMPLETE_EXPRESSION rhs=\n // incompleteExpression ) )? )\n {\n match(input, INCOMPLETE_DISJOINT_WITH_AXIOM,\n FOLLOW_INCOMPLETE_DISJOINT_WITH_AXIOM_in_incompleteAxiom1639);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1642);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_incompleteAxiom1649);\n lhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:456:70:\n // ( ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression ) )?\n int alt20 = 2;\n int LA20_0 = input.LA(1);\n if (LA20_0 == INCOMPLETE_EXPRESSION) {\n alt20 = 1;\n }\n switch (alt20) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:456:71:\n // ^( INCOMPLETE_EXPRESSION rhs= incompleteExpression )\n {\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1654);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1660);\n rhs = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = rhs == null ? new ArrayList<>(\n symtab.getCompletions(lhs.node.getEvalType()))\n : new ArrayList<>(rhs.completions);\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:459:5:\n // ^( INCOMPLETE_SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty=\n // expression ) ( ^( INCOMPLETE_EXPRESSION superProperty=\n // incompleteExpression ) )? )\n {\n match(input, INCOMPLETE_SUB_PROPERTY_AXIOM,\n FOLLOW_INCOMPLETE_SUB_PROPERTY_AXIOM_in_incompleteAxiom1675);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1678);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_incompleteAxiom1685);\n subProperty = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:459:77:\n // ( ^( INCOMPLETE_EXPRESSION superProperty=\n // incompleteExpression ) )?\n int alt21 = 2;\n int LA21_0 = input.LA(1);\n if (LA21_0 == INCOMPLETE_EXPRESSION) {\n alt21 = 1;\n }\n switch (alt21) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:459:78:\n // ^( INCOMPLETE_EXPRESSION superProperty=\n // incompleteExpression )\n {\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1690);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1696);\n superProperty = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n }\n break;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // property expression completions\n retval.completions = superProperty == null ? new ArrayList<>(\n symtab.getOWLPropertyCompletions(subProperty.node\n .getEvalType())) : new ArrayList<>(\n superProperty.completions);\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:464:5:\n // ^( INCOMPLETE_ROLE_ASSERTION ^( EXPRESSION IDENTIFIER ) ^(\n // EXPRESSION propertyExpression ) )\n {\n match(input, INCOMPLETE_ROLE_ASSERTION,\n FOLLOW_INCOMPLETE_ROLE_ASSERTION_in_incompleteAxiom1716);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1719);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1721);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1725);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_incompleteAxiom1727);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // individual expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLIndividualCompletions());\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:468:6:\n // ^( INCOMPLETE_TYPE_ASSERTION ^( EXPRESSION IDENTIFIER ) )\n {\n match(input, INCOMPLETE_TYPE_ASSERTION,\n FOLLOW_INCOMPLETE_TYPE_ASSERTION_in_incompleteAxiom1738);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1742);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1744);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:473:5:\n // ^( INCOMPLETE_DOMAIN ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, INCOMPLETE_DOMAIN,\n FOLLOW_INCOMPLETE_DOMAIN_in_incompleteAxiom1757);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1760);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1766);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:478:5:\n // ^( INCOMPLETE_DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^(\n // INCOMPLETE_EXPRESSION domain= incompleteExpression ) )\n {\n match(input, INCOMPLETE_DOMAIN,\n FOLLOW_INCOMPLETE_DOMAIN_in_incompleteAxiom1781);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1784);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1790);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1794);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1800);\n domain = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = domain.completions;\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:482:6:\n // ^( INCOMPLETE_RANGE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, INCOMPLETE_RANGE,\n FOLLOW_INCOMPLETE_RANGE_in_incompleteAxiom1815);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1818);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1824);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:486:6:\n // ^( INCOMPLETE_RANGE ^( EXPRESSION p= IDENTIFIER ) ^(\n // INCOMPLETE_EXPRESSION range= incompleteExpression ) )\n {\n match(input, INCOMPLETE_RANGE,\n FOLLOW_INCOMPLETE_RANGE_in_incompleteAxiom1835);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1838);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1844);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, INCOMPLETE_EXPRESSION,\n FOLLOW_INCOMPLETE_EXPRESSION_in_incompleteAxiom1848);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_incompleteExpression_in_incompleteAxiom1854);\n range = incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = range.completions;\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:490:6:\n // ^( INCOMPLETE_SAME_AS_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) )\n {\n match(input, INCOMPLETE_SAME_AS_AXIOM,\n FOLLOW_INCOMPLETE_SAME_AS_AXIOM_in_incompleteAxiom1869);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1872);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1877);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // individual expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLIndividualCompletions());\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:495:7:\n // ^( INCOMPLETE_DIFFERENT_FROM_AXIOM ^( EXPRESSION\n // anIndividual= IDENTIFIER ) )\n {\n match(input, INCOMPLETE_DIFFERENT_FROM_AXIOM,\n FOLLOW_INCOMPLETE_DIFFERENT_FROM_AXIOM_in_incompleteAxiom1893);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_incompleteAxiom1896);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_incompleteAxiom1901);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // individual expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLIndividualCompletions());\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:500:6:\n // ^( INCOMPLETE_UNARY_AXIOM FUNCTIONAL )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1916);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_incompleteAxiom1918);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // property expression completions\n retval.completions = new ArrayList<>(\n symtab.getAllCompletions(OWLType.OWL_OBJECT_PROPERTY,\n OWLType.OWL_DATA_PROPERTY));\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:505:6:\n // ^( INCOMPLETE_UNARY_AXIOM INVERSE_FUNCTIONAL )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1932);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_incompleteAxiom1934);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions());\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:510:7:\n // ^( INCOMPLETE_UNARY_AXIOM IRREFLEXIVE )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1949);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_incompleteAxiom1951);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions());\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:515:6:\n // ^( INCOMPLETE_UNARY_AXIOM REFLEXIVE )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1965);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_incompleteAxiom1967);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions());\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:520:6:\n // ^( INCOMPLETE_UNARY_AXIOM SYMMETRIC )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1981);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_incompleteAxiom1983);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions());\n }\n }\n break;\n case 19:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:525:7:\n // ^( INCOMPLETE_UNARY_AXIOM TRANSITIVE )\n {\n match(input, INCOMPLETE_UNARY_AXIOM,\n FOLLOW_INCOMPLETE_UNARY_AXIOM_in_incompleteAxiom1999);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_incompleteAxiom2001);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // object property expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLObjectPropertyCompletions());\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "BooleanFormula getQuantifiedBody(Formula pQuantifiedFormula);", "public final ManchesterOWLSyntaxAutoComplete.axiom_return axiom() {\n ManchesterOWLSyntaxAutoComplete.axiom_return retval = new ManchesterOWLSyntaxAutoComplete.axiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree p = null;\n ManchesterOWLSyntaxTree anotherProperty = null;\n ManchesterOWLSyntaxTree subject = null;\n ManchesterOWLSyntaxTree anotherIndividual = null;\n ManchesterOWLSyntaxAutoComplete.expression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.unary_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.unary_return object = null;\n ManchesterOWLSyntaxAutoComplete.expression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.expression_return range = null;\n ManchesterOWLSyntaxAutoComplete.axiom_return a = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:284:1:\n // ( ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) ) | ^( EQUIVALENT_TO_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) ) | ^( DISJOINT_WITH_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression ) ^(\n // EXPRESSION superProperty= unary ) ) | ^( ROLE_ASSERTION ^(\n // EXPRESSION subject= IDENTIFIER ) ^( EXPRESSION predicate=\n // propertyExpression ) ^( EXPRESSION object= unary ) ) | ^(\n // TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) ) | ^( DOMAIN ^( EXPRESSION p=\n // IDENTIFIER ) ^( EXPRESSION domain= expression ) ) | ^( RANGE ^(\n // EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range= expression ) ) |\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^(\n // DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // NEGATED_ASSERTION a= axiom ) )\n int alt16 = 18;\n alt16 = dfa16.predict(input);\n switch (alt16) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:285:3:\n // ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) )\n {\n match(input, SUB_CLASS_AXIOM, FOLLOW_SUB_CLASS_AXIOM_in_axiom936);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom940);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom947);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom952);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom959);\n superClass = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superClass.node.getCompletions());\n } else {\n retval.completions = new ArrayList<>(\n AutoCompleteStrings\n .getStandaloneExpressionCompletions(superClass.node\n .getEvalType()));\n }\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:293:5:\n // ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, EQUIVALENT_TO_AXIOM,\n FOLLOW_EQUIVALENT_TO_AXIOM_in_axiom972);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom975);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom981);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom985);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom992);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:301:4:\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) )\n {\n match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_axiom1007);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1010);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1016);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1020);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherProperty = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1026);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherProperty.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:309:5:\n // ^( DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, DISJOINT_WITH_AXIOM,\n FOLLOW_DISJOINT_WITH_AXIOM_in_axiom1038);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1041);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1048);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1052);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1058);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:316:4:\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression )\n // ^( EXPRESSION superProperty= unary ) )\n {\n match(input, SUB_PROPERTY_AXIOM,\n FOLLOW_SUB_PROPERTY_AXIOM_in_axiom1070);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1073);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1080);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1084);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1090);\n superProperty = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superProperty.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:324:4:\n // ^( ROLE_ASSERTION ^( EXPRESSION subject= IDENTIFIER ) ^(\n // EXPRESSION predicate= propertyExpression ) ^( EXPRESSION\n // object= unary ) )\n {\n match(input, ROLE_ASSERTION, FOLLOW_ROLE_ASSERTION_in_axiom1104);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1107);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1114);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1118);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_axiom1125);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1129);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1135);\n object = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n object.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:331:5:\n // ^( TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) )\n {\n match(input, TYPE_ASSERTION, FOLLOW_TYPE_ASSERTION_in_axiom1145);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1148);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1155);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1159);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1165);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = subject.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:339:4:\n // ^( DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION domain=\n // expression ) )\n {\n match(input, DOMAIN, FOLLOW_DOMAIN_in_axiom1177);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1180);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1186);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1190);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1196);\n domain = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n domain.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:347:5:\n // ^( RANGE ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range=\n // expression ) )\n {\n match(input, RANGE, FOLLOW_RANGE_in_axiom1209);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1212);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1218);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1222);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1228);\n range = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n range.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:355:6:\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, SAME_AS_AXIOM, FOLLOW_SAME_AS_AXIOM_in_axiom1243);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1246);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1251);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1255);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1261);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:363:7:\n // ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) ^( EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, DIFFERENT_FROM_AXIOM,\n FOLLOW_DIFFERENT_FROM_AXIOM_in_axiom1277);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1280);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1285);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1289);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1295);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:371:5:\n // ^( UNARY_AXIOM FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1309);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_axiom1311);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1314);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1320);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:379:5:\n // ^( UNARY_AXIOM INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER\n // ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1333);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_axiom1335);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1338);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1344);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:387:7:\n // ^( UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1360);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_axiom1362);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1365);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1371);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:395:6:\n // ^( UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1386);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_axiom1388);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1391);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1397);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:403:6:\n // ^( UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1412);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_axiom1414);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1417);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1423);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:411:7:\n // ^( UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1440);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_axiom1442);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1445);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1451);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:419:6:\n // ^( NEGATED_ASSERTION a= axiom )\n {\n match(input, NEGATED_ASSERTION, FOLLOW_NEGATED_ASSERTION_in_axiom1466);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_axiom_in_axiom1471);\n a = axiom();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = a.completions;\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "@iri(\"http://persistent.name/rdf/2010/purl#definedBy\")\n\tObject getPurlDefinedBy();", "String getName(Formula f);", "public abstract jq_Method getDefiningMethod();", "FullExpression createFullExpression();", "private static Triple<SetFormula, Literal, Set<AtomicFormula>> getEquisatisfiableCNFRec(Formula f, Set<AtomicFormula> occurences) {\n\t\tif (f instanceof AtomicFormula) {\n\t\t\tLiteral l = new Literal((AtomicFormula) f);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof NOTFormula)\n\t\t{\n\t\t\tNOTFormula g = (NOTFormula)f;\n\t\t\tLiteral l = new Literal((AtomicFormula) g.getArgumentFormula(), false);\n\t\t\tSetFormula s = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\t// Just return essentially the inital formula\n\t\t\treturn new Triple<>(s,l, occurences);\n\t\t}\n\t\tif(f instanceof ORFormula)\n\t\t{\n\t\t\tORFormula g = (ORFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(leadingLiterals);\n\t\t\tfirstSet.add(leadingLiteral.negate());\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteral, l.negate())),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tif(f instanceof ANDFormula)\n\t\t{\n\t\t\tANDFormula g = (ANDFormula)f;\n\t\t\tSetFormula setFormula = SetFormula.getEmptySetFormula(Type.CNF);\n\t\t\tHolder<SetFormula> setFormulaHolder = new Holder<SetFormula>(setFormula);\n\t\t\tSet<AtomicFormula> newOccurences = new HashSet<>(occurences);\n\t\t\tSet<Literal> leadingLiterals = new HashSet<>();\n\t\t\tg.getOrigList().forEach(e -> {\n\t\t\t\tTriple<SetFormula, Literal, Set<AtomicFormula>> triple = getEquisatisfiableCNFRec(e, newOccurences);\n\t\t\t\tnewOccurences.addAll(triple.getThird());\n\t\t\t\tleadingLiterals.add(triple.getSecond());\n\t\t\t\tsetFormulaHolder.set(setFormulaHolder.get().and(triple.getFirst()));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder.get();\n\t\t\tLiteral leadingLiteral = new Literal(Formula.getNewAtomicFormula(newOccurences));\n\t\t\tnewOccurences.add(leadingLiteral.getFormula());\n\t\t\tSet<Literal> firstSet = new HashSet<>(LogicHelper.convert(leadingLiterals, l -> l.negate()));\n\t\t\tfirstSet.add(leadingLiteral);\n\t\t\tsetFormula = setFormula.and(new SetFormula(LogicHelper.createSet(firstSet), Type.CNF));\n\t\t\tHolder<SetFormula> setFormulaHolder2 = new Holder<SetFormula>(setFormula);\n\t\t\tLiteral leadingLiteralNegation = leadingLiteral.negate();\n\t\t\tleadingLiterals.forEach(l -> {\n\t\t\t\tsetFormulaHolder2.set(setFormulaHolder2.get().and(new SetFormula(LogicHelper.createSet(LogicHelper.createSet(leadingLiteralNegation, l)),Type.CNF)));\n\t\t\t});\n\t\t\tsetFormula = setFormulaHolder2.get();\n\t\t\treturn new Triple<>(setFormula, leadingLiteral, newOccurences);\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Formula type not supported\");\n\t}", "private void writeFormula(URNspec urn) throws IOException {\n\n\t\teleForMap = new HashMap<IntentionalElement, StringBuffer>();\n\t\tStringBuffer eleFormula;\n\t\tStringBuffer function;\n\t\t// initial all the symbols\n\t\twrite(\"#inital all the variable\\n\");\n\t\tfor (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) {\n\t\t\tIntentionalElement element = (IntentionalElement) it.next();\n\t\t\tStringBuffer variable = new StringBuffer();\n\t\t\tvariable.append(modifyName(element.getName()));\n\t\t\tvariable.append(Equal);\n\t\t\tvariable.append(\"Symbol\");\n\t\t\tvariable.append(LeftBracker);\n\t\t\tvariable.append(\"'\");\n\t\t\tvariable.append(modifyName(element.getName()));\n\t\t\tvariable.append(\"'\");\n\t\t\tvariable.append(RightBracker);\n\t\t\twrite(variable.toString());\n\t\t\twrite(\"\\n\");\n\t\t}\n\t\t\n\t\t\n\t\t// iterate all the leaf element\n\t\tfor (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) {\n\t\t\tIntentionalElement element = (IntentionalElement) it.next();\n\t\t\teleFormula = new StringBuffer();\n\t\t\tfunction = new StringBuffer();\n\t\t\tfunction.append(modifyName(element.getName()));\n\t\t\t// if the element is the leaf\n\t\t\tif (element.getLinksDest().size() == 0) {\n\t\t\t\t// System.out.println(element.getName() + \"leaf\");\n\t\t\t\tif (element.getType().getName().compareTo(\"Indicator\") == 0) {\n\t\t\t\t\tIndicator indicator = (Indicator) element;\n\t\t\t\t\tif (indicator.getWorstValue() == indicator.getTargetValue()) {\n\t\t\t\t\t\teleFormula.append(modifyName(element.getName()));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tStringBuffer indicatorFor = indicatorFor(element);\n\t\t\t\t\t\teleFormula.append(indicatorFor);\n\t\t\t\t\t\tfunction.append(Equal);\n\t\t\t\t\t\tfunction.append(eleFormula);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\teleFormula.append(modifyName(element.getName()));\n\t\t\t\t}\n\t\t\t\telementSet.add(\"'\" + modifyName(element.getName()) + \"'\");\n\t\t\t\teleForMap.put(element, eleFormula);\n\t\t\t}\n\t\t}\n\t\tfor (Iterator it = urn.getGrlspec().getIntElements().iterator(); it.hasNext();) {\n\t\t\tIntentionalElement element = (IntentionalElement) it.next();\n\t\t\teleFormula = new StringBuffer();\n\t\t\tfunction = new StringBuffer();\n\t\t\tfunction.append(modifyName(element.getName()));\n\n\t\t\tif (element.getLinksDest().size() != 0) {\n\t\t\t\teleFormula.append(writeLink(element));\n\t\t\t\tfunction.append(Equal);\n\t\t\t\tfunction.append(eleFormula);\n\t\t\t\twrite(function.toString());\n\t\t\t\twrite(\"\\n\");\n\t\t\t\teleForMap.put(element, eleFormula);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public ElementList getPredicate() {\r\n return predicate;\r\n }", "public Object visitDefinedExpression(GNode n) {\n String parameter = n.getGeneric(0).getString(0);\n \n //evaluate the defined operation, preserving configurations\n if (macroTable != null) {\n List<Entry> definitions = macroTable.get(parameter, presenceConditionManager);\n \n if (definitions != null && definitions.size() > 0) {\n boolean hasDefined, hasUndefined, hasFree;\n \n //three conditions\n //1) defined under all configurations, so output 1 (true)\n //2) undefined under all configurations, so output 0 (false)\n //3) partially defined, so output union of configurations\n \n hasDefined = false;\n hasUndefined = false;\n hasFree = false;\n for (Entry def : definitions) {\n if (def.macro.state == Macro.State.FREE) {\n hasFree = true;\n }\n else if (def.macro.state == Macro.State.DEFINED) {\n hasDefined = true;\n }\n else if (def.macro.state == Macro.State.UNDEFINED) {\n hasUndefined = true;\n }\n }\n \n if (hasDefined && ! hasUndefined && ! hasFree) {\n //fully defined in this presenceCondition\n return B.one(); //the constant true BDD\n \n } else if (hasUndefined && ! hasDefined && ! hasFree) {\n //not defined in this presenceCondition\n return B.zero(); //the constant false BDD\n \n } else {\n //partially defined in this presenceCondition\n BDD defined = B.zero();\n List<Token> tokenlist;\n int c;\n \n for (Entry def : definitions) {\n if (def.macro.state == Macro.State.FREE) {\n BDD newDefined;\n BDD varBDD;\n BDD term;\n \n varBDD = presenceConditionManager.getVariableManager()\n .getDefinedVariable(parameter);\n \n term = def.presenceCondition.getBDD().and(varBDD);\n newDefined = defined.or(term);\n term.free();\n defined.free();\n varBDD.free();\n defined = newDefined;\n \n } else if (def.macro.state == Macro.State.DEFINED) {\n BDD newDefined;\n \n newDefined = defined.or(def.presenceCondition.getBDD());\n defined.free();\n defined = newDefined;\n } else if (def.macro.state == Macro.State.UNDEFINED) {\n //do nothing\n }\n }\n \n return defined;\n } //end partially defined\n \n } else {\n // The macro was used in a conditional expression before or\n // without being defined, therefore it is a configuration\n // variable.\n if (runtime.test(\"configurationVariables\")) {\n macroTable.configurationVariables.add(parameter);\n }\n }\n } //end has macro table\n \n /*if (runtime.test(\"cppmode\")) {\n //return false in cpp mode\n return \"0\";\n }\n else*/ {\n //if there are no macro table entries, just return the operation as is\n return \"defined \" + parameter; //return a string\n }\n }", "public abstract String getDefinition();", "private JScrollPane getScrollFormulas() {\n\t\tif (scrollFormulas == null) {\n\t\t\tscrollFormulas = new JScrollPane();\n\t\t\tscrollFormulas.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));\n\t\t\tscrollFormulas.setMinimumSize(new Dimension(260, 147));\n\t\t\tscrollFormulas.setViewportView(getListFormulas());\n\t\t}\n\t\treturn scrollFormulas;\n\t}", "private int printFormulasDef(Proofs p, int cpt) throws LanguageException {\n\t\tif (p != null) {\n\t\t\tEnumeration e = p.getLocHyp();\n\t\t\twhile (e.hasMoreElements()) {\n\t\t\t\tVirtualFormula vf = (VirtualFormula) e.nextElement();\n\t\t\t\tif (p.isUsed(vf)) {\n\t\t\t\t\tFormula f = vf.getFormula();\n\t\t\t\t\tif (printer.firstItem)\n\t\t\t\t\t\tprinter.firstItem = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tstream.println(\";\");\n\t\t\t\t\tstream.print(\"f_\" + cpt + \" == (\");\n\t\t\t\t\tstream.print(f.toLang(\"B\", 0).toUniqString());\n\t\t\t\t\tstream.print(\")\");\n\t\t\t\t\tcpt++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < p.nbLemmas() - 1; i++) {\n\t\t\t\tSimpleLemma l = p.getLemma(i);\n\t\t\t\tEnumeration e1 = l.getGoals();\n\t\t\t\twhile (e1.hasMoreElements()) {\n\t\t\t\t\tNonObviousGoal g = (NonObviousGoal) e1.nextElement();\n\t\t\t\t\tif (printer.firstItem)\n\t\t\t\t\t\tprinter.firstItem = false;\n\t\t\t\t\telse\n\t\t\t\t\t\tstream.println(\";\");\n\t\t\t\t\tstream.print(\"f_\" + cpt + \" == (\");\n\t\t\t\t\t//TODO Traiter correctement les methodes pures\n\t\t\t\tstream.print(g.getFormula().toLang(\"B\", 0).toUniqString());\n\t\t\t\t\tstream.print(\")\");\n\t\t\t\t\tcpt++;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cpt;\n\t}", "private JPanel getPanelFormulas() {\n\t\tif (panelFormulas == null) {\n\t\t\tpanelFormulas = new JPanel();\n\t\t\tpanelFormulas.setLayout(new BorderLayout());\n\t\t\tpanelFormulas.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED), CMMessages.getString(\"TESTDATA_NAME_FORMULA\"), TitledBorder.LEADING, TitledBorder.TOP, new Font(\"SansSerif\", Font.BOLD, 10), SystemColor.activeCaption));\n\t\t\tpanelFormulas.setPreferredSize(new Dimension(272, 158));\n\t\t\tpanelFormulas.setMinimumSize(new Dimension(272, 158));\n\t\t\tpanelFormulas.add(getScrollFormulas(), BorderLayout.CENTER);\n\t\t}\n\t\treturn panelFormulas;\n\t}", "AttributeDefinition getDefinition();", "public String getDefinition(Character identifier){\n return rules.get(identifier);\n }", "public ObstacleDefinition getDefinition() {\n return this.definition;\n }", "String getDefiningEnd();", "private Node getFunctionalOpLHS(Node relOpNode, Node dataCriteriaSectionElem, Node lhsNode, Node rhsNode,\n\t\t\tString clauseName) throws XPathExpressionException {\n\t\tNode entryNode = generateFunctionalOpHQMF(lhsNode, (Element) dataCriteriaSectionElem, clauseName);\n\n\t\t// Comment comment =\n\t\t// measureExport.getHQMFXmlProcessor().getOriginalDoc().createComment(\"entry for\n\t\t// \"+relOpNode.getAttributes().getNamedItem(DISPLAY_NAME).getNodeValue());\n\t\t// dataCriteriaSectionElem.appendChild(comment);\n\t\tif (entryNode != null) {\n\t\t\tNode subTreeParentNode = checkIfSubTree(relOpNode.getParentNode());\n\t\t\tNode idNode = findNode(entryNode, \"ID\");\n\t\t\tif (idNode != null && subTreeParentNode != null) {\n\t\t\t\tString idExtension = idNode.getAttributes().getNamedItem(EXTENSION).getNodeValue();\n\t\t\t\tString idRoot = idNode.getAttributes().getNamedItem(ROOT).getNodeValue();\n\t\t\t\tString root = subTreeParentNode.getAttributes().getNamedItem(UUID).getNodeValue();\n\t\t\t\tString ext = StringUtils\n\t\t\t\t\t\t.deleteWhitespace(relOpNode.getAttributes().getNamedItem(DISPLAY_NAME).getNodeValue() + \"_\"\n\t\t\t\t\t\t\t\t+ relOpNode.getAttributes().getNamedItem(UUID).getNodeValue());\n\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE) != null) {\n\t\t\t\t\tString isQdmVariable = subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE).getNodeValue();\n\t\t\t\t\tif (TRUE.equalsIgnoreCase(isQdmVariable)) {\n\t\t\t\t\t\tString occText = null;\n\t\t\t\t\t\t// Handled Occurrence Of QDM Variable.\n\t\t\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(INSTANCE_OF) != null) {\n\t\t\t\t\t\t\toccText = \"occ\" + subTreeParentNode.getAttributes().getNamedItem(INSTANCE).getNodeValue()\n\t\t\t\t\t\t\t\t\t+ \"of_\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (occText != null) {\n\t\t\t\t\t\t\text = occText + \"qdm_var_\" + ext;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\text = \"qdm_var_\" + ext;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tidNode.getAttributes().getNamedItem(ROOT).setNodeValue(root);\n\t\t\t\tidNode.getAttributes().getNamedItem(EXTENSION).setNodeValue(ext);\n\t\t\t\t// Updated Excerpt tag idNode root and extension.\n\t\t\t\t// String hqmfXmlString = measureExport.getHQMFXmlProcessor().getOriginalXml();\n\t\t\t\tNode idNodeExcerpt = measureExport.getHQMFXmlProcessor().findNode(\n\t\t\t\t\t\tmeasureExport.getHQMFXmlProcessor().getOriginalDoc(),\n\t\t\t\t\t\t\"//entry/*/excerpt/*/id[@root='\" + idRoot + \"'][@extension=\\\"\" + idExtension + \"\\\"]\");\n\t\t\t\tif (idNodeExcerpt != null) {\n\t\t\t\t\tidNodeExcerpt.getAttributes().getNamedItem(ROOT).setNodeValue(root);\n\t\t\t\t\tidNodeExcerpt.getAttributes().getNamedItem(EXTENSION).setNodeValue(ext);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Element temporallyRelatedInfoNode = createBaseTemporalNode(relOpNode,\n\t\t\t// measureExport.getHQMFXmlProcessor());\n\t\t\tElement temporallyRelatedInfoNode = null;\n\t\t\tif (!FULFILLS.equalsIgnoreCase(relOpNode.getAttributes().getNamedItem(TYPE).getNodeValue())) {\n\t\t\t\ttemporallyRelatedInfoNode = createBaseTemporalNode(relOpNode, measureExport.getHQMFXmlProcessor());\n\t\t\t} else {\n\t\t\t\ttemporallyRelatedInfoNode = measureExport.getHQMFXmlProcessor().getOriginalDoc()\n\t\t\t\t\t\t.createElement(OUTBOUND_RELATIONSHIP);\n\t\t\t\ttemporallyRelatedInfoNode.setAttribute(TYPE_CODE, \"FLFS\");\n\t\t\t}\n\t\t\thandleRelOpRHS(rhsNode, temporallyRelatedInfoNode, clauseName);\n\t\t\tNode firstChild = entryNode.getFirstChild();\n\t\t\tif (LOCAL_VARIABLE_NAME.equals(firstChild.getNodeName())) {\n\t\t\t\tfirstChild = firstChild.getNextSibling();\n\t\t\t}\n\t\t\tNodeList outBoundList = ((Element) firstChild).getElementsByTagName(OUTBOUND_RELATIONSHIP);\n\t\t\tif (outBoundList != null && outBoundList.getLength() > 0) {\n\t\t\t\tNode outBound = outBoundList.item(0);\n\t\t\t\tfirstChild.insertBefore(temporallyRelatedInfoNode, outBound);\n\t\t\t} else {\n\t\t\t\tNodeList excerptList = ((Element) firstChild).getElementsByTagName(EXCERPT);\n\t\t\t\tif (excerptList != null && excerptList.getLength() > 0) {\n\t\t\t\t\tNode excerptNode = excerptList.item(0);\n\t\t\t\t\tfirstChild.insertBefore(temporallyRelatedInfoNode, excerptNode);\n\t\t\t\t} else {\n\t\t\t\t\tfirstChild.appendChild(temporallyRelatedInfoNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdataCriteriaSectionElem.appendChild(entryNode);\n\t\t}\n\t\t/*\n\t\t * else{ Comment commnt = measureExport.getHQMFXmlProcessor().getOriginalDoc().\n\t\t * createComment(\"CHECK:Could not find an entry for functionalOp:\"+lhsNode.\n\t\t * getAttributes().getNamedItem(DISPLAY_NAME).getNodeValue());\n\t\t * dataCriteriaSectionElem.appendChild(commnt); }\n\t\t */\n\t\treturn entryNode;\n\t}", "public Rule termBase()\n \t{\n \t\treturn firstOf(idExprReq(), litteral(), typeBase(), id());\n \t}", "public String getTitleFormula() {\n\t if(! chart.isSetTitle()) {\n\t return null;\n\t }\n\n\t CTTitle title = chart.getTitle();\n\t \n\t if (! title.isSetTx()) {\n\t return null;\n\t }\n\t \n\t CTTx tx = title.getTx();\n\t \n\t if (! tx.isSetStrRef()) {\n\t return null;\n\t }\n\t \n\t return tx.getStrRef().getF();\n\t}", "LogicExpression getExpr();", "@JsonGetter(\"definition\")\r\n @JsonInclude(JsonInclude.Include.NON_NULL)\r\n public LoyaltyProgramRewardDefinition getDefinition() {\r\n return definition;\r\n }", "public FormalCompound getFormalCompound() {\r\n\treturn formalCompound;\r\n}", "public BenchmarkFormulaElements getBenchmarkFormulaAccess() {\n\t\treturn pBenchmarkFormula;\n\t}", "public double getConventionalEvaluation() {\n\t\treturn conventionalEvaluation;\n\t}", "private Node generateFunctionalOpHQMF(Node functionalNode, Element dataCriteriaSectionElem, String clauseName)\n\t\t\tthrows XPathExpressionException {\n\t\tNode node = null;\n\t\tif (functionalNode.getChildNodes() != null) {\n\t\t\tNode firstChildNode = functionalNode.getFirstChild();\n\t\t\tString firstChildName = firstChildNode.getNodeName();\n\t\t\tswitch (firstChildName) {\n\t\t\tcase SET_OP:\n\t\t\t\tString functionOpType = functionalNode.getAttributes().getNamedItem(TYPE).getNodeValue();\n\t\t\t\tif (FUNCTIONAL_OPS_NON_SUBSET.containsKey(functionOpType.toUpperCase())\n\t\t\t\t\t\t|| FUNCTIONAL_OPS_SUBSET.containsKey(functionOpType.toUpperCase())) {\n\t\t\t\t\tnode = generateSetOpHQMF(firstChildNode, dataCriteriaSectionElem, clauseName);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ELEMENT_REF:\n\t\t\t\tnode = generateElementRefHQMF(firstChildNode, dataCriteriaSectionElem, clauseName);\n\t\t\t\tbreak;\n\t\t\tcase RELATIONAL_OP:\n\t\t\t\tnode = generateRelOpHQMF(firstChildNode, dataCriteriaSectionElem, clauseName);\n\t\t\t\tbreak;\n\t\t\tcase FUNCTIONAL_OP:\n\t\t\t\t// findFunctionalOpChild(firstChildNode, dataCriteriaSectionElem);\n\t\t\t\tbreak;\n\t\t\tcase SUB_TREE_REF:\n\t\t\t\tnode = generateSubTreeHQMFInFunctionalOp(firstChildNode, dataCriteriaSectionElem, clauseName);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// Dont do anything\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString localVarName = clauseName;\n\n\t\t\tlocalVarName = localVarName.replace(\"$\", \"\");\n\t\t\tNode parentNode = functionalNode.getParentNode();\n\t\t\tif (parentNode != null && parentNode.getNodeName().equalsIgnoreCase(\"subTree\")) {\n\t\t\t\tif (parentNode.getAttributes().getNamedItem(QDM_VARIABLE) != null) {\n\t\t\t\t\tString isQdmVariable = parentNode.getAttributes().getNamedItem(QDM_VARIABLE).getNodeValue();\n\t\t\t\t\tif (TRUE.equalsIgnoreCase(isQdmVariable)) {\n\t\t\t\t\t\tlocalVarName = localVarName.replace(\"$\", \"\");\n\t\t\t\t\t\tlocalVarName = \"qdm_var_\" + localVarName;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlocalVarName = localVarName + \"_\" + UUIDUtilClient.uuid(5);\n\t\t\t\tlocalVarName = StringUtils.deleteWhitespace(localVarName);\n\t\t\t\tupdateLocalVar(node, localVarName);\n\t\t\t}\n\t\t}\n\t\treturn node;\n\n\t}", "public interface SubstPred extends Reason {\r\n\r\n /**\r\n * Get this reason.\r\n *\r\n * @return This reason.\r\n */\r\n public SubstPred getSubstPred();\r\n\r\n /**\r\n * Get reference to already proven formula.\r\n *\r\n * @return Reference to previously proved formula.\r\n */\r\n public String getReference();\r\n\r\n /**\r\n * Get predicate variable (with subject variables as parameters) that should be replaced.\r\n *\r\n * @return Reference to previously proved formula.\r\n */\r\n public Element getPredicateVariable();\r\n\r\n /**\r\n * Get substitute formula. Must contain the subject variables from\r\n * {@link #getPredicateVariable()}.\r\n *\r\n * @return Replacement term.\r\n */\r\n public Element getSubstituteFormula();\r\n\r\n}", "public List<Formulaire> getFormulaires(){\n return formulaireRepository.findAll();\n }", "@Override\r\n public RuleDefinition build() {\r\n return new RuleDefinition(this);\r\n }", "public Predicate getPredicate() {\n\t\treturn pred;\n\t}", "public String getDefinition(){\n\t\treturn definition;\n\t}", "protected String roleMapToFormula() {\n List<String> pieces = new ArrayList<String>();\n for ( Map.Entry<SecurityOwner, String> entry : roleBasedConstraintMap.entrySet() ) {\n SecurityOwner owner = entry.getKey();\n String formula = entry.getValue();\n\n StringBuilder formulaBuf = new StringBuilder();\n formulaBuf.append( FUNC_AND ).append( PARAM_LIST_BEGIN ).append( FUNC_IN ).append( PARAM_LIST_BEGIN ).append(\n PARAM_QUOTE ).append( owner.getOwnerName() ).append( PARAM_QUOTE ).append( PARAM_SEPARATOR ).append(\n owner.getOwnerType() == SecurityOwner.OWNER_TYPE_ROLE ? FUNC_ROLES : FUNC_USER ).append( PARAM_LIST_END )\n .append( PARAM_SEPARATOR ).append( formula ).append( PARAM_LIST_END );\n pieces.add( formulaBuf.toString() );\n\n }\n\n StringBuilder buf = new StringBuilder();\n buf.append( FUNC_OR );\n buf.append( PARAM_LIST_BEGIN );\n int index = 0;\n for ( String piece : pieces ) {\n if ( index > 0 ) {\n buf.append( PARAM_SEPARATOR );\n }\n buf.append( piece );\n index++;\n }\n buf.append( PARAM_LIST_END );\n\n logger.debug( \"singleFormula: \" + buf );\n\n return buf.toString();\n }", "public static CommonAxiom closure(Relation r){\n\t\t//build nodes\n\t\tFormulaTree allX = new FormulaTree(new UniversalQuantifier('x'));\n\t\tFormulaTree allY = new FormulaTree(new UniversalQuantifier('y'));\n\t\tFormulaTree existsZ = new FormulaTree(new ExistentialQuantifier('z'));\n\t\tFormulaTree closurePredicate = new FormulaTree(new Predicate(r, new char[]{'x','y','z'}));\n\t\t\n\t\t//construct tree\n\t\tallX.setRight(null);\n\t\tallX.setLeft(allY);\n\t\tallY.setRight(null);\n\t\tallY.setLeft(existsZ);\n\t\texistsZ.setRight(null);\n\t\texistsZ.setLeft(closurePredicate);\n\n\t\t//return top node\n\t\treturn new CommonAxiom(allX, \"closure (\" + r.name() + \")\");\n\t}", "public ImmunizationDefinition getDefinition() {\n long __key = this.definitionImmunizationDefinitionId;\n if (definition__resolvedKey == null || !definition__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n ImmunizationDefinitionDao targetDao = daoSession.getImmunizationDefinitionDao();\n ImmunizationDefinition definitionNew = targetDao.load(__key);\n synchronized (this) {\n definition = definitionNew;\n \tdefinition__resolvedKey = __key;\n }\n }\n return definition;\n }", "public boolean getForceFormulaRecalculation() {\n\t\treturn false;\n\t}", "public abstract RelationDeclaration getRelation();", "DExpression getExpression();", "@Override\r\n\tpublic String asFormula(double step){\n\t\treturn null;\r\n\t}", "public Integer getDefinition(){\n\t\treturn define;\n\t}", "public String getFormal() { \n\t\treturn getFormalElement().getValue();\n\t}", "public Element getPredicateVariable();", "public GameObjectDefinition getDefinition() {\n\t\tif (definition == null)\n\t\t\tdefinition = GameObjectDefinition.forId(id);\n\t\treturn definition;\n\t}", "public Predicate usedFirstBodyPredicate() {\n\t\tif (!bodyAtomsPositive.isEmpty()) {\n\t\t\treturn (bodyAtomsPositive.get(0)).getPredicate();\n\t\t} else if (!bodyAtomsNegative.isEmpty()) {\n\t\t\treturn (bodyAtomsNegative.get(0)).getPredicate();\n\t\t}\n\t\tthrow new RuntimeException(\"Encountered NonGroundRule with empty body, which should have been treated as a fact.\");\n\t}", "public CompiledFunctionDefinition getFunction() {\n return _function;\n }", "@Override\n\tpublic Condition getGoal()\n\t{\n\t\treturn explicitGoal;\n\t}", "public abstract T getSolverDeclaration();", "Evaluator getRequiresEvaluator()\n{\n return new Requires();\n}", "public String getPredicateSymbol()\n {\n return predicateSymbol;\n }", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "IEmfPredicate<R> getPredicateMandatory();", "public abstract XPathExpression getExpression();", "public List<String> definition() {\n return this.definition;\n }", "public NPCDefinition getDefinition() {\n\t\treturn definition;\n\t}", "public definitionSet getDefinitionSet() {\n return definitionSet;\n }", "public byte[] getFormulaData()\r\n/* 161: */ {\r\n/* 162:293 */ byte[] data = new byte[this.formulaBytes.length + 16];\r\n/* 163:294 */ System.arraycopy(this.formulaBytes, 0, data, 16, this.formulaBytes.length);\r\n/* 164: */ \r\n/* 165:296 */ data[6] = 16;\r\n/* 166:297 */ data[7] = 64;\r\n/* 167:298 */ data[12] = -32;\r\n/* 168:299 */ data[13] = -4; byte[] \r\n/* 169: */ \r\n/* 170:301 */ tmp54_51 = data;tmp54_51[8] = ((byte)(tmp54_51[8] | 0x2));\r\n/* 171: */ \r\n/* 172: */ \r\n/* 173:304 */ IntegerHelper.getTwoBytes(this.formulaBytes.length, data, 14);\r\n/* 174: */ \r\n/* 175:306 */ return data;\r\n/* 176: */ }", "ExpressionCalculPrimary getExpr();", "private void setHasFormulasToEvaluate() {\n this.hasFormulasToEvaluate = this.mempoiSubFooter instanceof FormulaSubFooter;\n }", "public Expression getFunction()\n\t{\n\t\treturn function;\n\t}", "public final ManchesterOWLSyntaxAutoComplete.incompleteQualifiedRestriction_return incompleteQualifiedRestriction() {\n ManchesterOWLSyntaxAutoComplete.incompleteQualifiedRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.incompleteQualifiedRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.incompleteCardinalityRestriction_return incompleteCardinalityRestriction16 = null;\n ManchesterOWLSyntaxAutoComplete.incompleteOneOf_return incompleteOneOf17 = null;\n ManchesterOWLSyntaxAutoComplete.incompleteValueRestriction_return incompleteValueRestriction18 = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:609:1:\n // ( ^( INCOMPLETE_SOME_RESTRICTION propertyExpression ) | ^(\n // INCOMPLETE_ALL_RESTRICTION propertyExpression ) |\n // incompleteCardinalityRestriction | incompleteOneOf |\n // incompleteValueRestriction )\n int alt28 = 5;\n switch (input.LA(1)) {\n case INCOMPLETE_SOME_RESTRICTION: {\n alt28 = 1;\n }\n break;\n case INCOMPLETE_ALL_RESTRICTION: {\n alt28 = 2;\n }\n break;\n case INCOMPLETE_CARDINALITY_RESTRICTION: {\n alt28 = 3;\n }\n break;\n case INCOMPLETE_ONE_OF: {\n alt28 = 4;\n }\n break;\n case INCOMPLETE_VALUE_RESTRICTION: {\n alt28 = 5;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 28, 0, input);\n throw nvae;\n }\n switch (alt28) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:610:11:\n // ^( INCOMPLETE_SOME_RESTRICTION propertyExpression )\n {\n match(input, INCOMPLETE_SOME_RESTRICTION,\n FOLLOW_INCOMPLETE_SOME_RESTRICTION_in_incompleteQualifiedRestriction2300);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_incompleteQualifiedRestriction2302);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:615:11:\n // ^( INCOMPLETE_ALL_RESTRICTION propertyExpression )\n {\n match(input, INCOMPLETE_ALL_RESTRICTION,\n FOLLOW_INCOMPLETE_ALL_RESTRICTION_in_incompleteQualifiedRestriction2345);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_incompleteQualifiedRestriction2347);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n // class expression completions\n retval.completions = new ArrayList<>(\n symtab.getOWLClassCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:620:11:\n // incompleteCardinalityRestriction\n {\n pushFollow(FOLLOW_incompleteCardinalityRestriction_in_incompleteQualifiedRestriction2370);\n incompleteCardinalityRestriction16 = incompleteCardinalityRestriction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = incompleteCardinalityRestriction16 != null\n ? incompleteCardinalityRestriction16.completions\n : null;\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:624:11:\n // incompleteOneOf\n {\n pushFollow(FOLLOW_incompleteOneOf_in_incompleteQualifiedRestriction2392);\n incompleteOneOf17 = incompleteOneOf();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = incompleteOneOf17 != null ? incompleteOneOf17.completions\n : null;\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:628:11:\n // incompleteValueRestriction\n {\n pushFollow(FOLLOW_incompleteValueRestriction_in_incompleteQualifiedRestriction2414);\n incompleteValueRestriction18 = incompleteValueRestriction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n retval.completions = incompleteValueRestriction18 != null\n ? incompleteValueRestriction18.completions\n : null;\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "private Expr expression() {\n return assignment();\n }", "public Rule dsl()\n \t{\n \t\treturn sequence(simpleType(),\n \t\t\t\tsequence(DSL_OPEN, zeroOrMore(sequence(testNot(DSL_CLOSE), any())), DSL_CLOSE));\n \t}", "@Override\n\tpublic EntityDefinition getDefine() {\n\t\treturn null;\n\t}", "public void setFormula(String formula) {\r\n this.formula = formula;\r\n }", "public final ManchesterOWLSyntaxAutoComplete.qualifiedRestriction_return qualifiedRestriction() {\n ManchesterOWLSyntaxAutoComplete.qualifiedRestriction_return retval = new ManchesterOWLSyntaxAutoComplete.qualifiedRestriction_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxAutoComplete.expression_return f = null;\n ManchesterOWLSyntaxAutoComplete.cardinalityRestriction_return cardinalityRestriction11 = null;\n ManchesterOWLSyntaxAutoComplete.oneOf_return oneOf12 = null;\n ManchesterOWLSyntaxAutoComplete.valueRestriction_return valueRestriction13 = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:209:2:\n // ( ^( SOME_RESTRICTION p= propertyExpression f= expression ) | ^(\n // ALL_RESTRICTION p= propertyExpression f= expression ) |\n // cardinalityRestriction | oneOf | valueRestriction )\n int alt10 = 5;\n switch (input.LA(1)) {\n case SOME_RESTRICTION: {\n alt10 = 1;\n }\n break;\n case ALL_RESTRICTION: {\n alt10 = 2;\n }\n break;\n case CARDINALITY_RESTRICTION: {\n alt10 = 3;\n }\n break;\n case ONE_OF: {\n alt10 = 4;\n }\n break;\n case VALUE_RESTRICTION: {\n alt10 = 5;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 10, 0, input);\n throw nvae;\n }\n switch (alt10) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:210:6:\n // ^( SOME_RESTRICTION p= propertyExpression f= expression )\n {\n match(input, SOME_RESTRICTION,\n FOLLOW_SOME_RESTRICTION_in_qualifiedRestriction589);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_qualifiedRestriction594);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_qualifiedRestriction600);\n f = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(f.node\n .getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:214:7:\n // ^( ALL_RESTRICTION p= propertyExpression f= expression )\n {\n match(input, ALL_RESTRICTION,\n FOLLOW_ALL_RESTRICTION_in_qualifiedRestriction622);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_qualifiedRestriction629);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_qualifiedRestriction634);\n f = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(f.node\n .getCompletions());\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:218:7:\n // cardinalityRestriction\n {\n pushFollow(FOLLOW_cardinalityRestriction_in_qualifiedRestriction650);\n cardinalityRestriction11 = cardinalityRestriction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(cardinalityRestriction11 != null ? cardinalityRestriction11.node\n .getCompletions() : null);\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:222:7:\n // oneOf\n {\n pushFollow(FOLLOW_oneOf_in_qualifiedRestriction666);\n oneOf12 = oneOf();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(oneOf12 != null ? oneOf12.node\n .getCompletions() : null);\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:226:7:\n // valueRestriction\n {\n pushFollow(FOLLOW_valueRestriction_in_qualifiedRestriction682);\n valueRestriction13 = valueRestriction();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(valueRestriction13 != null ? valueRestriction13.node\n .getCompletions() : null);\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "public String getDefinition() {\n\t\treturn null;\n\t}", "@Override\n\tpublic XMDefinition getXMDefinition() {return _definition;}", "boolean isUF(Formula f);" ]
[ "0.754526", "0.7021626", "0.66731334", "0.65617347", "0.6388536", "0.6388536", "0.6374946", "0.6359868", "0.6351609", "0.62559766", "0.6073662", "0.6056319", "0.5949453", "0.5806726", "0.5637626", "0.5603342", "0.5567119", "0.55445063", "0.5485526", "0.54241884", "0.5405645", "0.53228307", "0.5251612", "0.52381814", "0.52369803", "0.522797", "0.52195036", "0.51905346", "0.5187033", "0.51544774", "0.51464635", "0.5112082", "0.5081785", "0.5026467", "0.5023878", "0.50228834", "0.501172", "0.5003986", "0.49692914", "0.49413168", "0.49406934", "0.49280167", "0.49268538", "0.4919045", "0.49148685", "0.490197", "0.49004492", "0.48983985", "0.48777536", "0.48514664", "0.48506922", "0.48341098", "0.48292685", "0.4809148", "0.48057342", "0.4797976", "0.4792705", "0.47543192", "0.474329", "0.47419164", "0.47414485", "0.4731834", "0.47306263", "0.4728628", "0.4718851", "0.47169143", "0.4710686", "0.47041115", "0.46930015", "0.46822748", "0.46683815", "0.46566656", "0.46374568", "0.4631584", "0.462991", "0.4625189", "0.46251506", "0.4621286", "0.46172398", "0.46172398", "0.46172398", "0.46172398", "0.46163696", "0.46154886", "0.46097767", "0.46066833", "0.45997232", "0.4591261", "0.4585239", "0.4584621", "0.45773223", "0.4570252", "0.45700684", "0.45604843", "0.4560284", "0.45535994", "0.45519802", "0.45436898", "0.45434928", "0.45401865" ]
0.65827173
3
Get context where the complete formula is.
public ModuleContext getContext() { return context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContext() {\n int l=code.getCurLine();\n String s=\"\\t\\t at line:\" + l + \" \";\n if (l>-1) {\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-2);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l-1);\n s+=\"\\n\\t\\t\\t> \"+code.getLineAsString(l)+\" <\";\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+1);\n s+=\"\\n\\t\\t\\t \"+code.getLineAsString(l+2);\n s=s+ \"\\n\\t\\t current token:\" + tok.toString();;\n s=s+ \"\\n\\t\\t Variable dump:\" + vars;\n if (gVars!=null) {\n s=s+ \"\\n\\t\\t Globals:\" + gVars;\n }\n } else s+=\"\\n\\t\\t\\t> \"+tok.getLine()+\" <\";\n\n return s;\n }", "java.lang.String getContext();", "public String getContext() {\n\t\treturn context;\n\t}", "public String getContext() { return context; }", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "public EvaluationContext getContext() {\n return context;\n }", "public String getContext() {\r\n\t\treturn context;\r\n\t}", "public com.google.protobuf.ByteString getContext() {\n return context_;\n }", "public com.google.protobuf.ByteString getContext() {\n return context_;\n }", "String getContextPath();", "String getContextPath();", "String getContextPath();", "public cl_context getContext() {\r\n return context;\r\n }", "@Nullable\n default String getContext() {\n String contextName =\n String.valueOf(execute(DriverCommand.GET_CURRENT_CONTEXT_HANDLE).getValue());\n return \"null\".equalsIgnoreCase(contextName) ? null : contextName;\n }", "public Context getContext() {\n return contextMain;\n }", "String getContextPath() {\n return contextPath;\n }", "com.google.protobuf.ByteString getContext();", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "Context getContext();", "com.google.protobuf.ByteString\n getContextBytes();", "ContextBucket getContext() {\n\treturn context;\n }", "public Location getLocation ( ) {\n\t\treturn extract ( handle -> handle.getLocation ( ) );\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.QuestProto.Context getContext() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.QuestProto.Context result = POGOProtos.Rpc.QuestProto.Context.valueOf(context_);\n return result == null ? POGOProtos.Rpc.QuestProto.Context.UNRECOGNIZED : result;\n }", "public Context getContext() {\n\t\treturn context;\n\t}", "@java.lang.Override public POGOProtos.Rpc.QuestProto.Context getContext() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.QuestProto.Context result = POGOProtos.Rpc.QuestProto.Context.valueOf(context_);\n return result == null ? POGOProtos.Rpc.QuestProto.Context.UNRECOGNIZED : result;\n }", "public abstract IContext getUnresolvedContext(IContext totalContext);", "public ColumnContext context() {\n\t\t\treturn context;\n\t\t}", "public ColumnContext context() {\n\t\t\treturn context;\n\t\t}", "public String getContextString();", "public Context getContext() {\r\n\t\treturn context;\r\n\t}", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n }\n }", "@Override\n\tpublic String getContextPath() {\n\t\treturn contextPath;\n\t}", "public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }", "public IRuntimeContext getContext() {\n return fContext;\n }", "Map<String, Object> getContext();", "public URI getCurrentContext();", "public Context getContext() {\n return context;\n }", "public final int getContextNode(){\n return this.getCurrentNode();\n }", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "public Context getThis()\r\n {\r\n return this.context;\r\n }", "public ComponentContext getContext()\n\t{\n\t\treturn context;\n\t}", "@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "public static Context getContext() {\n\t\treturn context;\n\t}", "public static Context getContext() {\n\t\treturn context;\n\t}", "public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}", "public Context getContext() {\n\t\treturn ctx;\n\t}", "public Optional<URI> getContextPath() {\r\n return contextPath;\r\n }", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public Object getContextObject() {\n return context;\n }", "public static PMSFormulaContext getInstance() {\n return singleton;\n }", "public BuildTextExpansion getCurrent (CallContext context) throws DoesNotExist;", "RenderingContext getContext();", "public Location getCurrentLocation() { return entity.getLocation(); }", "public ExecutionContext getContext();", "public ContextRequest getContext() {\n\t\treturn context;\n\t}", "Context context();", "Context context();", "public Location getOrig() {\n return ticketsCalculator.getOrigin();\n }", "public Context getContext() {\n\t\treturn null;\n\t}", "public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "protected final TranslationContext context() {\n\t\treturn context;\n\t}", "IContextNode wdGetContext();", "public Context getContext() {\n return this;\n }", "default String getContext() {\n return getContextOpt().orElseThrow(IllegalStateException::new);\n }", "public ElementList getCompleteFormula() {\r\n return completeFormula;\r\n }", "private BicexEvaluationContext getContext()\n{\n return for_bubble.getContext();\n}", "public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\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 context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public MathContext getMathContext();", "public String getLatestExecutionContext() {\n return latestExecutionContext;\n }", "public BuildTextExpansion tryGetCurrent (CallContext context);", "public String getContext() {\n\t\treturn this.getClass().getSimpleName();\n\t}", "public ContextNode getContextNode();", "long getCurrentContext();", "@JsonProperty(\"context\")\n @ApiModelProperty(value = \"The context for the dialog node.\")\n public Object getContext() {\n return context;\n }", "@Override\n\t\tpublic String getContextPath() {\n\t\t\treturn null;\n\t\t}", "@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 }", "public IPrivateTestCompView.IContextElement currentContextElement() {\r\n return (IPrivateTestCompView.IContextElement) getCurrentElement();\r\n }", "public int getCurrentLocation() {\n\t\treturn currentLocation;\n\t}", "@JsonProperty(\"context\")\n public Context getContext() {\n return context;\n }", "@SuppressWarnings(\"unused\")\n Location getCurrentLocation();", "public QueryContext getQueryContext() {\n\t\treturn queryContext;\n\t}", "java.lang.String getSourceContext();", "interface Context {\r\n\r\n\t\t/**\r\n\t\t * Returns the current size of the tribe.\r\n\t\t *\r\n\t\t * @return the tribe's current size\r\n\t\t */\r\n\r\n\t\tint getTribeSize();\r\n\t}", "public String getLocatorCurrent() {\n\t\treturn null;\r\n\t}", "protected String getIntermediateFormula() {\n if ( isGlobal() ) {\n return globalConstraint;\n } else if ( isRoleBased() ) {\n return roleMapToFormula();\n } else {\n // rls is disabled\n return EMPTY_STRING;\n }\n }", "public PVector getLocation()\n\t{\n\t\treturn location;\n\t}", "Optional<TXContext> findCurrent();", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "public EntityAndArguments getCurrentEntityAndArguments() {\r\n\t\t\tif (this.evaluationList == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn this.evaluationList.get(this.currentEvaluationIndex);\r\n\t\t}", "protected Location getLocation() {\r\n\t\treturn parser.getLocation();\r\n\t}", "Context mo1490b();", "public final Object getContextInfo() {\n return this.info;\n }", "public Context getContext() {\n return this.mService.mContext;\n }", "public Point getLocation() {\n return currentLocation;\n }", "public String getContextUrl() {\n String currentURL = driver.getCurrentUrl();\n return currentURL.substring(0, currentURL.lastIndexOf(\"/login\"));\n }" ]
[ "0.6210763", "0.6207516", "0.60683036", "0.60363394", "0.60226715", "0.60226715", "0.60226715", "0.6022297", "0.6016256", "0.5996835", "0.5964", "0.5935067", "0.5935067", "0.5935067", "0.5895609", "0.57797503", "0.57220256", "0.57190937", "0.5704366", "0.56501406", "0.56478703", "0.5627392", "0.56239915", "0.56186444", "0.5584674", "0.5564467", "0.5560703", "0.5555314", "0.55338067", "0.55338067", "0.5504957", "0.5496178", "0.54814", "0.54780364", "0.5473741", "0.54735154", "0.5471793", "0.5455943", "0.54515105", "0.54385966", "0.5407563", "0.53787714", "0.5370252", "0.53657866", "0.5362783", "0.5360064", "0.5351476", "0.5351476", "0.5344418", "0.5341262", "0.5327564", "0.5327113", "0.5321262", "0.53054136", "0.52994597", "0.52911276", "0.5277468", "0.5263828", "0.5255422", "0.52492964", "0.52492964", "0.52296245", "0.5206579", "0.5205555", "0.5205362", "0.5202701", "0.5194649", "0.51711893", "0.5169624", "0.51589733", "0.5157068", "0.51564425", "0.5154322", "0.5153092", "0.5140143", "0.5130247", "0.5129008", "0.5128626", "0.5125734", "0.5103034", "0.5091013", "0.50815815", "0.5077407", "0.50748235", "0.5074268", "0.5073407", "0.505571", "0.5050868", "0.5046269", "0.5034403", "0.50316554", "0.50283384", "0.5027805", "0.50261426", "0.5020044", "0.5017681", "0.5014256", "0.5010531", "0.5004309", "0.50035363" ]
0.54121006
40
Get predicate with parameters.
public ElementList getPredicate() { return predicate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Predicate<Method> getPredicate();", "public Predicate getPredicate() {\n\t\treturn pred;\n\t}", "GeneralPredicate createGeneralPredicate();", "public PredicateOperator getOperator();", "IEmfPredicate<R> getPredicateEditable();", "public QueryIterable<T> where(\n final Func2<Boolean, T> predicate\n ) {\n return Query.where(iterable, predicate);\n }", "public Element getPredicateVariable();", "IEmfPredicate<R> getPredicateVisible();", "public Predicate<Tariff> getPredicate(\n String cmd, double min, double max) {\n return new FilterPredicate(cmd, min, max);\n }", "public PredicateBuilder openPredicate(String name, String... argTypes) { return predicate(false, name, argTypes); }", "private static Predicate<Person> predicate(CrudFilter filter) {\n return filter.getConstraints().entrySet().stream()\n .map(constraint -> (Predicate<Person>) person -> {\n try {\n Object value = valueOf(constraint.getKey(), person);\n return value != null && value.toString().toLowerCase()\n .contains(constraint.getValue().toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n })\n .reduce(Predicate::and)\n .orElse(e -> true);\n }", "KTable<K, V> filter(Predicate<K, V> predicate);", "T findSingleByCriteria(String eCriteria, Object... parameters);", "private IPredicateElement createPredicate() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IAxiom.ELEMENT_TYPE, null, null);\n\t}", "public static <T> Predicate<Predicate<T>> test(T t) {\n\t\treturn pred -> pred.test(t);\n\t}", "Stream<T> filter(\n @Nullable String name,\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate);", "BPredicate createBPredicate();", "Boolean exists(Predicate<X> p);", "public interface MyPredicate<T> {\n\n boolean command(T t);\n\n}", "public Map<String, Map<String, Object>> getPredicateCache()\n {\n return this.predicateCache;\n }", "String getWhereClause();", "@Test\n public void testPredicate2() throws Exception {\n final RuleDescr rule = ((RuleDescr) (parse(\"rule\", \"rule X when Foo(eval( $var.equals(\\\"xyz\\\") )) then end\")));\n final PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n final List<?> constraints = pattern.getConstraint().getDescrs();\n TestCase.assertEquals(1, constraints.size());\n final ExprConstraintDescr predicate = ((ExprConstraintDescr) (constraints.get(0)));\n TestCase.assertEquals(\"eval( $var.equals(\\\"xyz\\\") )\", predicate.getExpression());\n }", "public FindCommand(WordContainsKeywordsPredicate predicate) {\n this.predicate = predicate;\n }", "public Iterator<Clause> iterator(PredicateLiteralDescriptor predicate, boolean isPositive);", "default Stream<T> filter(\n @ClosureParams(value = FromString.class, options = \"T\") Closure<Boolean> predicate) {\n\n return filter(null, predicate);\n }", "IEmfPredicate<R> getPredicateMandatory();", "default E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}", "public static <A> CompositePredicate<A> predicate(Predicate<? super A> pred) {\n return new CompositePredicate<A>(pred);\n }", "List<E> list(Predicate<E> predicate);", "public interface PredicateBinaryExpr extends BinaryExpr {\r\n /**\r\n * Returns the wildcard operator.\r\n * \r\n * @return the wildcard operator.\r\n */\r\n public PredicateOperator getOperator();\r\n\r\n /**\r\n * Returns the property.\r\n * \r\n * @return the property.\r\n */\r\n public Property getProperty();\r\n\r\n /**\r\n * Returns the string representation of the path qualified property.\r\n * \r\n * @return the string representation of the path qualified property\r\n */\r\n public String getPropertyPath();\r\n\r\n /**\r\n * Returns the query literal\r\n * \r\n * @return the query literal\r\n */\r\n public Literal getLiteral();\r\n}", "default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }", "public IterableIterator<T> select(String predicate);", "public interface Predicate<I> extends Function<I,Boolean> {}", "public String getPredicateSymbol()\n {\n return predicateSymbol;\n }", "List<Income> findAll(Predicate predicate);", "public boolean satisfies(Predicate p){\r\n\t\tif(selfSatisfied)\r\n\t\t\treturn isSatisfied();\r\n\t\telse return ((type.equals(p.type))&&(id.equals(p.id) || p.id.equals(\"?\"))&&(value.equals(p.value)));\r\n\t}", "public interface Predicate<E> {\n\t\n\t/** Checks if a binary predicate relation holds. */\n\tboolean evaluate(E input);\n\t\n}", "@SuppressWarnings(\"unchecked\")\n @Test\n public void oneTruePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(true);\n\n assertTrue(allPredicate(predicate).evaluate(getTestValue()), \"single true predicate evaluated to false\");\n }", "public QueryIterable<T> where(\n final Predicate<T> predicate\n ) {\n return Query.where(iterable, predicate);\n }", "public static <T> Function<T, Boolean> asFunction(Predicate<T> predicate) {\n\t\treturn predicate::test;\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "public String getCurrentPredicate(VitroRequest vreq) {\n\t\treturn vreq.getParameter(\"conceptPredicate\");\n\t}", "public void check(final Predicate<T> property);", "public static void main(String[] args) {\n\t\t\n\t\tPredicate<Integer> p1 = a-> a%2==0;\n\t\tSystem.out.println(p1.test(101));\n\t\tProduct product = new Product(100,\"shoes\",12.00);\n\t\t\n\t\tPredicate<Product> p2 = p->(p.id<50);\n\t\t\n\t\tSystem.out.println(p2.test(product));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "String getMetadataWhereClause();", "public Person[] search(Predicate<Person> predicate) {\n\t\tPerson[] tempArr = new Person[nElems];\n\t\tint count = 0;\n\t\tfor(int i = 0; i < nElems; i++) {\n\t\t\tif(predicate.test(arr[i])) {\n\t\t\t\ttempArr[count++] = arr[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Arrays.copyOf(tempArr, count);\n\t}", "@FunctionalInterface\n/* */ public interface Predicate<T>\n/* */ {\n/* */ default Predicate<T> and(Predicate<? super T> paramPredicate) {\n/* 68 */ Objects.requireNonNull(paramPredicate);\n/* 69 */ return paramObject -> (test((T)paramObject) && paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> negate() {\n/* 80 */ return paramObject -> !test((T)paramObject);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ default Predicate<T> or(Predicate<? super T> paramPredicate) {\n/* 100 */ Objects.requireNonNull(paramPredicate);\n/* 101 */ return paramObject -> (test((T)paramObject) || paramPredicate.test(paramObject));\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ static <T> Predicate<T> isEqual(Object paramObject) {\n/* 115 */ return (null == paramObject) ? Objects::isNull : (paramObject2 -> paramObject1.equals(paramObject2));\n/* */ }\n/* */ \n/* */ boolean test(T paramT);\n/* */ }", "public Predicate(String type, String id, String value) {\r\n\t\t super();\r\n\t\t this.type = type;\r\n\t\t this.id = id;\r\n\t\t this.value = value;\r\n\t\t selfSatisfied = false;\r\n\t}", "@Override\n public Possible<T> filter(Predicate<? super T> predicate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n if (self.isPresent()) {\n boolean reallyPresent = true;\n T t = null;\n try {\n t = self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n reallyPresent = false;\n }\n if (reallyPresent) {\n return predicate.test(t);\n }\n }\n return false;\n }\n\n @Override\n public T get() {\n T result = self.get();\n if (predicate.test(result)) {\n return result;\n }\n throw new NoSuchElementException();\n }\n };\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public interface ApplePredicate {\n boolean test (Apple apple);\n}", "public abstract PredicateExpr getNext();", "public final Predicate predicate() throws RecognitionException {\n Predicate pred = null;\n\n\n CommonTree i = null;\n Attribute a = null;\n\n Operator o = null;\n\n Predicate p = null;\n\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:181:2: ( TRUE |a= attribute o= op i= INT_CONST | ^( IN (i= IDENTIFIER )+ ) | NOT p= predicate )\n int alt11 = 4;\n switch (input.LA(1)) {\n case TRUE: {\n alt11 = 1;\n }\n break;\n case CARITY:\n case CNAME:\n case CSTR:\n case PARITY:\n case PPRIO:\n case PPRIOD:\n case PROP:\n case VAR:\n case VCARD:\n case VNAME: {\n alt11 = 2;\n }\n break;\n case IN: {\n alt11 = 3;\n }\n break;\n case NOT: {\n alt11 = 4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 11, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt11) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:181:4: TRUE\n {\n match(input, TRUE, FOLLOW_TRUE_in_predicate273);\n\n\n pred = TruePredicate.singleton;\n\n\n }\n break;\n case 2:\n // parser/flatzinc/FlatzincFullExtWalker.g:185:4: a= attribute o= op i= INT_CONST\n {\n pushFollow(FOLLOW_attribute_in_predicate283);\n a = attribute();\n\n state._fsp--;\n\n\n pushFollow(FOLLOW_op_in_predicate287);\n o = op();\n\n state._fsp--;\n\n\n i = (CommonTree) match(input, INT_CONST, FOLLOW_INT_CONST_in_predicate291);\n\n\n pred = new IntPredicate(a, o, Integer.valueOf((i != null ? i.getText() : null)));\n\n\n }\n break;\n case 3:\n // parser/flatzinc/FlatzincFullExtWalker.g:190:2: ^( IN (i= IDENTIFIER )+ )\n {\n\n ArrayList<String> ids = new ArrayList();\n\n\n match(input, IN, FOLLOW_IN_in_predicate308);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:193:11: (i= IDENTIFIER )+\n int cnt10 = 0;\n loop10:\n do {\n int alt10 = 2;\n switch (input.LA(1)) {\n case IDENTIFIER: {\n alt10 = 1;\n }\n break;\n\n }\n\n switch (alt10) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:193:12: i= IDENTIFIER\n {\n i = (CommonTree) match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_predicate313);\n\n ids.add((i != null ? i.getText() : null));\n\n }\n break;\n\n default:\n if (cnt10 >= 1) break loop10;\n EarlyExitException eee =\n new EarlyExitException(10, input);\n throw eee;\n }\n cnt10++;\n } while (true);\n\n\n match(input, Token.UP, null);\n\n\n pred = new ExtPredicate(ids, map);\n\n\n }\n break;\n case 4:\n // parser/flatzinc/FlatzincFullExtWalker.g:197:4: NOT p= predicate\n {\n match(input, NOT, FOLLOW_NOT_in_predicate325);\n\n pushFollow(FOLLOW_predicate_in_predicate329);\n p = predicate();\n\n state._fsp--;\n\n\n pred = new NotPredicate(p);\n\n\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 pred;\n }", "public RelationPredicate(){}", "public FieldPredicate withPredicate(Predicate<Field> predicate) {\n this.predicate = predicate;\n return this;\n }", "Try<T> filter(Predicate<? super T> p);", "public interface IntPredicate {\n boolean test(int t);\n}", "public static void main(String[] args) {\n\t\tPredicate<Integer> fun1= x-> x>5;\r\n\t\tSystem.out.println(fun1.test(5));\r\n\t\t\r\n\t\tPredicate<String> fun2 = x-> x.isEmpty();\r\n\t\tSystem.out.println(fun2.test(\"\"));\r\n\t\t\r\n\t\tList<Integer> numbers = Arrays.asList(1,2,3,4,6,5,7,8,0);\r\n\t\tSystem.out.println(numbers.stream().filter(fun1).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with and\r\n\t\tSystem.out.println(numbers.stream().filter(x-> x>5 && x<8).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with negate\r\n\t\tList<String> names = Arrays.asList(\"Nayeem\", \"John\", \"SDET\");\r\n\t\tPredicate<String> fun3 = x -> x.contains(\"e\");\r\n\t\tSystem.out.println(names.stream().filter(fun3.negate()).collect(Collectors.toList()));\r\n\t\t\r\n\t}", "public MethodPredicate withPredicate(Predicate<Method> predicate) {\n this.predicate = predicate;\n return this;\n }", "public final Predicate predicates() throws RecognitionException {\n Predicate pred = null;\n\n\n Predicate p = null;\n\n\n try {\n // parser/flatzinc/FlatzincFullExtWalker.g:157:5: (p= predicate | ^( AND (p= predicates )+ ) | ^( OR (p= predicates )+ ) )\n int alt9 = 3;\n switch (input.LA(1)) {\n case CARITY:\n case CNAME:\n case CSTR:\n case IN:\n case NOT:\n case PARITY:\n case PPRIO:\n case PPRIOD:\n case PROP:\n case TRUE:\n case VAR:\n case VCARD:\n case VNAME: {\n alt9 = 1;\n }\n break;\n case AND: {\n alt9 = 2;\n }\n break;\n case OR: {\n alt9 = 3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt9) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:157:9: p= predicate\n {\n pushFollow(FOLLOW_predicate_in_predicates178);\n p = predicate();\n\n state._fsp--;\n\n\n pred = p;\n\n\n }\n break;\n case 2:\n // parser/flatzinc/FlatzincFullExtWalker.g:162:5: ^( AND (p= predicates )+ )\n {\n\n ArrayList<Predicate> preds = new ArrayList();\n\n\n match(input, AND, FOLLOW_AND_in_predicates203);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:165:11: (p= predicates )+\n int cnt7 = 0;\n loop7:\n do {\n int alt7 = 2;\n switch (input.LA(1)) {\n case AND:\n case CARITY:\n case CNAME:\n case CSTR:\n case IN:\n case NOT:\n case OR:\n case PARITY:\n case PPRIO:\n case PPRIOD:\n case PROP:\n case TRUE:\n case VAR:\n case VCARD:\n case VNAME: {\n alt7 = 1;\n }\n break;\n\n }\n\n switch (alt7) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:165:12: p= predicates\n {\n pushFollow(FOLLOW_predicates_in_predicates208);\n p = predicates();\n\n state._fsp--;\n\n\n preds.add(p);\n\n }\n break;\n\n default:\n if (cnt7 >= 1) break loop7;\n EarlyExitException eee =\n new EarlyExitException(7, input);\n throw eee;\n }\n cnt7++;\n } while (true);\n\n\n match(input, Token.UP, null);\n\n\n pred = new BoolPredicate(preds, BoolPredicate.TYPE.AND);\n\n\n }\n break;\n case 3:\n // parser/flatzinc/FlatzincFullExtWalker.g:170:5: ^( OR (p= predicates )+ )\n {\n\n ArrayList<Predicate> preds = new ArrayList();\n\n\n match(input, OR, FOLLOW_OR_in_predicates237);\n\n match(input, Token.DOWN, null);\n // parser/flatzinc/FlatzincFullExtWalker.g:173:10: (p= predicates )+\n int cnt8 = 0;\n loop8:\n do {\n int alt8 = 2;\n switch (input.LA(1)) {\n case AND:\n case CARITY:\n case CNAME:\n case CSTR:\n case IN:\n case NOT:\n case OR:\n case PARITY:\n case PPRIO:\n case PPRIOD:\n case PROP:\n case TRUE:\n case VAR:\n case VCARD:\n case VNAME: {\n alt8 = 1;\n }\n break;\n\n }\n\n switch (alt8) {\n case 1:\n // parser/flatzinc/FlatzincFullExtWalker.g:173:11: p= predicates\n {\n pushFollow(FOLLOW_predicates_in_predicates242);\n p = predicates();\n\n state._fsp--;\n\n\n preds.add(p);\n\n }\n break;\n\n default:\n if (cnt8 >= 1) break loop8;\n EarlyExitException eee =\n new EarlyExitException(8, input);\n throw eee;\n }\n cnt8++;\n } while (true);\n\n\n match(input, Token.UP, null);\n\n\n pred = new BoolPredicate(preds, BoolPredicate.TYPE.OR);\n\n\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 pred;\n }", "public <Y extends RPrimitive> RDataframe filter(String name, Predicate<Y> predicate) {\n\t\treturn filter(RFilter.from(name, predicate));\n\t}", "public void testDynamizePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 100);\n\n part.setInsDyn(0.5);\n part.setDelDyn(0.1);\n \n part.dynamizePredicate(\"<http://dbpedia.org/ontology/deathPlace>\");\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(140,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "Boolean forAll(Predicate<X> p);", "public static <T> Predicate<T> asPredicate(Function<T, Boolean> function) {\n\t\treturn function::apply;\n\t}", "public PredicateBuilder closedPredicate(String name, String... argTypes) { return predicate(true, name, argTypes); }", "public TriplePattern getPredicateBasedTriplePattern( String pred ) ;", "@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 RelationPredicate(String name){\n\t\tthis.name=name;\n\t}", "List<T> findByCriteria(String eCriteria, Object... parameters);", "Predicate<File> pass();", "public Filter condition();", "@SuppressWarnings(\"unchecked\")\n @Test\n public void oneFalsePredicate() {\n // use the constructor directly, as getInstance() returns the original predicate when passed\n // an array of size one.\n final Predicate<Integer> predicate = createMockPredicate(false);\n assertFalse(allPredicate(predicate).evaluate(getTestValue()),\n \"single false predicate evaluated to true\");\n }", "public E find(MongoDBCritera critera);", "public static <A, T> CompositePredicate<A> predicate(Predicate<? super T> predicate,\n Function<? super A, ? extends T> function) {\n return new CompositePredicate<T>(predicate).of(function);\n }", "@Override\n default @NotNull Option<E> find(@NotNull Predicate<? super E> predicate) {\n return firstOption(predicate);\n }", "public Map getPredicatesInfo()\n {\n return this.predicatesInfo;\n }", "private PredicateTransformer(Predicate predicate) {\n super();\n iPredicate = predicate;\n }", "private void execute_parameterPredicate_test(int expectedNum, String userInput, String parameter,\n boolean isIgnoreCase, boolean isAnd,\n List<Person> expectedList) throws ParseException {\n String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, expectedNum);\n ContainsKeywordsPredicate predicate = preparePatientPredicate(userInput, parameter, isIgnoreCase, isAnd);\n PatientFindCommand command = new PatientFindCommand(predicate);\n expectedModel.updateFilteredPersonList(predicate);\n assertCommandSuccess(command, model, commandHistory, expectedMessage, expectedModel);\n assertEquals(expectedList, model.getFilteredPersonList());\n }", "public QbWhere where();", "@Test\n public void testPredicateAlwaysTrue() {\n Predicate<Integer> predicate = Predicate.alwaysTrue();\n\n assertTrue(predicate.apply(10));\n assertTrue(predicate.apply(null));\n assertTrue(predicate.apply(0));\n }", "@FunctionalInterface\npublic interface IntPredicate {\n boolean test(int t);\n}", "public interface Predicate<T> {\n boolean test(@NonNull T t) throws Exception;\n}", "public void addPredicate(Predicate p) throws StandardException{\n if (p.isMultiProbeQualifier(keyColumns)) // MultiProbeQualifier against keys (BASE)\n addSelectivity(new InListSelectivity(scc,p,QualifierPhase.BASE));\n else if (p.isInQualifier(scanColumns)) // In Qualifier in Base Table (FILTER_PROJECTION) // This is not as expected, needs more research.\n addSelectivity(new InListSelectivity(scc,p, QualifierPhase.FILTER_PROJECTION));\n else if (p.isInQualifier(lookupColumns)) // In Qualifier against looked up columns (FILTER_PROJECTION)\n addSelectivity(new InListSelectivity(scc,p, QualifierPhase.FILTER_PROJECTION));\n else if (p.isStartKey() || p.isStopKey()) // Range Qualifier on Start/Stop Keys (BASE)\n performQualifierSelectivity(p,QualifierPhase.BASE);\n else if (p.isQualifier()) // Qualifier in Base Table (FILTER_BASE)\n performQualifierSelectivity(p, QualifierPhase.FILTER_BASE);\n else if (PredicateList.isQualifier(p,baseTable,false)) // Qualifier on Base Table After Index Lookup (FILTER_PROJECTION)\n performQualifierSelectivity(p, QualifierPhase.FILTER_PROJECTION);\n else // Project Restrict Selectivity Filter\n addSelectivity(new PredicateSelectivity(p,baseTable,QualifierPhase.FILTER_PROJECTION));\n }", "public NdexPropertyValuePair getPropertyByName(String name) {\n\t\tfor ( NdexPropertyValuePair p : _properties ) {\n\t\t\tif ( p.getPredicateString().equals(name)) {\n\t\t\t\treturn p;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Observable<Page<E>> search(C criteria);", "protected Object findByParam(Class clazz, String operation, String value) {\r\n try {\r\n Query q = entityManager.createNamedQuery(clazz.getSimpleName() + \".findBy\" + operation);\r\n q.setParameter(operation.toLowerCase(), value);\r\n return q.getSingleResult();\r\n } catch (Exception e) {\r\n //Nao e um erro :)\r\n }\r\n return null;\r\n }", "String getObjectByPropertyQuery(String subject, String property);", "public T casePredicate(Predicate object)\n {\n return null;\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 }", "public PredicatesBuilder<T> add(Predicate predicate, Object value) {\n return add(predicate, value != null);\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> takeWhile(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, Boolean> predicate) {\r\n\t\treturn new Take.WhileIndexed<T>(source, predicate);\r\n\t}", "@Override\n\tpublic List<Playlist> retrieveMatching(Predicate<Playlist> p) {\n\t\treturn null;\n\t}", "Condition in(QueryParameter parameter, Object... values);", "<T> Collection<ProjectEntity> searchWithPropertyValue(\n Class<? extends PropertyType<T>> propertyTypeClass,\n BiFunction<ProjectEntityType, ID, ProjectEntity> entityLoader,\n Predicate<T> predicate\n );", "public synchronized <Y extends RPrimitive> RDataframe filter(String name, Class<Y> type, Predicate<Y> predicate) {\n\t\treturn filter(RFilter.from(name, type, predicate));\n\t}", "public Rule<T> when(Predicate<T> p) {\r\n\r\n\t\tthis.when = p;\r\n\r\n\t\treturn this;\r\n\r\n\t}", "@Override\n public Predicate<Transaction> getPredicate() {\n return t -> t.getTags().stream().anyMatch(budgets::containsKey);\n }", "@Repository\npublic interface StudentRepository extends JpaRepository<Student, Integer>\n , QueryDslPredicateExecutor<Student>{\n\n}", "Parameter getParameter();", "public Query queryRule(String rule, Object... args) throws Exceptions.OsoException {\n Host new_host = host.clone();\n String pred = new_host.toPolarTerm(new Predicate(rule, Arrays.asList(args))).toString();\n return new Query(ffiPolar.newQueryFromTerm(pred), new_host);\n }" ]
[ "0.6682662", "0.62029374", "0.6196402", "0.604109", "0.59906995", "0.5961788", "0.5912529", "0.5780496", "0.57800835", "0.5747002", "0.56488377", "0.56212777", "0.5567709", "0.5557264", "0.55456257", "0.55256385", "0.55147463", "0.5506613", "0.55047846", "0.5502743", "0.54572463", "0.54563934", "0.5455408", "0.5448391", "0.5443822", "0.5442426", "0.54110456", "0.53822976", "0.5367092", "0.5354289", "0.5351431", "0.53353155", "0.53271455", "0.5309131", "0.5290016", "0.52792305", "0.5275544", "0.5275215", "0.52511114", "0.5248691", "0.5239424", "0.52249694", "0.5192517", "0.51904875", "0.51891655", "0.5188452", "0.5173159", "0.5172748", "0.51720726", "0.51496243", "0.5133571", "0.51289237", "0.5119798", "0.51145834", "0.5101006", "0.5096789", "0.50741535", "0.5064407", "0.5059275", "0.50534976", "0.50370246", "0.50333077", "0.5029268", "0.5024313", "0.50159943", "0.5009542", "0.50027186", "0.5000209", "0.49972036", "0.49852216", "0.49585044", "0.49250653", "0.49248955", "0.49131352", "0.49007097", "0.48862037", "0.48860142", "0.48685756", "0.48678708", "0.48650146", "0.48531377", "0.48431048", "0.48423666", "0.48406243", "0.4830965", "0.48234314", "0.48194975", "0.4813262", "0.48082745", "0.4800903", "0.47954985", "0.47828603", "0.47802037", "0.4779141", "0.47752678", "0.47715676", "0.47670645", "0.47664523", "0.47631815", "0.4763173" ]
0.6336351
1